﻿/* enrollment.css - Optimized for Mobile */
:root {
    --primary-blue: #0066CC;
    --primary-dark: #1A365D;
    --primary-light: #4D94FF;
    --accent-teal: #00B4D8;
    --accent-green: #00CC88;
    --accent-purple: #8A2BE2;
    --light-gray: #F8FAFC;
    --medium-gray: #E2E8F0;
    --dark-gray: #4A5568;
    --text-dark: #2D3748;
    --text-light: #718096;
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-teal) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--accent-purple) 0%, var(--primary-light) 100%);
    --shadow-light: 0 10px 30px rgba(0, 102, 204, 0.08);
    --shadow-medium: 0 15px 40px rgba(0, 0, 0, 0.1);
    --shadow-large: 0 20px 50px rgba(0, 0, 0, 0.15);
    --border-radius: 16px;
    --border-radius-small: 10px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--light-gray);
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image: radial-gradient(circle at 10% 20%, rgba(77, 148, 255, 0.05) 0%, transparent 20%), radial-gradient(circle at 90% 80%, rgba(0, 180, 216, 0.05) 0%, transparent 20%);
}

/* Mobile-first container */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

/* Main Form Container - Mobile First */
.form-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px 20px;
    box-shadow: var(--shadow-large);
    width: 100%;
    margin: 0 auto;
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

    .form-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 5px;
        background: var(--gradient-primary);
    }

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 5px;
}

.form-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
    line-height: 1.3;
}

.form-subtitle {
    color: var(--text-light);
    font-size: 14px;
    max-width: 100%;
    margin: 0 auto;
    line-height: 1.5;
}

/* Form Progress */
.form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
    padding: 0 5px;
}

    .form-progress::before {
        content: '';
        position: absolute;
        top: 15px;
        left: 10%;
        width: 80%;
        height: 2px;
        background: var(--medium-gray);
        z-index: 1;
    }

.progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 25%;
    padding: 0 5px;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: 600;
    color: var(--dark-gray);
    transition: all 0.3s;
    font-size: 14px;
}

    .step-circle.active {
        background: var(--primary-blue);
        border-color: var(--primary-blue);
        color: white;
        box-shadow: 0 3px 10px rgba(0, 102, 204, 0.3);
        transform: scale(1.1);
    }

.step-label {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
    line-height: 1.3;
    display: block;
}

    .step-label.active {
        color: var(--primary-blue);
        font-weight: 600;
    }

/* Success Message */
.success-message {
    background: linear-gradient(to right, rgba(0, 204, 136, 0.1), rgba(0, 180, 216, 0.1));
    border-radius: var(--border-radius-small);
    padding: 20px;
    margin-bottom: 25px;
    display: none;
    align-items: flex-start;
    flex-direction: column;
}

.success-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    flex-shrink: 0;
}

    .success-icon i {
        color: white;
        font-size: 24px;
    }

.success-message h4 {
    color: var(--accent-green);
    margin-top: 0;
    font-size: 18px;
    margin-bottom: 8px;
}

.success-message p {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Form Sections */
.form-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--medium-gray);
}

.section-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-direction: column;
}

.section-icon {
    width: 45px;
    height: 45px;
    background: rgba(0, 102, 204, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

    .section-icon i {
        color: var(--primary-blue);
        font-size: 20px;
    }

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 5px;
    line-height: 1.3;
}

.section-description {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
    width: 100%;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.required-field::after {
    content: " *";
    color: #FF4757;
    margin-left: 3px;
}

.form-control {
    border-radius: var(--border-radius-small);
    border: 2px solid var(--medium-gray);
    padding: 14px 15px;
    font-size: 16px;
    transition: all 0.3s;
    height: auto;
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

    .form-control:focus {
        border-color: var(--primary-blue);
        box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
        outline: none;
    }

/* Mobile-specific input optimization */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    font-size: 16px !important;
}

    select.form-control {
        padding-right: 40px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234A5568' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 15px center;
        background-size: 12px;
    }

.input-with-icon {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 18px;
    z-index: 2;
}

.input-with-icon input,
.input-with-icon select {
    padding-left: 45px;
}

/* Radio & Checkbox */
.styled-radio, .styled-checkbox {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.radio-option, .checkbox-option {
    position: relative;
    flex: 1 1 100%;
    min-width: 0;
}

    .radio-option input, .checkbox-option input {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

.radio-label, .checkbox-label {
    display: flex;
    align-items: center;
    padding: 14px 12px;
    background: white;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 14px;
    min-height: 52px;
    width: 100%;
    touch-action: manipulation;
}

    .radio-label:hover, .checkbox-label:hover,
    .radio-label:active, .checkbox-label:active {
        border-color: var(--primary-light);
        transform: translateY(-1px);
    }

.radio-option input:checked + .radio-label,
.checkbox-option input:checked + .checkbox-label {
    border-color: var(--primary-blue);
    background: rgba(0, 102, 204, 0.05);
    color: var(--primary-blue);
}

.radio-label::before, .checkbox-label::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid var(--medium-gray);
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.checkbox-label::before {
    border-radius: 5px;
}

.radio-option input:checked + .radio-label::before {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    box-shadow: inset 0 0 0 4px white;
}

.checkbox-option input:checked + .checkbox-label::before {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    box-shadow: inset 0 0 0 4px white;
}

/* Program Dates */
.program-dates {
    background: linear-gradient(to right, rgba(0, 102, 204, 0.03), rgba(0, 180, 216, 0.03));
    border-radius: var(--border-radius-small);
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid var(--accent-teal);
    display: none;
}

.dates-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-direction: column;
}

.dates-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-teal);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

    .dates-icon i {
        color: white;
        font-size: 18px;
    }

.dates-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 5px;
    line-height: 1.3;
}

.dates-subtitle {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.4;
    width: 100%;
}

/* Payment Section */
.payment-section {
    background: linear-gradient(to right, rgba(0, 102, 204, 0.03), rgba(0, 180, 216, 0.03));
    border-radius: var(--border-radius-small);
    padding: 25px 20px;
    margin-top: 25px;
    border-left: 4px solid var(--accent-teal);
}

.payment-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-direction: column;
}

.payment-icon {
    width: 45px;
    height: 45px;
    background: var(--accent-teal);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

    .payment-icon i {
        color: white;
        font-size: 20px;
    }

.payment-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 5px;
    line-height: 1.3;
}

.payment-subtitle {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
    width: 100%;
}

/* Buttons */
.btn-sphere {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 16px 25px;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 102, 204, 0.3);
}

    .btn-sphere:hover, .btn-sphere:focus, .btn-sphere:active {
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 102, 204, 0.35);
        outline: none;
    }

    .btn-sphere i {
        margin-right: 10px;
        font-size: 18px;
    }

.btn-outline-sphere {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 14px 20px;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    width: 100%;
    height: 52px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

    .btn-outline-sphere:hover, .btn-outline-sphere:focus, .btn-outline-sphere:active {
        background: rgba(0, 102, 204, 0.05);
        transform: translateY(-2px);
        outline: none;
    }

    .btn-outline-sphere i {
        margin-right: 8px;
        font-size: 16px;
    }

.btn-small {
    padding: 12px 16px;
    font-size: 14px;
    height: auto;
    min-height: 44px;
}

/* Form Actions */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--medium-gray);
}

    .form-actions > div {
        width: 100%;
    }

    .form-actions .btn-group {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

/* Bootstrap Grid Overrides for Mobile */
.row {
    margin-left: -10px;
    margin-right: -10px;
}

.col-md-6, .col-md-8, .col-md-4, .col-md-12 {
    padding-left: 10px;
    padding-right: 10px;
}

/* Extra Small Devices (Phones, less than 576px) */
@media (max-width: 575.98px) {
    .form-card {
        padding: 20px 15px;
        border-radius: 12px;
    }

    .form-title {
        font-size: 22px;
    }

    .form-subtitle {
        font-size: 13px;
    }

    .section-title {
        font-size: 18px;
    }

    .section-description {
        font-size: 13px;
    }

    .form-control {
        padding: 12px 15px;
        font-size: 15px;
    }

    .btn-sphere, .btn-outline-sphere {
        height: 50px;
        padding: 14px 20px;
    }

    /* Stack all columns on mobile */
    .col-md-6, .col-md-8, .col-md-4, .col-md-12 {
        width: 100%;
        margin-bottom: 15px;
    }

    .styled-radio, .styled-checkbox {
        gap: 8px;
    }

    .radio-label, .checkbox-label {
        padding: 12px 10px;
        font-size: 13px;
        min-height: 48px;
    }
}

/* Small Devices (Tablets, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .form-card {
        padding: 25px;
        max-width: 540px;
        margin: 20px auto;
    }

    .form-title {
        font-size: 26px;
    }

    .col-md-6 {
        width: 50%;
    }

    .col-md-8 {
        width: 66.66666667%;
    }

    .col-md-4 {
        width: 33.33333333%;
    }

    .col-md-12 {
        width: 100%;
    }

    .radio-option, .checkbox-option {
        flex: 1 1 calc(50% - 10px);
    }
}

/* Medium Devices (Tablets, 768px and up) */
@media (min-width: 768px) {
    body {
        padding: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
    }

    .form-card {
        padding: 40px;
        max-width: 800px;
        margin: 0 auto;
        min-height: auto;
    }

    .form-title {
        font-size: 32px;
    }

    .form-subtitle {
        font-size: 16px;
        max-width: 700px;
    }

    .form-progress::before {
        left: 0;
        width: 100%;
    }

    .step-label {
        font-size: 14px;
    }

    .section-header {
        flex-direction: row;
        align-items: center;
    }

    .section-icon {
        margin-bottom: 0;
    }

    .section-description {
        margin-left: 65px;
    }

    .radio-option, .checkbox-option {
        flex: 0 1 auto;
    }

    .radio-label, .checkbox-label {
        min-width: 160px;
    }

    .form-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

        .form-actions .btn-group {
            flex-direction: row;
            width: auto;
            gap: 15px;
        }

    .btn-sphere, .btn-outline-sphere {
        width: auto;
        padding: 16px 30px;
        height: auto;
    }

    .success-message {
        flex-direction: row;
        align-items: center;
    }

    .success-icon {
        margin-bottom: 0;
        margin-right: 20px;
    }
}

/* Large Devices (Desktops, 992px and up) */
@media (min-width: 992px) {
    .form-card {
        max-width: 900px;
    }
}

/* Extra Large Devices (Large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .form-card {
        max-width: 1000px;
    }
}

/* Landscape Mode Optimization */
@media (max-height: 600px) and (orientation: landscape) {
    .form-card {
        padding: 15px;
        margin: 10px auto;
    }

    .form-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .form-section {
        margin-bottom: 15px;
        padding-bottom: 15px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-control {
        padding: 10px 12px;
    }

    .btn-sphere, .btn-outline-sphere {
        padding: 12px 16px;
        height: 46px;
    }

    .section-header {
        margin-bottom: 15px;
    }
}

/* iOS Specific Fixes */
@supports (-webkit-touch-callout: none) {
    .form-control {
        font-size: 16px;
    }

    select.form-control {
        padding-right: 45px;
    }

    .btn-sphere, .btn-outline-sphere {
        cursor: pointer;
    }
}

/* Android Chrome Fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select.form-control {
        background-size: 10px;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .form-card::before {
        height: 4px;
    }
}

/* Fix for Bootstrap 3 columns on mobile */
.row {
    display: flex;
    flex-wrap: wrap;
}

.col-xs-12 {
    width: 100%;
}

/* Ensure proper spacing on very small screens */
@media (max-width: 360px) {
    .form-card {
        padding: 15px 12px;
    }

    .form-title {
        font-size: 20px;
    }

    .step-circle {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .step-label {
        font-size: 10px;
    }

    .btn-sphere, .btn-outline-sphere {
        font-size: 15px;
        padding: 12px 16px;
        height: 48px;
    }
}
/* Mobile CSS for button margin fix */
@media (max-width: 767.98px) {
    /* Remove all inline margins on mobile */
    .btn-sphere[style*="margin-left"],
    .btn-outline-sphere[style*="margin-left"],
    .btn-sphere[style*="margin-right"],
    .btn-outline-sphere[style*="margin-right"] {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Specifically target the submit button */
    button[type="submit"].btn-sphere,
    .btn-sphere[type="submit"] {
        margin-left: 0 !important;
        margin: 0;
    }

    /* Make all buttons in form actions full width with no margins */
    .form-actions .btn-group .btn-sphere,
    .form-actions .btn-group .btn-outline-sphere {
        margin: 0 !important;
        width: 100%;
    }

    /* Stack buttons properly */
    .form-actions > div:last-child {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

        .form-actions > div:last-child button {
            margin: 0 !important;
        }
}

/* Extra small devices */
@media (max-width: 575.98px) {
    /* Ensure no margins on any form buttons */
    #enrollmentForm button,
    .form-card button,
    .btn-sphere,
    .btn-outline-sphere {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Override any inline styles */
    [style*="margin"] {
        margin: 0 !important;
    }
}

/* Very small phones */
@media (max-width: 399.98px) {
    /* Force remove all button margins */
    button {
        margin: 0 !important;
    }
}