/* ============================================================
   Study Abroad Modal — scoped styles
   Every selector is namespaced under #myModal so nothing here
   leaks onto the rest of the site (or collides with #counsel's
   own modal styles, which reuse similar class/animation names).
   ============================================================ */

/* ---------- Modal shell ---------- */
#myModal>.modal-dialog {
    width: 85%;
}

#myModal>.modal-body {
    background-color: #424ea4;
}

#myModal>.modal-body>.close {
    color: #fff;
}

@media (max-width: 767px) {
    #myModal>.modal-dialog {
        width: 95% !important;
    }
}

/* ---------- Card shell ---------- */
#myModal .form-card {
    background: white;
    border-radius: 25px;
    padding: 0 30px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
    position: relative;
    overflow: hidden;
}

#myModal .form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    pointer-events: none;
}

#myModal .decorative-element {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.05;
    top: -100px;
    right: -100px;
    z-index: 0;
}

#myModal .form-content {
    position: relative;
    z-index: 1;
}

/* ---------- Headings ---------- */
#myModal .form-header {
    text-align: center;
    margin-bottom: 20px;
}

#myModal .form-title {
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    margin-top: 10px;
    line-height: 1.2;
}

#myModal h3.form-title {
    background: none;
    -webkit-text-fill-color: #555;
    border-radius: 10px;
}

#myModal .form-step>.form-header>h3.form-title {
    background: #c2e7ff;
}

#myModal .form-subtitle {
    font-size: 17px;
    color: #555 !important;
    line-height: 1.6;
    font-weight: 600;
}

/* ---------- Progress bar ---------- */
#myModal .progress-container {
    margin-bottom: 24px;
}

#myModal .progress-bar {
    height: 8px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
    position: relative;
}

#myModal .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%);
    animation: saShimmer 2s infinite;
}

@keyframes saShimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

#myModal .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#myModal .progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

#myModal .progress-step {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    transition: all 0.3s ease;
    position: relative;
    padding-top: 32px;
}

#myModal .progress-step::before {
    content: attr(data-number);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
}

#myModal .progress-step.active {
    color: #667eea;
}

#myModal .progress-step.active::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#myModal .progress-step.completed {
    color: #10b981;
}

#myModal .progress-step.completed::before {
    content: '✓';
    background: #10b981;
    color: white;
}

/* ---------- Step panels ---------- */
#myModal .form-step {
    display: none;
    animation: saFadeSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#myModal .form-step.active {
    display: block;
}

@keyframes saFadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#myModal .form-group {
    margin-bottom: 20px;
}

#myModal label {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

#myModal .required {
    color: #ef4444;
}

/* ---------- Inputs (scoped — do NOT remove the #myModal prefix,
   these tag selectors were unscoped in the source file and would
   otherwise restyle every input/select/textarea on the site) ---------- */
#myModal input,
#myModal select,
#myModal textarea {
    width: 100%;
    padding: 10px 15px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    transition: all 0.3s ease;
    background: #fafbfc;
    color: #1e293b;
}

#myModal input:hover,
#myModal select:hover,
#myModal textarea:hover {
    border-color: #cbd5e1;
    background: white;
}

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

#myModal input::placeholder,
#myModal textarea::placeholder {
    color: #94a3b8;
}

#myModal textarea {
    resize: vertical;
    min-height: 130px;
    line-height: 1.6;
}

/* ---------- Radio group (step 2 & 3 pill options) ---------- */
#myModal .radio-group {
    display: block;
    gap: 14px;
}

#myModal .radio-option {
    position: relative;
    display: inline-block;
    width: 30%;
    margin-right: 15px;
}

#myModal .radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

#myModal .radio-label {
    display: flex;
    align-items: center;
    padding: 18px 22px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #475569;
    background: #fafbfc;
    position: relative;
    font-size: 15px;
    line-height: 20px;
}

#myModal .radio-label::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    margin-right: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

#myModal .radio-label:hover {
    border-color: #667eea;
    background: white;
    transform: translateX(4px);
}

#myModal .radio-option input[type="radio"]:checked+.radio-label {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    color: #667eea;
    font-weight: 600;
}

#myModal .radio-option input[type="radio"]:checked+.radio-label::before {
    border-color: #667eea;
    background: #667eea;
    box-shadow: inset 0 0 0 4px white;
}

@media (max-width: 640px) {
    #myModal .radio-option {
        width: 100%;
    }
}

/* ---------- Country flag tiles (step 1) ---------- */
#myModal .radio-buttons {
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

#myModal .custom-radio input {
    display: none;
}

#myModal .radio-btn {
    margin: 0px 5px;
    width: 110px;
    height: 130px;
    border: 3px solid transparent;
    display: inline-block;
    border-radius: 10px;
    position: relative;
    text-align: center;
    box-shadow: 0 0 20px #c3c3c367;
    cursor: pointer;
    background: aliceblue;
}

#myModal .radio-btn>i {
    color: #ffffff;
    background-color: #FFDAE9;
    font-size: 15px;
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%) scale(2);
    border-radius: 50px;
    padding: 3px;
    transition: 0.5s;
    pointer-events: none;
    opacity: 0;
}

#myModal .radio-btn .hobbies-icon {
    width: 85px;
    height: 85px;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#myModal .radio-btn .hobbies-icon img {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

#myModal .radio-btn .hobbies-icon i {
    color: #FFDAE9;
    line-height: 80px;
    font-size: 60px;
}

#myModal .radio-btn .hobbies-icon h3 {
    color: #555;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
}

#myModal .custom-radio input:checked+.radio-btn {
    background: linear-gradient(white, white) padding-box, linear-gradient(to right, #667eea, #764ba2) border-box;
    border-radius: 10px;
    border: 2px solid transparent;
}

#myModal .custom-radio input:checked+.radio-btn>i {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ---------- "Explore more courses" searchable dropdown ---------- */
#myModal .search-area {
    display: inline-block;
    padding: 10px;
}

#myModal .search-area .pincode-dropdown {
    display: inline-block;
    position: relative;
    margin-bottom: 15px;
}

#myModal .search-area .pincode-dropdown button {
    padding: 18px 22px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-weight: 600;
    text-transform: capitalize;
    width: 370px;
    cursor: pointer;
    text-align: left;
    background-color: transparent;
    font-size: 14px;
    color: #475569;
    position: relative;
    background: #fafbfc;
}

#myModal .search-area .pincode-dropdown ul {
    display: none;
    position: absolute;
    background: #ffffff;
    list-style: none;
    border: 1px solid #f0f0f0;
    line-height: 1em;
    top: 0px;
    left: 0px;
    box-shadow: 0px 0px 3px 1px #ccc;
    padding: 0;
    width: 370px;
    margin: 0;
    z-index: 1;
    max-height: 270px;
    overflow-y: auto;
}

#myModal .search-area .pincode-dropdown ul li {
    padding: 0.8em;
    cursor: pointer;
    transition: all ease 250ms;
    text-align: left;
}

#myModal .search-area .pincode-dropdown ul li:hover {
    background: #f0f0f0;
}

#myModal .search-area .pincode-dropdown ul li.searchInput {
    padding: 0;
    position: sticky;
    width: 100%;
    top: 0;
    background-color: #ffffff;
}

#myModal .search-area .pincode-dropdown ul li.searchInput input {
    width: 95%;
    border: 1px solid #000000;
    padding: 15px 30px;
    margin-top: 10px;
}

#myModal .search-area .pincode-dropdown ul li.searchInput::before {
    content: "";
    position: absolute;
    background: url(../images/search-icon.svg) no-repeat center;
    left: 10px;
    top: 23px;
    width: 20px;
    height: 20px;
    filter: brightness(0);
}

@media (max-width: 640px) {
    #myModal .search-area .pincode-dropdown button {
        width: 100%;
    }

    #myModal .search-area .pincode-dropdown ul {
        width: 100%;
    }
}

/* ---------- Contact step (side-by-side fields) ---------- */
#myModal .sidebyside-1 {
    display: inline-block;
    width: 47%;
    margin-right: 30px;
}

#myModal .sidebyside-2 {
    display: inline-block;
    width: 47%;
}

@media (max-width: 640px) {

    #myModal .sidebyside-1,
    #myModal .sidebyside-2 {
        width: 100%;
        margin-right: 0;
    }
}

/* ---------- Buttons (Continue / Back) ---------- */
#myModal .button-group {
    display: flex;
    gap: 14px;
    margin-top: 25px;
    margin-bottom: 25px;
}

#myModal button {
    flex: 1;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#myModal button.close {
    font-size: 30px;
    padding: 10px 5px;
}

#myModal .btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 2px solid #e2e8f0;
}

#myModal .btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

#myModal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35);
    position: relative;
    overflow: hidden;
}

#myModal .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#myModal .btn-primary:hover::before {
    left: 100%;
}

#myModal .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.45);
}

#myModal .btn-primary:active {
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    #myModal .button-group {
        flex-direction: column-reverse;
    }

    #myModal button {
        width: 100%;
    }
}

/* ---------- Success message ---------- */
#myModal .success-message {
    display: none;
    text-align: center;
    animation: saFadeSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px 0;
}

#myModal .success-message.active {
    display: block;
}

#myModal .success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    animation: saScaleIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.3);
    position: relative;
}

#myModal .success-icon::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    animation: saPulse 2s ease-in-out infinite;
}

@keyframes saPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.15);
        opacity: 0;
    }
}

@keyframes saScaleIn {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

#myModal .success-icon::after {
    content: '✓';
    font-size: 56px;
    color: white;
    font-weight: bold;
    position: relative;
    z-index: 1;
}

#myModal .success-message h3 {
    font-size: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 14px;
}

#myModal .success-message p {
    font-size: 17px;
    color: #64748b;
    line-height: 1.7;
}

/* ---------- Error message ---------- */
#myModal .error-message {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #fecaca;
    color: #dc2626;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    display: none;
    animation: saShake 0.4s ease;
}

@keyframes saShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

#myModal .error-message.active {
    display: block;
}

/* ---------- Responsive tweaks for the whole card ---------- */
@media (max-width: 640px) {
    #myModal .form-card {
        padding: 40px 10px;
    }

    #myModal .form-title {
        font-size: 14px;
    }

    #myModal .form-subtitle {
        font-size: 15px;
    }

    #myModal .progress-steps {
        gap: 8px;
    }

    #myModal .progress-step {
        font-size: 11px;
        padding-top: 28px;
    }

    #myModal .progress-step::before {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}