.blood-bank-form {
    margin-top: 20px;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 40px 57px;
    font-family: Poppins, sans-serif;
    color: rgba(116, 53, 53, 1);
    line-height: 1.4;
    justify-content: start;
    flex-wrap: wrap;
}

#kt_content.d-flex.flex-column.flex-column-fluid {
    margin-left: 0px;
}

.img-blood-bank {
    aspect-ratio: 1;
    object-fit: contain;
    object-position: center;
    width: 130px;
    height: 130px;
    border-radius: 17px;
    align-self: stretch;
    margin: auto 0;
}

.header-info-2 {
    align-self: stretch;
    display: flex;
    min-width: 240px;
    flex-direction: column;
    justify-content: start;
    width: 807px;
    margin: auto 0;
}

.custom-square-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;
}

@media (max-width: 991px) {
    .header-info-2 {
        max-width: 100%;
    }
}

.avatar {
    z-index: 10;
    border-radius: 0px 0px 0px 0px;
    max-width: 100%;
    width: 1101px;
    font-size: 31px;
    font-weight: 500;
    padding: 2px 0;
}

@media (max-width: 991px) {
    .avatar {
        max-width: 100%;
        padding-right: 20px;
    }
}

.fill-out-the-details-below-to-make-your-blood-bank-accessible-to-the-public {
    font-size: 22px;
    font-weight: 400;
    margin-top: 14px;
}

@media (max-width: 991px) {
    .fill-out-the-details-below-to-make-your-blood-bank-accessible-to-the-public {
        max-width: 100%;
    }
}

.-select {
    pointer-events: none;
    background-color: #f0f0f0;
}

.img-janata-darbar {
    height: 200px !important;
    border-radius: 10%;
    width: 100% !important;
}

@media (max-width: 768px) {
    .img-janata-darbar {
        width: 100% !important;
    }
}

.turnstile-wrapper {
    transform: scale(0.85);
    transform-origin: top left;
    width: fit-content;
}

/* Custom Lightweight Dropdown Styles - Replaces Select2 */
.custom-dropdown {
    position: relative !important;
    display: block !important;
    width: 100% !important;
}

.dropdown-input {
    width: 100% !important;
    padding: 0.775rem 2.25rem 0.775rem 1rem !important;
    border: 1px solid #e1e3ea !important;
    border-radius: 0.475rem !important;
    background: white !important;
    font-size: 1.075rem !important;
    cursor: pointer !important;
    outline: none !important;
    color: #5e6278 !important;
}

.dropdown-input:focus {
    border-color: #009ef7 !important;
    box-shadow: 0 0 0 2px rgba(0, 158, 247, 0.15) !important;
}

.dropdown-arrow {
    position: absolute !important;
    right: 1rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
    transition: transform 0.2s !important;
    z-index: 10 !important;
    color: #7e8299 !important;
}

.dropdown-options {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    border: 1px solid #e1e3ea !important;
    border-top: none !important;
    border-radius: 0 0 0.475rem 0.475rem !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    z-index: 9999 !important;
    display: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.dropdown-option {
    padding: 0.75rem 1rem !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
    border-bottom: 1px solid #f5f8fa !important;
    color: #3f4254 !important;
}

.dropdown-option:last-child {
    border-bottom: none !important;
}

.dropdown-option:hover {
    background-color: #f5f8fa !important;
}

.dropdown-option.selected {
    background-color: #e3f2fd !important;
    color: #009ef7 !important;
    font-weight: 500 !important;
}

.dropdown.open .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg) !important;
}

.dropdown.open .dropdown-options {
    display: block !important;
}

.dropdown-search {
    padding: 0.75rem !important;
    border-bottom: 1px solid #e1e3ea !important;
    background: #f9f9f9 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

.dropdown-search input,
.search-input {
    width: 100% !important;
    padding: 0.5rem 0.75rem !important;
    border: 1px solid #e1e3ea !important;
    border-radius: 0.375rem !important;
    outline: none !important;
    font-size: 0.95rem !important;
}

.dropdown-search input:focus,
.search-input:focus {
    border-color: #009ef7 !important;
    box-shadow: 0 0 0 2px rgba(0, 158, 247, 0.1) !important;
}


/* SweetAlert2 Custom Styling for Error Modal */
.swal2-popup-compact {
    font-size: 14px !important;
}

.swal2-popup .swal2-styled.swal2-confirm {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
    font-weight: 500 !important;
    padding: 8px 20px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    min-width: 80px !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.swal2-popup .swal2-styled.swal2-confirm:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
}

/* Success button styling */
.swal2-popup .swal2-styled.swal2-confirm.btn-success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

.swal2-popup .swal2-styled.swal2-confirm.btn-success:hover {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
}

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

/* Classes for inline styles */
.section-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.hidden {
    display: none !important;
}

.preview-container-wrapper {
    position: relative;
}

.preview-container {
    margin-top: 10px;
}

.remove-preview-icon {
    display: none;
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
}

.remove-preview-icon i {
    font-size: 24px;
    color: red;
}

/* Form Size Reduction - 5% smaller to appear less bulky */
#kt_modal_add_visitor_form {
    transform: scale(0.95);
    transform-origin: top center;
}

/* Reduce font sizes by ~5% */
#kt_modal_add_visitor_form .fs-6 {
    font-size: 1.02rem !important; /* Reduced from 1.075rem */
}

#kt_modal_add_visitor_form .section-header {
    font-size: 1.09rem !important; /* Reduced from ~1.15rem */
    padding: 9px 24px !important; /* Reduced from 10px 25px */
}

#kt_modal_add_visitor_form h1 {
    font-size: 1.9rem !important; /* Reduced from ~2rem */
}

/* Reduce padding and margins by ~5% */
#kt_modal_add_visitor_form .bordered-section {
    padding: 19px !important; /* Reduced from 20px */
    margin-bottom: 19px !important; /* Reduced from 20px */
}

#kt_modal_add_visitor_form .mb-10 {
    margin-bottom: 2.38rem !important; /* Reduced from 2.5rem */
}

#kt_modal_add_visitor_form .mb-7 {
    margin-bottom: 1.66rem !important; /* Reduced from 1.75rem */
}

#kt_modal_add_visitor_form .mb-2 {
    margin-bottom: 0.48rem !important; /* Reduced from 0.5rem */
}

#kt_modal_add_visitor_form .mt-12 {
    margin-top: 2.85rem !important; /* Reduced from 3rem */
}

/* Reduce input field sizes */
#kt_modal_add_visitor_form .form-control {
    font-size: 0.98rem !important; /* Reduced from ~1rem */
    padding: 0.59rem 0.83rem !important; /* Reduced from 0.625rem 0.875rem */
}

/* Reduce label sizes */
#kt_modal_add_visitor_form label.fs-6 {
    font-size: 1.02rem !important;
    margin-bottom: 0.48rem !important; /* Reduced from 0.5rem */
}

/* Reduce row gaps */
#kt_modal_add_visitor_form .row.g-9 {
    --bs-gutter-x: 1.43rem !important; /* Reduced from 1.5rem */
    --bs-gutter-y: 1.43rem !important;
}

/* Reduce section header icon size */
#kt_modal_add_visitor_form .section-header img {
    width: 19px !important; /* Reduced from 20px */
    height: 19px !important; /* Reduced from 20px */
    margin-right: 9px !important; /* Reduced from 10px */
}

/* Reduce button sizes slightly */
#kt_modal_add_visitor_form .btn {
    padding: 0.59rem 1.19rem !important; /* Reduced from 0.625rem 1.25rem */
    font-size: 0.98rem !important;
}

/* Reduce circle step indicator size */
#kt_modal_add_visitor_form .circle {
    width: 38px !important; /* Reduced from 40px */
    height: 38px !important; /* Reduced from 40px */
    font-size: 0.95rem !important; /* Reduced from 1rem */
}

#kt_modal_add_visitor_form .line {
    width: 57px !important; /* Reduced from 60px */
    margin: 0 9px !important; /* Reduced from 10px */
}

/* Reduce textarea sizes */
#kt_modal_add_visitor_form textarea.form-control {
    font-size: 0.98rem !important;
    padding: 0.59rem 0.83rem !important;
}

/* Reduce file upload button sizes */
#kt_modal_add_visitor_form input[type="file"] {
    font-size: 0.98rem !important;
}

/* Reduce checkbox and radio sizes */
#kt_modal_add_visitor_form .form-check-input {
    width: 1.19em !important; /* Reduced from 1.25em */
    height: 1.19em !important; /* Reduced from 1.25em */
}

#kt_modal_add_visitor_form .form-check-label {
    font-size: 1.02rem !important;
    padding-left: 0.48em !important; /* Reduced from 0.5em */
}

/* Reduce card body padding */
#kt_modal_add_visitor_form .card-body {
    padding: 1.43rem !important; /* Reduced from 1.5rem */
}

/* Reduce spacing between form sections */
#kt_modal_add_visitor_form .border-top.border-2 {
    margin-top: 0.95rem !important; /* Reduced from ~1rem */
    margin-bottom: 2.38rem !important; /* Reduced from 2.5rem */
}

/* Adjust container to compensate for scale */
#kt_content_container {
    padding-bottom: 1.5rem !important; /* Extra space for scaled form */
}

/* ========================================
   MOBILE VIEW OPTIMIZATIONS (320px - 767px)
   ======================================== */

@media (max-width: 767px) {
    /* Mobile Header Reordering - Image at top, then location, then contact */
    .header-container {
        flex-direction: column !important;
        flex-wrap: wrap !important;
    }

    .header-image-wrapper {
        order: 1 !important;
        width: 100% !important;
        margin-bottom: 1rem !important;
        flex-basis: 100% !important;
    }

    .header-location-wrapper {
        order: 2 !important;
        width: 100% !important;
        margin-bottom: 1rem !important;
        flex-basis: 100% !important;
    }

    .header-contact-wrapper {
        order: 3 !important;
        width: 100% !important;
        flex-basis: 100% !important;
    }

    /* Card Mobile Optimizations - Only show this section on mobile */
    .card {
        margin-bottom: 0.75rem !important;
        border: none !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    }

    .card.mb-5 {
        margin-bottom: 0.75rem !important;
    }

    .card.mb-xl-10 {
        margin-bottom: 0.75rem !important;
    }

    .card.mb-md-4 {
        margin-bottom: 0.75rem !important;
    }

    .card.mb-3 {
        margin-bottom: 0.75rem !important;
    }

    /* General Mobile Adjustments */
    .blood-bank-form {
        margin-top: 10px !important;
    }

    #kt_content.d-flex.flex-column.flex-column-fluid {
        margin-left: 0px !important;
        padding: 0 !important;
    }

    #kt_content_container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-bottom: 1rem !important;
    }

    /* Header/Image Adjustments */
    .card {
        margin-bottom: 1rem !important;
        border: none !important;
    }

    .card-body {
        padding: 1rem !important;
    }

    .img-janata-darbar {
        height: auto !important;
        max-height: 200px !important;
        border-radius: 8px !important;
        margin-bottom: 1rem !important;
    }

    /* Form Layout Mobile */
    #kt_modal_add_visitor_form {
        transform: scale(1) !important;
        transform-origin: top center;
    }

    /* Typography Adjustments */
    #kt_modal_add_visitor_form h1 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
        text-align: left !important;
    }

    #kt_modal_add_visitor_form .fs-6 {
        font-size: 0.95rem !important;
    }

    #kt_modal_add_visitor_form .section-header {
        font-size: 1rem !important;
        padding: 0.75rem 1rem !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        margin-bottom: 1rem !important;
    }

    #kt_modal_add_visitor_form label.fs-6 {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        margin-bottom: 0.35rem !important;
    }

    /* Row and Column Adjustments */
    #kt_modal_add_visitor_form .row {
        --bs-gutter-x: 0.75rem !important;
        --bs-gutter-y: 0.75rem !important;
    }

    #kt_modal_add_visitor_form .col-md-3,
    #kt_modal_add_visitor_form .col-md-4,
    #kt_modal_add_visitor_form .col-md-6,
    #kt_modal_add_visitor_form .col-md-12 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding-left: 0.375rem !important;
        padding-right: 0.375rem !important;
    }

    /* Form Control Adjustments */
    #kt_modal_add_visitor_form .form-control,
    #kt_modal_add_visitor_form .dropdown-input {
        font-size: 0.95rem !important;
        padding: 0.5rem 0.75rem !important;
        height: auto !important;
    }

    /* Dropdown Adjustments */
    #kt_modal_add_visitor_form .custom-dropdown {
        margin-bottom: 0.75rem !important;
    }

    #kt_modal_add_visitor_form .dropdown-arrow {
        right: 0.75rem !important;
    }

    #kt_modal_add_visitor_form .dropdown-options {
        max-height: 200px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    }

    #kt_modal_add_visitor_form .dropdown-option {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.9rem !important;
    }

    /* Spacing Adjustments */
    #kt_modal_add_visitor_form .mb-10 {
        margin-bottom: 1.5rem !important;
    }

    #kt_modal_add_visitor_form .mb-7 {
        margin-bottom: 1.25rem !important;
    }

    #kt_modal_add_visitor_form .mb-4 {
        margin-bottom: 0.75rem !important;
    }

    #kt_modal_add_visitor_form .mb-2 {
        margin-bottom: 0.35rem !important;
    }

    #kt_modal_add_visitor_form .mt-2 {
        margin-top: 0.5rem !important;
    }

    #kt_modal_add_visitor_form .mt-12 {
        margin-top: 1.5rem !important;
    }

    #kt_modal_add_visitor_form .mt-md-2 {
        margin-top: 0 !important;
    }

    /* Bordered Section */
    #kt_modal_add_visitor_form .bordered-section {
        padding: 1rem !important;
        margin-bottom: 1.5rem !important;
        border: 1px solid #e1e3ea !important;
        border-radius: 0.475rem !important;
    }

    #kt_modal_add_visitor_form .bordered-section.p-4 {
        padding: 1rem !important;
    }

    /* Checkbox and Radio */
    #kt_modal_add_visitor_form .form-check-input {
        width: 1.1em !important;
        height: 1.1em !important;
    }

    #kt_modal_add_visitor_form .form-check-label {
        font-size: 0.9rem !important;
        padding-left: 0.4em !important;
        margin-bottom: 0 !important;
    }

    #kt_modal_add_visitor_form .form-check {
        padding-left: 0 !important;
    }

    #kt_modal_add_visitor_form .d-flex.flex-wrap.align-items-center.text-gray-600.gap-5 {
        gap: 1rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    /* Text Area */
    #kt_modal_add_visitor_form textarea.form-control {
        font-size: 0.95rem !important;
        padding: 0.5rem 0.75rem !important;
        resize: vertical !important;
        min-height: 80px !important;
    }

    /* File Input */
    #kt_modal_add_visitor_form input[type="file"] {
        font-size: 0.85rem !important;
        padding: 0.5rem !important;
    }

    /* Section Header Icon */
    #kt_modal_add_visitor_form .section-header img {
        width: 18px !important;
        height: 18px !important;
        margin-right: 0.5rem !important;
        flex-shrink: 0 !important;
    }

    /* Step Indicator */
    #kt_modal_add_visitor_form .text-center.mb-10 {
        margin-bottom: 1rem !important;
        overflow-x: auto !important;
        padding: 0.5rem 0 !important;
    }

    #kt_modal_add_visitor_form .circle {
        width: 35px !important;
        height: 35px !important;
        font-size: 0.9rem !important;
        min-width: 35px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #kt_modal_add_visitor_form .line {
        width: 40px !important;
        margin: 0 0.5rem !important;
        display: inline-block !important;
    }

    /* Modal Footer */
    #kt_modal_add_visitor_form .modal-footer {
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding: 1rem 0 !important;
        border: none !important;
    }

    #kt_modal_add_visitor_form .modal-footer .btn {
        width: 100% !important;
        padding: 0.5rem 1rem !important;
        font-size: 0.95rem !important;
    }

    #kt_modal_add_visitor_form .modal-footer .discard-btn {
        order: 2 !important;
    }

    /* Border and Lines */
    #kt_modal_add_visitor_form .border-top.border-2.border-secondary {
        margin-top: 0.75rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* Hidden Field Container */
    #kt_modal_add_visitor_form #otherIdTypeContainer,
    #kt_modal_add_visitor_form #other_category_field {
        display: none !important;
    }

    #kt_modal_add_visitor_form #otherIdTypeContainer.visible,
    #kt_modal_add_visitor_form #other_category_field.visible {
        display: block !important;
    }

    /* Error Messages */
    .text-danger {
        font-size: 0.85rem !important;
        margin-top: 0.25rem !important;
        display: block !important;
    }

    /* Mobile-specific flex adjustments */
    .d-flex {
        flex-wrap: wrap !important;
    }

    #kt_modal_add_visitor_form .d-flex.justify-content-between.align-items-start.flex-wrap {
        gap: 0.5rem !important;
    }

    /* Search Input */
    #kt_modal_add_visitor_form .login-input {
        font-size: 0.95rem !important;
        padding: 0.5rem 0.75rem !important;
    }

    #kt_modal_add_visitor_form .search-icon-right {
        width: 20px !important;
        height: 20px !important;
        right: 0.75rem !important;
    }

    /* Header Info Mobile */
    .header-info {
        gap: 1rem !important;
        flex-direction: column !important;
    }

    .fixed-width-desktop {
        width: 100% !important;
        max-width: none !important;
    }

    .text-brown {
        font-size: 1.1rem !important;
    }

    /* Reduce scale transforms for small devices */
    #kt_modal_add_visitor_form .capitalize {
        text-transform: capitalize !important;
    }

    /* Turnstile Captcha Mobile */
    .turnstile-wrapper {
        transform: scale(0.75) !important;
        transform-origin: top left !important;
        margin: 0.5rem 0 !important;
    }
}

/* ========================================
   EXTRA SMALL DEVICES (320px - 479px)
   ======================================== */

@media (max-width: 479px) {
    #kt_content_container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .card-body {
        padding: 0.75rem !important;
    }

    #kt_modal_add_visitor_form h1 {
        font-size: 1.25rem !important;
    }

    #kt_modal_add_visitor_form .section-header {
        font-size: 0.9rem !important;
        padding: 0.5rem 0.75rem !important;
    }

    #kt_modal_add_visitor_form label.fs-6 {
        font-size: 0.85rem !important;
    }

    #kt_modal_add_visitor_form .bordered-section {
        padding: 0.75rem !important;
    }

    #kt_modal_add_visitor_form .circle {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.8rem !important;
    }

    #kt_modal_add_visitor_form .line {
        width: 30px !important;
    }

    #kt_modal_add_visitor_form textarea.form-control {
        min-height: 70px !important;
    }

    .text-brown {
        font-size: 1rem !important;
    }
}

/* ========================================
   SMALL DEVICES (480px - 767px)
   ======================================== */

@media (max-width: 767px) and (min-width: 480px) {
    #kt_content_container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    #kt_modal_add_visitor_form h1 {
        font-size: 1.4rem !important;
    }

    #kt_modal_add_visitor_form .circle {
        width: 33px !important;
        height: 33px !important;
    }
}