/* Custom Datepicker Styles */
/* Fix jQuery UI Datepicker navigation buttons */
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    cursor: pointer;
    width: 2em;
    height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
    background-image: none !important;
    text-indent: 0 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    font-size: 1.2em;
    color: white !important;
}

.ui-datepicker .ui-datepicker-prev span:before {
    content: "◀";
    color: white;
    font-size: 16px;
}

.ui-datepicker .ui-datepicker-next span:before {
    content: "▶";
    color: white;
    font-size: 16px;
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.icon-white {
    fill: white;
}

.btn-home {
    background: var(--accent-color, #1565c0);
    color: white !important;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition, all 0.3s ease);
}

/* Step Progress Styles */
.step-progress-container {
    background: #f8f9fa;
    padding: 10px 0;
    border-bottom: 2px solid #e9ecef;
    margin-top: 76px;
    /* Adjusted for fixed navbar */
}

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

.step-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 4px;
    background: #e9ecef;
    z-index: 0;
}

.step-progress-line {
    position: absolute;
    top: 20px;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #0066cc, #0052a3);
    z-index: 1;
    transition: width 0.3s ease;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
    max-width: 150px;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    position: relative;
    font-size: 14px;
}

.step-item.completed .step-circle {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

.step-item.active .step-circle {
    background: #0066cc;
    border-color: #0066cc;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.2);
}

.step-item.pending .step-circle {
    background: #fff;
    border-color: #e9ecef;
    color: #6c757d;
}

.step-label {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.step-item.completed .step-label {
    color: #28a745;
}

.step-item.active .step-label {
    color: #0066cc;
}

.step-checkmark {
    font-size: 20px;
    line-height: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .step-progress-container {
        padding: 8px 0;
    }

    .step-progress {
        max-width: 100%;
        padding: 0 10px;
    }

    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .step-label {
        font-size: 11px;
        white-space: nowrap;
    }

    .step-progress::before,
    .step-progress-line {
        top: 20px;
    }
}

@media (max-width: 576px) {
    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }

    .step-label {
        font-size: 10px;
        white-space: nowrap;
    }

    .step-item {
        max-width: 80px;
    }
}

.expiry-message-row {
    display: flex;
    gap: 30px;
    margin-top: 3px;
    font-size: 13px;
}

/* Button Label Styles */
.button-with-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.button-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
    font-weight: 500;
    margin-top: 4px;
}

.button-with-label-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 60px;
}

.button-label-inline {
    font-size: 0.7rem;
    color: #6c757d;
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.2;
}

/* Responsive adjustments for button labels */
@media (max-width: 768px) {
    .button-label {
        font-size: 0.8rem;
    }

    .button-label-inline {
        font-size: 0.65rem;
    }

    .editor-controls-compact {
        flex-wrap: wrap;
        justify-content: center;
    }

    .button-with-label-inline {
        min-width: 50px;
    }
}

@media (max-width: 576px) {
    .button-label {
        font-size: 0.75rem;
    }

    .button-label-inline {
        font-size: 0.6rem;
    }

    .button-with-label-inline {
        min-width: 45px;
    }
}

.form-control {
    height: 48px;
    /* change input & select height */
    font-size: 16px;
    /* text size */
    padding: 10px 14px !important;
    /* inner spacing */
    border-radius: 6px;
    /* rounded corners */
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* Bold font for input values (givename, surname, etc.) */
.form-group-icon input[type="text"],
.form-group-icon input[type="email"],
.form-group-icon input[type="tel"],
.form-group-icon textarea,
.form-group-icon select {
    font-weight: bold;
}

#frontPreviewContainer {
    height: 300px; /* or any fixed value you want */
    overflow: auto;
}

#frontEditCanvas {
    width: 400px;
    height: 300px;
    display: block;
}

.button-right-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
}

/* Travel Details - Read-only when editing additional applicants ($i != 0) */
.travel-details-readonly input[readonly],
.travel-details-readonly textarea[readonly],
.travel-details-readonly select:disabled {
    background-color: #e9ecef !important;
    cursor: not-allowed;
}

/* Contact fields (mobile, email, emailcopy) - Read-only when sme != 0 */
.contact-readonly input[readonly] {
    background-color: #e9ecef !important;
    cursor: not-allowed;
}