/* ===================================
   Application Form Wizard Styles
   =================================== */

/* Progress Bar Container */
.wizard-progress-container {
    margin-bottom: 40px;
    padding: 20px 0;
}

.wizard-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 0 auto;
    max-width: 900px;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.wizard-progress-line {
    position: absolute;
    top: 30px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #5cb85c 0%, #4cae4c 100%);
    transition: width 0.4s ease;
    z-index: 1;
}

.wizard-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.wizard-step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e0e0e0;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #999;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.wizard-step.active .wizard-step-circle {
    border-color: #5cb85c;
    color: #5cb85c;
    background: #f0f9f0;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(92, 184, 92, 0.3);
}

.wizard-step.completed .wizard-step-circle {
    border-color: #5cb85c;
    background: #5cb85c;
    color: #fff;
}

.wizard-step-title {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-top: 8px;
}

.wizard-step.active .wizard-step-title {
    color: #5cb85c;
    font-weight: 700;
}

.wizard-step.completed .wizard-step-title {
    color: #5cb85c;
}

/* Step Content Cards */
.wizard-step-content {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.wizard-step-content.active {
    display: block;
}

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

.wizard-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.wizard-card-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.wizard-card-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.wizard-card-header h3 i {
    margin-right: 10px;
    color: #5cb85c;
}

.wizard-card-subtitle {
    color: #666;
    margin-top: 8px;
    font-size: 14px;
}

/* Form Enhancements */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    display: block;
}

.form-group label .required {
    color: #d9534f;
    margin-left: 3px;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    z-index: 2;
}

.input-icon-wrapper .form-control {
    padding-left: 38px;
}

.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 14px;
    transition: all 0.3s ease;
    font-size: 14px;
    height: auto;
    min-height: 42px;
}

select.form-control {
    line-height: 1.5;
    padding-top: 8px;
    padding-bottom: 8px;
}

.form-control:focus {
    border-color: #5cb85c;
    box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.1);
    outline: none;
}

.form-control.is-valid {
    border-color: #5cb85c;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%235cb85c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
}

.form-control.is-invalid {
    border-color: #d9534f;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%23d9534f' d='M6 0c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6 2.69-6 6-6zM4.5 8.5L6 7l1.5 1.5L8.5 7.5 7 6l1.5-1.5L7.5 3.5 6 5 4.5 3.5 3.5 4.5 5 6 3.5 7.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
}

.help-block {
    color: #d9534f;
    font-size: 13px;
    margin-top: 6px;
    display: block;
    animation: shake 0.3s;
}

.help-block.success {
    color: #5cb85c;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Has Error State */
.form-group.has-error .form-control {
    border-color: #d9534f;
}

.form-group.has-error label {
    color: #d9534f;
}

.form-group.has-error {
    background: #fff5f5;
    padding: 10px;
    border-radius: 6px;
    border: 2px solid #d9534f;
    animation: shake 0.3s;
}

/* Info Box */
.info-box {
    background: #f0f9ff;
    border-left: 4px solid #5bc0de;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.info-box i {
    color: #5bc0de;
    margin-right: 10px;
}

.warning-box {
    background: #fcf8e3;
    border-left: 4px solid #f0ad4e;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.warning-box i {
    color: #f0ad4e;
    margin-right: 10px;
}

.success-box {
    background: #dff0d8;
    border-left: 4px solid #5cb85c;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.success-box i {
    color: #5cb85c;
    margin-right: 10px;
}

/* Address Confirmation Box */
.address-confirmation-box {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    animation: slideInDown 0.4s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.address-confirmation-box h4 {
    color: #333;
    margin-top: 10px;
}

.address-confirmation-box .btn {
    margin-right: 10px;
    padding: 10px 30px;
}

/* Table Enhancements */
.table-enhanced {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.table-enhanced thead {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
}

.table-enhanced thead th {
    border: none;
    color: #555;
    font-weight: 600;
    padding: 15px 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-enhanced tbody td {
    padding: 12px 10px;
    vertical-align: middle;
    border-color: #f0f0f0;
}

.table-enhanced .form-control {
    font-size: 13px;
}

.table-enhanced textarea.form-control {
    min-height: 60px;
}

/* Button Enhancements */
.btn {
    border-radius: 6px;
    padding: 10px 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #5cb85c 0%, #4cae4c 100%);
    box-shadow: 0 4px 6px rgba(92, 184, 92, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4cae4c 0%, #449d44 100%);
    box-shadow: 0 6px 12px rgba(92, 184, 92, 0.3);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #5cb85c 0%, #4cae4c 100%);
}

.btn-success:hover {
    background: linear-gradient(135deg, #4cae4c 0%, #449d44 100%);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #d9534f 0%, #c9302c 100%);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c9302c 0%, #ac2925 100%);
    transform: translateY(-1px);
}

.btn-default {
    background: #fff;
    border: 2px solid #e0e0e0;
    color: #666;
}

.btn-default:hover {
    border-color: #ccc;
    background: #f9f9f9;
}

.btn-lg {
    padding: 12px 32px;
    font-size: 15px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Navigation Buttons */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.wizard-navigation .btn {
    min-width: 120px;
}

.wizard-navigation .btn i {
    margin-right: 8px;
}

.wizard-navigation .btn.btn-next i {
    margin-left: 8px;
    margin-right: 0;
}

/* Rules and Regulations */
.rules-container {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.rules-container ol {
    padding-left: 25px;
}

.rules-container li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.checkbox-large {
    transform: scale(1.3);
    margin-right: 10px;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .wizard-progress {
        flex-wrap: wrap;
    }

    .wizard-step {
        flex: 0 0 50%;
        margin-bottom: 20px;
    }

    .wizard-progress::before {
        display: none;
    }

    .wizard-step-circle {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .wizard-step-title {
        font-size: 12px;
    }

    .wizard-card {
        padding: 20px 15px;
    }

    .table-enhanced {
        font-size: 12px;
    }

    .wizard-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .wizard-navigation .btn {
        width: 100%;
    }
}

/* Tooltip Enhancement */
.tooltip-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: #5bc0de;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    margin-left: 5px;
    cursor: help;
}

/* Success Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.success-checkmark .check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #5cb85c;
}

.success-checkmark .check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.success-checkmark .check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}

.success-checkmark .icon-line {
    height: 5px;
    background-color: #5cb85c;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.success-checkmark .icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.success-checkmark .icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 19px;
    }
    54% {
        width: 0;
        left: 1px;
        top: 19px;
    }
    70% {
        width: 50px;
        left: -8px;
        top: 37px;
    }
    84% {
        width: 17px;
        left: 21px;
        top: 48px;
    }
    100% {
        width: 25px;
        left: 14px;
        top: 45px;
    }
}

@keyframes icon-line-long {
    0% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    65% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    84% {
        width: 55px;
        right: 0px;
        top: 35px;
    }
    100% {
        width: 47px;
        right: 8px;
        top: 38px;
    }
}

/* ===================================
   Child Cards Styling
   =================================== */

#childrenCardsContainer {
    margin-bottom: 20px;
}

.child-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.child-card:hover {
    border-color: #5cb85c;
    box-shadow: 0 4px 12px rgba(92, 184, 92, 0.15);
}

.child-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.child-card-header h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.child-card-header h4 i {
    margin-right: 8px;
    color: #5cb85c;
}

.child-card .form-group {
    margin-bottom: 15px;
}

.child-card .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.child-card .form-control {
    font-size: 14px;
}

.child-card textarea.form-control {
    resize: vertical;
    min-height: 60px;
}

.addMoreChildButton {
    padding: 10px 30px;
    font-weight: 600;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .child-card {
        padding: 15px;
    }

    .child-card-header h4 {
        font-size: 16px;
    }

    .child-card .form-group {
        margin-bottom: 12px;
    }

    .child-card-header .removeChildButton {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* Address Validated Section */
#addressValidatedDiv {
    clear: both;
    width: 100%;
    margin-top: 20px;
}

#addressValidatedDiv .row {
    margin-left: -15px;
    margin-right: -15px;
}

#continueToChildrenDiv {
    clear: both;
    width: 100%;
    margin-top: 30px;
}

#continueToChildrenDiv .wizard-navigation {
    clear: both;
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
}

/* Ensure address fields clear properly */
.appendedAddressGroup {
    clear: both;
}

/* Mobile adjustments for address section */
@media (max-width: 767px) {
    #addressValidatedDiv {
        margin-top: 15px;
    }

    #continueToChildrenDiv {
        margin-top: 20px;
    }

    #continueToChildrenDiv .wizard-navigation {
        flex-direction: column;
        gap: 10px;
    }

    #continueToChildrenDiv .wizard-navigation .btn {
        width: 100%;
    }
}

