/* ========================================
   Modern Registration Form Styles
   Aligned with Login Page Design
   ======================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
}

/* Registration Container */
#grad1 {

    min-height: 100vh;
    padding: 40px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Registration Card */
#grad1 .card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    border: none;
    position: relative;
    margin: 20px auto;
    max-width: 1200px;
}

#grad1 .card .adjustableFont1 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #333;
    padding: 30px 20px 10px;
    background: linear-gradient(135deg, #f6e0c7 0%, #fef5ec 100%);
    margin: 0;
}

/* Form Structure */
#msform {
    text-align: center;
    position: relative;
    margin-top: 0;
}

#msform fieldset {
    background: white;
    border: 0 none;
    border-radius: 0;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    position: relative;
}

#msform fieldset:not(:first-of-type) {
    display: none;
}

#msform fieldset .form-card {
    background: white;
    border: 0 none;
    border-radius: 0;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    position: relative;
    text-align: left;
    box-shadow: none;
}

/* Progress Bar */
#progressbar {
    overflow: hidden;
    counter-reset: step;
    display: flex;
    justify-content: space-around;
    padding: 20px 40px;
    background: #f8f9fa;
    margin-bottom: 30px;
    list-style: none;
}

#progressbar li {
    list-style-type: none;
    color: #999;
    text-transform: uppercase;
    font-size: 11px;
    width: 25%;
    float: left;
    position: relative;
    text-align: center;
    font-weight: 600;
}

#progressbar li:before {
    content: counter(step);
    counter-increment: step;
    width: 40px;
    height: 40px;
    line-height: 40px;
    display: block;
    font-size: 16px;
    color: #fff;
    background: #ddd;
    border-radius: 50%;
    margin: 0 auto 10px auto;
    font-weight: 600;
    transition: all 0.3s ease;
}

#progressbar li:after {
    content: '';
    width: 100%;
    height: 3px;
    background: #ddd;
    position: absolute;
    left: -50%;
    top: 20px;
    z-index: -1;
    transition: all 0.3s ease;
}

#progressbar li:first-child:after {
    content: none;
}

#progressbar li.active {
    color: #11733a;
}

#progressbar li.active:before {
    background: linear-gradient(135deg, #11733a 0%, #57b846 100%);
    box-shadow: 0 4px 15px rgba(87, 184, 70, 0.3);
}

#progressbar li.active:after {
    background: #11733a;
}

/* Form Titles and Text */
.fs-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.adjustableFont3 {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 15px 0;
}

/* Form Inputs - Modern Style matching login */
#msform input[type="text"],
#msform input[type="email"],
#msform input[type="password"],
#msform input[type="tel"],
#msform textarea,
#msform select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

#msform input:focus,
#msform textarea:focus,
#msform select:focus {
    outline: none;
    border-color: #f17b20;
    box-shadow: 0 4px 20px rgba(241, 123, 32, 0.15);
    background: #fff;
}

#msform input::placeholder {
    color: #999;
    font-size: 14px;
}

/* Select Dropdowns */
select.list-dt {
    width: 100%;
    padding: 12px 15px;
    margin: 5px 0 20px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

select.list-dt:focus {
    outline: none;
    border-color: #f17b20;
    box-shadow: 0 4px 20px rgba(241, 123, 32, 0.15);
}

/* Checkboxes - Modern Style */
.course-checkbox-wrapper {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    text-align: center;
}

.course-checkbox-wrapper:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.course-checkbox-wrapper .form-check-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0 auto 10px;
    display: block;
    border: 2px solid #f17b20;
}

.course-checkbox-wrapper .form-check-input:checked {
    background-color: #11733a;
    border-color: #11733a;
}

.course-checkbox-wrapper .form-check-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: block;
    cursor: pointer;
}

.course-checkbox-wrapper .form-check-label i {
    color: #f17b20;
}

/* Action Buttons - Modern Style matching login */
#msform .action-button {
    background: linear-gradient(135deg, #11733a 0%, #57b846 100%);
    border: none;
    color: white;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px 5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
}

#msform .action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(87, 184, 70, 0.3);
}

#msform .action-button-previous {
    background: #6c757d;
    border: none;
    color: white;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px 5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
}

#msform .action-button-previous:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(108, 117, 125, 0.3);
}

#msform .action-button:disabled,
#msform .action-button-previous:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Tables - Modern Style */
#msform .table {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

#msform .table thead {
    background: linear-gradient(135deg, #f6e0c7 0%, #fef5ec 100%);
}

#msform .table thead tr th {
    color: #333;
    font-weight: 600;
    font-size: 13px;
    padding: 12px;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#msform .table tbody tr {
    transition: all 0.3s ease;
    background: #fff;
}

#msform .table tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

#msform .table tbody tr.bg-success {
    background-color: #d4edda !important;
}

#msform .table tbody tr td {
    padding: 12px;
    font-size: 14px;
    color: #666;
    border-top: 1px solid #dee2e6;
    word-wrap: break-word;
}

/* Alert Messages */
.alert {
    display: none;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #dc3545;
    color: #721c24;
}

#accountError,
#studentError,
#emergencyContactError,
#registrationError {
    display: none;
}

/* Success Screen */
.fit-image {
    width: 100%;
    max-width: 96px;
    height: auto;
    object-fit: cover;
}

/* Responsive Design - Single Breakpoint at 991px */
@media (max-width: 991px) {
    #grad1 .card {
        margin: 10px;
    }

    #msform fieldset .form-card {
        padding: 20px;
    }

    #grad1 .card .adjustableFont1 {
        font-size: 24px !important;
    }

    .fs-title {
        font-size: 20px;
    }

    #progressbar {
        padding: 15px 20px;
    }

    #progressbar li {
        font-size: 10px;
    }

    #progressbar li:before {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 14px;
    }

    #progressbar li:after {
        top: 15px;
    }

    #msform .action-button,
    #msform .action-button-previous {
        padding: 10px 20px;
        font-size: 12px;
        min-width: 100px;
    }

    .table {
        font-size: 12px;
    }

    .form-check {
        padding: 10px;
    }
}

/* Animations */
@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Smooth transitions for registration form */
#grad1 * {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

#msform button,
#msform input,
#msform select,
#msform .form-control {
    transition: all 0.3s ease;
}

/* Loading state for buttons */
.action-button.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom scrollbar for modern look */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Ensure proper table layout */
#msform table {
    width: 100%;
    table-layout: fixed;
}

#msform table td {
    word-wrap: break-word;
}