/* Frontend Styles for Admission Enquiry Plugin */

/* Float Button */
.aep-float-button {
    position: fixed;
    bottom: 30px;
    z-index: 99999;
    padding: 14px 28px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.aep-float-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

.aep-float-button:active {
    transform: translateY(-1px);
}

.aep-position-bottom-left {
    left: 30px;
}

.aep-position-bottom-right {
    right: 30px;
}

.aep-position-bottom-center {
    left: 50%;
    transform: translateX(-50%);
}

.aep-position-bottom-center:hover {
    transform: translateX(-50%) translateY(-3px);
}

/* Modal Overlay */
.aep-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.aep-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Container */
.aep-modal-container {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.aep-modal-overlay.active .aep-modal-container {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.aep-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.aep-modal-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.aep-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    color: #ffffff;
}

.aep-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.aep-modal-close svg {
    width: 20px;
    height: 20px;
}

/* Modal Body */
.aep-modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

/* Form Styles */
.aep-enquiry-form {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.aep-form-field {
    margin-bottom: 20px;
}

.aep-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #374151;
}

.aep-required {
    color: #ef4444;
    margin-left: 4px;
}

.aep-form-field input[type="text"],
.aep-form-field input[type="email"],
.aep-form-field input[type="tel"],
.aep-form-field input[type="number"],
.aep-form-field input[type="date"],
.aep-form-field select,
.aep-form-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #f9fafb;
    font-family: inherit;
    box-sizing: border-box;
}

.aep-form-field input:focus,
.aep-form-field select:focus,
.aep-form-field textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.aep-form-field textarea {
    resize: vertical;
    min-height: 100px;
}

.aep-form-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Radio & Checkbox Groups */
.aep-radio-group,
.aep-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aep-radio-option,
.aep-checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.aep-radio-option:hover,
.aep-checkbox-option:hover {
    border-color: #667eea;
    background: #ffffff;
}

.aep-radio-option input,
.aep-checkbox-option input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #667eea;
}

.aep-radio-option span,
.aep-checkbox-option span {
    font-size: 14px;
    color: #374151;
}

/* Submit Button */
.aep-form-submit {
    margin-top: 24px;
}

.aep-submit-button {
    width: 100%;
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.aep-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.aep-submit-button:active {
    transform: translateY(0);
}

.aep-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
.aep-spinner {
    animation: aep-spin 1s linear infinite;
}

.aep-spinner-circle {
    stroke-dasharray: 50;
    stroke-dashoffset: 20;
}

@keyframes aep-spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Form Messages */
.aep-form-message {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.aep-form-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.aep-form-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Responsive Design */
@media (max-width: 600px) {
    .aep-float-button {
        bottom: 20px;
        padding: 12px 24px;
        font-size: 14px;
    }

    .aep-position-bottom-left {
        left: 20px;
    }

    .aep-position-bottom-right {
        right: 20px;
    }

    .aep-modal-overlay {
        padding: 15px;
    }

    .aep-modal-container {
        max-height: 95vh;
        border-radius: 12px;
    }

    .aep-modal-header {
        padding: 20px;
    }

    .aep-modal-title {
        font-size: 18px;
    }

    .aep-modal-body {
        padding: 20px;
    }

    .aep-form-field input,
    .aep-form-field select,
    .aep-form-field textarea {
        padding: 10px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Animation for modal */
@keyframes aep-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes aep-slide-up {
    from {
        transform: scale(0.9) translateY(20px);
    }
    to {
        transform: scale(1) translateY(0);
    }
}
