/* Study Enquiry Form Styles */

.study-form-container {
    width: 100%;
    min-height: 500px;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.study-form-wrapper {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.form-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 30px 0;
    text-align: left;
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    margin-bottom: 30px;
}

.section-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 15px;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
}

/* Button Groups */
.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.option-btn {
    flex: 1;
    min-width: 150px;
    padding: 14px 24px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.option-btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.option-btn.selected {
    background: #fff5e6;
    border-color: #ff8c00;
    color: #ff8c00;
    font-weight: 600;
}

/* Country Grid */
.country-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.country-btn {
    min-width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.flag {
    font-size: 20px;
}

/* Course Tags */
.course-select-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.course-select {
    width: 100%;
    padding: 14px 40px 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #1a202c;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%23718096' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.course-select:focus {
    outline: none;
    border-color: #ff8c00;
}

.course-select option {
    padding: 10px;
    font-size: 15px;
    background: #ffffff;
    color: #1a202c;
}

.course-select option:hover {
    background: #f7fafc;
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    pointer-events: none;
    font-size: 12px;
}

.search-wrapper {
    margin-bottom: 15px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #4a5568;
    background: #ffffff;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #3182ce;
}

.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.course-tag {
    padding: 10px 18px;
    background: #f7fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}

.course-tag:hover {
    border-color: #cbd5e0;
    background: #edf2f7;
}

.course-tag.selected {
    background: #3182ce;
    border-color: #3182ce;
    color: #ffffff;
}

/* Text Inputs */
.text-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #1a202c;
    background: #ffffff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.text-input:focus {
    outline: none;
    border-color: #3182ce;
}

.text-input::placeholder {
    color: #a0aec0;
}

.text-input:disabled {
    background: #edf2f7;
    cursor: not-allowed;
}

/* Phone Input */
.phone-input-wrapper {
    display: flex !important;
    gap: 10px;
    align-items: stretch;
    width: 100%;
}

.country-code-select {
    padding: 14px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #1a202c;
    background: #ffffff;
    cursor: pointer;
    min-width: 130px;
    max-width: 140px;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%23718096' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.country-code-select:focus {
    outline: none;
    border-color: #ff8c00;
}

.phone-input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
}

.phone-input:focus {
    border-color: #ff8c00 !important;
}

/* Navigation Buttons */
.continue-btn,
.submit-btn {
    width: 100%;
    padding: 16px;
    background: #2d3748;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.continue-btn:hover,
.submit-btn:hover {
    background: #1a202c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.continue-btn:disabled,
.submit-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

.button-group-nav {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.back-btn {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.back-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.back-arrow {
    font-size: 24px;
    color: #2d3748;
}

.button-group-nav .continue-btn,
.button-group-nav .submit-btn {
    flex: 1;
    margin-top: 0;
}

/* Progress Dots */
.progress-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: all 0.3s ease;
}

.dot.active {
    background: #2d3748;
    width: 30px;
    border-radius: 5px;
}

/* Messages */
.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
    font-size: 14px;
    font-weight: 500;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Loading State */
.form-step.loading {
    opacity: 0.6;
    pointer-events: none;
}

.form-step.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #3182ce;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .study-form-container {
        padding: 20px 15px;
    }

    .study-form-wrapper {
        padding: 30px 20px;
    }

    .form-title {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .country-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .option-btn {
        min-width: 120px;
        font-size: 14px;
        padding: 12px 18px;
    }

    .button-group {
        gap: 10px;
    }

    .course-tag {
        font-size: 12px;
        padding: 8px 14px;
    }
}

@media (max-width: 480px) {
    .form-title {
        font-size: 20px;
    }

    .country-grid {
        grid-template-columns: 1fr;
    }

    .option-btn {
        min-width: 100%;
    }

    .button-group {
        flex-direction: column;
    }

    .phone-input-wrapper {
        flex-direction: row !important;
        display: flex !important;
        gap: 8px;
    }

    .country-code-select {
        min-width: 110px;
        max-width: 110px;
        font-size: 13px;
    }

    .phone-input {
        flex: 1 1 auto !important;
        width: auto !important;
    }
}

/* Hide default form validation messages */
input:invalid {
    box-shadow: none;
}

input:focus:invalid {
    border-color: #e53e3e;
}

/* Ensure proper spacing */
* {
    box-sizing: border-box;
}
