/**
 * SOVA Lost and Found Public Form CSS
 * This file contains all styles for the public lost and found form
 */

/* Force light mode for all elements */
html {
    color-scheme: light only;
}

/* Modern CSS Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #1166ad;
    --primary-dark: #0d5999;
    --secondary-color: #f0ad4e;
    --text-color: #333;
    --text-color-light: #666;
    --error-color: #d9534f;
    --border-color: #ccc;
    --background-light: #F1F4F9;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
    --border-radius: 8px;
    --input-height: 48px;
    --spacing-unit: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-light);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    touch-action: manipulation;
}

/* Modern Container Styles */
.content-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-unit);
    background-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.panel {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px var(--shadow-color);
    margin-bottom: var(--spacing-unit);
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
}

.panel-body {
    padding: calc(var(--spacing-unit) * 1.5);
    background: #fff;
    color: var(--text-color);
}

/* Typography */
h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-unit);
    font-weight: 600;
}

p {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* Form Elements */
.form-group {
    margin-bottom: var(--spacing-unit);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    height: var(--input-height);
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #fff;
    color: #333;
    transition: all var(--transition-speed);
    -webkit-appearance: none;
    appearance: none;
}

/* Input Group for QR Code Scanner */
.input-group {
    display: flex;
    position: relative;
}

.input-group .form-control {
    flex: 1 1 auto;
    width: 1%;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-append {
    display: flex;
    margin-left: -1px;
}

.input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    height: var(--input-height);
    padding: 0 15px;
}

.btn-outline-secondary {
    color: var(--text-color);
    border: 1px solid var(--border-color);
    background-color: #f8f9fa;
}

.btn-outline-secondary:hover {
    background-color: #e9ecef;
}

/* QR Scanner Styles */
#qr_scanner_container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    border-radius: var(--border-radius);
    background-color: #000;
    margin-bottom: 1rem;
}

#qr_scanner_video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* QR Scanner Disclaimer */
.qr-scanner-disclaimer {
    margin-bottom: 1.5rem;
    padding: 16px 20px;
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(135deg, #e7f3ff 0%, #d6e9ff 100%);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(17, 102, 173, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.qr-scanner-disclaimer i {
    font-size: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.qr-scanner-disclaimer .disclaimer-content {
    flex: 1;
}

.qr-scanner-disclaimer strong {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 15px;
    font-weight: 600;
}

.qr-scanner-disclaimer p,
.qr-scanner-disclaimer {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
}

.qr-scanner-disclaimer strong:not(:first-child) {
    display: inline;
    font-weight: 700;
    color: var(--primary-color);
}

/* QR Code Targeting Overlay */
.qr-target-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: none; /* Hidden by default, shown when camera starts */
    align-items: center;
    justify-content: center;
}

.qr-target-frame {
    position: relative;
    width: 250px;
    height: 250px;
    min-width: 250px;
    min-height: 250px;
    max-width: 250px;
    max-height: 250px;
    aspect-ratio: 1 / 1 !important; /* Force square shape */
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.9); /* Very dark overlay outside reticle */
    flex-shrink: 0; /* Prevent shrinking */
}

.qr-target-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #00ff00;
}

.qr-corner-top-left {
    top: -3px;
    left: -3px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 8px;
}

.qr-corner-top-right {
    top: -3px;
    right: -3px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 8px;
}

.qr-corner-bottom-left {
    bottom: -3px;
    left: -3px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 8px;
}

.qr-corner-bottom-right {
    bottom: -3px;
    right: -3px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 8px;
}

.qr-target-instruction {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.qr-target-instruction i {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
}

.qr-target-instruction p {
    margin: 0;
    font-size: 12px;
}

/* QR Scanner Modal Improvements */
#qr_scanner_modal .modal-dialog {
    max-width: 600px;
    margin: 2rem auto;
}

#qr_scanner_modal .modal-content {
    border-radius: var(--border-radius);
    overflow: hidden;
}

#qr_scanner_modal .modal-header {
    background-color: var(--primary-color);
    color: #fff;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

#qr_scanner_modal .modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

#qr_scanner_modal .modal-header .close {
    color: #fff;
    opacity: 0.9;
    font-size: 1.5rem;
    text-shadow: none;
}

#qr_scanner_modal .modal-header .close:hover {
    opacity: 1;
}

#qr_scanner_modal .modal-body {
    padding: 1.5rem;
    text-align: center;
}

/* Ensure modal shows properly with fade animation */
#qr_scanner_modal.fade.show {
    opacity: 1 !important;
}

#qr_scanner_modal.show {
    display: block !important;
}

#qr_scanner_modal:not(.show) {
    display: none !important;
}

#qr_scanner_modal .modal-dialog {
    transition: transform 0.3s ease-out;
}

#qr_scanner_modal.fade.show .modal-dialog,
#qr_scanner_modal.show .modal-dialog {
    transform: translate(0, 0);
}

/* Override Bootstrap fade rule for QR scanner modal */
#qr_scanner_modal.fade:not(.show) {
    opacity: 0;
    transition: opacity 0.15s linear;
}

#qr_scanner_modal.fade.show {
    opacity: 1 !important;
}

#qr_scanner_modal .modal-body p {
    font-size: 16px;
    color: var(--text-color-light);
    margin-bottom: 0;
}

#qr_scanner_modal .modal-footer {
    border-top: 1px solid rgba(0,0,0,0.1);
    padding: 1rem 1.5rem;
    justify-content: center;
}

#qr_scanner_modal .modal-footer .btn {
    min-width: 120px;
    font-weight: 600;
}

/* Adjust width of hotel_id input field */
#hotel_id {
    max-width: calc(100% - 100px);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(17, 102, 173, 0.1);
    outline: none;
    background-color: #fff;
    color: #333;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
    background-color: #fff;
    color: #333;
}

/* Modern Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--input-height);
    padding: 0 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: #fff;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.btn:active::after {
    opacity: 0.2;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-warning {
    background-color: var(--secondary-color);
    color: #fff;
}

.btn-block {
    width: 100%;
}

/* Map Container */
#map {
    height: 300px;
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: relative;
    display: block !important;
}

/* Section Visibility Control - IMPORTANT */
#location_confirmation,
#right_div,
#not_found_div,
#floating-back-btn {
    display: none;
}

.start-here {
    display: block;
}

/* Active sections */
.active {
    display: block !important;
}

/* Full Width Right Div */
#right_div.full-width {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Ensure form is visible */
#right_div.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Ensure form panels are visible */
#right_div.active .panel,
#right_div.full-width .panel {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

#right_div.active .panel-body,
#right_div.full-width .panel-body {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Floating Back Button */
.floating-back-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    /* Use flex to perfectly center the icon. jQuery's .show() sets display:block
       inline; force flex so centering always works. */
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    cursor: pointer;
    transition: all 0.3s ease;
}

.floating-back-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

.floating-back-btn i {
    font-size: 24px;
    /* Normalize glyph box so it visually centers within the circle */
    line-height: 1;
    display: inline-block;
}

/* Error Messages */
.error-message {
    display: none;
    color: #dc3545; /* Bootstrap danger red */
    font-size: 14px;
    margin-top: 5px;
    transition: opacity 0.3s ease;
    opacity: 0;
    font-weight: 500;
}

/* Specific styling for the hotel ID error message */
.error-message.err {
    margin-top: 8px;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
    opacity: 1;
    animation: fadeIn 0.3s ease-in-out;
}

/* Add a fade-out animation for when the error message is hidden */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.error-message.hide {
    animation: fadeOut 0.3s ease-in-out;
}

.is-invalid {
    border-color: var(--error-color) !important;
}

/* Mobile-friendly toggle buttons for Urgent/Perishable */
.lf-toggle {
    position: relative;
}

.lf-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lf-toggle label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: #fff;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: .2px;
    text-align: center;
    user-select: none;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .1s ease;
}

.lf-toggle label:active {
    transform: scale(0.98);
}

/* When checked, invert colors */
.lf-toggle input[type="checkbox"]:checked + label,
.lf-toggle input[type="checkbox"]:checked ~ label {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.lf-toggle input[type="checkbox"]:focus + label,
.lf-toggle input[type="checkbox"]:focus ~ label {
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2);
}

@media (max-width: 576px) {
    .lf-toggle label {
        height: 60px;
        font-size: 17px;
    }
}

/* Required Field Indicator */
.required {
    color: var(--error-color);
    font-weight: bold;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal Styles */
.modal {
    z-index: 1050;
}

.modal-backdrop {
    z-index: 1040;
}

.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 5px 15px var(--shadow-color);
    position: relative;
    z-index: 1051;
}

#qr_scanner_modal {
    z-index: 1055 !important;
}

#qr_scanner_modal .modal-dialog {
    z-index: 1056 !important;
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 15px 20px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid rgba(0,0,0,0.1);
    padding: 15px 20px;
}

/* Checkbox Styles */
.checkbox {
    margin-bottom: 15px;
    position: relative;
}

.checkbox input[type="checkbox"] {
    margin-right: 8px;
}

.terms-checkbox label {
    font-size: 14px;
    line-height: 1.4;
}

/* Ensure the checkbox group isn't flush with the left edge */
.terms-checkbox {
    padding-left: 10px;
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-success {
    background-color: #dff0d8;
    border-color: #d6e9c6;
    color: #3c763d;
}

/* Loading States */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Google Maps Styles */
.gm-style .gm-style-iw-c {
    top: -20px !important;
}

.gm-ui-hover-effect {
    display: none !important;
}

.gm-style-iw-d {
    overflow: hidden !important;
    padding: 8px !important;
    max-height: none !important;
}

.gm-style-iw-c {
    padding: 8px !important;
}

.gm-style {
    padding-top: 30px !important;
}

/* Debug Outline */
.debug-outline {
    outline: 2px solid red !important;
}

/* Center map-div on desktop */
@media (min-width: 768px) {
    .col-md-6.map-div {
        -ms-flex: 0 0 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Desktop/Laptop Font Sizing - Larger screens get bigger fonts */
@media (min-width: 769px) {
    body {
        font-size: 18px;
        background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
        min-height: 100vh;
    }
    
    /* Add background color to form container to make it stand out */
    .content-wrap {
        padding: calc(var(--spacing-unit) * 3);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
    }
    
    .panel {
        background: #ffffff;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
        border: 1px solid rgba(17, 102, 173, 0.1);
        width: 100%;
        max-width: 900px;
        margin: 0 auto;
    }
    
    .panel-body {
        background: #ffffff;
    }
    
    /* Add subtle background to the main content area */
    .content-wrap > .panel {
        background: #ffffff;
    }
    
    /* Center the location confirmation panel */
    #location_confirmation .panel {
        max-width: 900px;
        margin: 0 auto;
    }
    
    h3 {
        font-size: 2rem;
        margin-bottom: calc(var(--spacing-unit) * 1.5);
    }
    
    .form-control {
        font-size: 18px !important;
        padding: 14px 18px;
        height: 52px;
    }
    
    /* Ensure all input types get larger font size */
    input.form-control,
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    select.form-control,
    select {
        font-size: 18px !important;
        padding: 14px 18px;
        height: 52px;
    }
    
    textarea.form-control {
        font-size: 18px !important;
        padding: 14px 18px;
    }
    
    /* Select dropdowns need special handling */
    select.form-control,
    select {
        font-size: 18px !important;
        line-height: 1.5;
        padding: 14px 18px;
        height: 52px;
    }
    
    label {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .btn {
        font-size: 18px;
        height: 52px;
        padding: 0 28px;
    }
    
    .btn-lg {
        font-size: 20px;
        height: 56px;
        padding: 0 32px;
    }
    
    /* Ensure submit button gets larger font size */
    #formSubmit {
        font-size: 18px !important;
        height: 52px !important;
        padding: 0 28px !important;
    }
    
    /* QR scanner button should match input height and font size */
    #qr_scanner_btn {
        font-size: 18px !important;
        height: 52px !important;
        width: 52px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    #qr_scanner_btn i {
        font-size: 20px !important;
    }
    
    .lf-toggle label {
        font-size: 18px;
        height: 60px;
    }
    
    .error-message {
        font-size: 15px;
    }
    
    .terms-checkbox label {
        font-size: 16px;
    }
    
    p {
        font-size: 18px;
        line-height: 1.7;
    }
    
    /* Modal font sizing for desktop */
    .modal-title {
        font-size: 1.75rem !important;
    }
    
    .modal-body {
        font-size: 18px !important;
        line-height: 1.7;
    }
    
    .modal-body p {
        font-size: 18px !important;
        line-height: 1.7;
        margin-bottom: 1rem;
    }
    
    .modal-body strong {
        font-size: 19px !important;
        font-weight: 600;
    }
    
    .modal-body ul,
    .modal-body ol {
        font-size: 18px !important;
        line-height: 1.7;
        margin-bottom: 1rem;
        padding-left: 2rem !important;
        margin-left: 0 !important;
        list-style-position: outside;
    }
    
    .modal-body li {
        font-size: 18px !important;
        line-height: 1.7;
        margin-bottom: 0.5rem;
        padding-left: 0.5rem;
        list-style-position: outside;
    }
    
    .modal-body a {
        font-size: 18px !important;
    }
    
    /* Terms and Privacy Policy modals specifically */
    #terms_condition_modal .modal-body,
    #privacy_policy_modal .modal-body {
        font-size: 18px !important;
    }
    
    #terms_condition_modal .modal-body p,
    #privacy_policy_modal .modal-body p {
        font-size: 18px !important;
        line-height: 1.7;
    }
    
    #terms_condition_modal .modal-body strong,
    #privacy_policy_modal .modal-body strong {
        font-size: 19px !important;
    }
    
    #terms_condition_modal .modal-body ul,
    #terms_condition_modal .modal-body ol,
    #privacy_policy_modal .modal-body ul,
    #privacy_policy_modal .modal-body ol {
        font-size: 18px !important;
        padding-left: 2.5rem !important;
        margin-left: 0 !important;
        list-style-position: outside;
    }
    
    #terms_condition_modal .modal-body li,
    #privacy_policy_modal .modal-body li {
        font-size: 18px !important;
        padding-left: 0.5rem;
        list-style-position: outside;
    }
    
    #terms_condition_modal .modal-title,
    #privacy_policy_modal .modal-title {
        font-size: 1.75rem !important;
    }
    
    .modal-footer .btn {
        font-size: 18px !important;
        min-width: 140px;
        padding: 0 32px;
        height: 48px;
        font-weight: 600;
    }
    
    /* QR Scanner Modal Desktop Improvements */
    #qr_scanner_modal .modal-dialog {
        max-width: 700px;
        margin: 3rem auto;
    }
    
    #qr_scanner_modal .modal-header {
        padding: 1.5rem 2rem;
    }
    
    #qr_scanner_modal .modal-title {
        font-size: 1.75rem !important;
    }
    
    #qr_scanner_modal .modal-body {
        padding: 2rem;
    }
    
    #qr_scanner_modal .modal-body p {
        font-size: 18px !important;
    }
    
    #qr_scanner_container {
        height: 400px;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }
    
    .qr-target-frame {
        width: 300px;
        height: 300px;
        min-width: 300px;
        min-height: 300px;
        max-width: 300px;
        max-height: 300px;
        aspect-ratio: 1 / 1 !important; /* Force square shape */
        flex-shrink: 0; /* Prevent shrinking */
    }
    
    .qr-target-instruction {
        font-size: 16px;
        padding: 10px 20px;
    }
    
    .qr-target-instruction i {
        font-size: 28px;
    }
    
    .qr-target-instruction p {
        font-size: 14px;
    }
    
    .qr-scanner-disclaimer {
        padding: 20px 24px;
        margin-bottom: 2rem;
    }
    
    .qr-scanner-disclaimer i {
        font-size: 24px;
    }
    
    .qr-scanner-disclaimer .disclaimer-content {
        font-size: 16px;
        line-height: 1.7;
    }
    
    .qr-scanner-disclaimer strong {
        font-size: 17px;
        margin-bottom: 10px;
    }
    
    .qr-scanner-disclaimer p {
        font-size: 16px;
        line-height: 1.7;
    }
    
    #qr_scanner_modal .modal-footer {
        padding: 1.5rem 2rem;
    }
    
    #qr_scanner_modal .modal-footer .btn {
        font-size: 18px !important;
        min-width: 160px;
        height: 52px;
        padding: 0 36px;
    }
    
    #qr_scanner_modal .btn-secondary {
        font-size: 18px !important;
    }
}

/* Responsive Styles - Mobile */
@media (max-width: 768px) {
    :root {
        --spacing-unit: 12px;
    }
    
    /* Mobile Font Sizing - Increase font sizes for better readability */
    body {
        font-size: 17px;
    }
    
    h3 {
        font-size: 1.5rem;
        margin-bottom: calc(var(--spacing-unit) * 1.25);
    }
    
    label {
        font-size: 16px !important;
        margin-bottom: 10px;
        font-weight: 600;
    }
    
    .form-control {
        font-size: 17px !important;
        padding: 14px 16px;
        height: 50px;
    }
    
    /* Ensure all input types get larger font size */
    input.form-control,
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    select.form-control,
    select {
        font-size: 17px !important;
        padding: 14px 16px;
        height: 50px;
    }
    
    textarea.form-control {
        font-size: 17px !important;
        padding: 14px 16px;
        line-height: 1.6;
    }
    
    /* Select dropdowns need special handling */
    select.form-control,
    select {
        font-size: 17px !important;
        line-height: 1.5;
    }
    
    .btn {
        height: 50px;
        font-size: 17px !important;
        padding: 0 20px;
        font-weight: 600;
    }
    
    .btn-lg {
        font-size: 18px !important;
        height: 54px;
        padding: 0 24px;
    }
    
    /* Submit button */
    #formSubmit {
        font-size: 17px !important;
        height: 50px !important;
        padding: 0 20px !important;
    }
    
    /* QR scanner button */
    #qr_scanner_btn {
        font-size: 17px !important;
        height: 50px !important;
        width: 50px !important;
    }
    
    #qr_scanner_btn i {
        font-size: 20px !important;
    }
    
    .lf-toggle label {
        font-size: 17px;
        height: 60px;
    }
    
    p {
        font-size: 17px;
        line-height: 1.7;
    }
    
    .error-message {
        font-size: 15px;
    }
    
    .terms-checkbox label {
        font-size: 15px !important;
        line-height: 1.6;
    }
    .terms-checkbox {
        padding-left: 12px;
    }
    
    /* Modal font sizing for mobile */
    .modal-title {
        font-size: 1.5rem !important;
    }
    
    .modal-body {
        font-size: 16px !important;
        line-height: 1.7;
    }
    
    .modal-body ul,
    .modal-body ol {
        padding-left: 2rem !important;
        margin-left: 0 !important;
        list-style-position: outside;
        margin-bottom: 1rem;
    }
    
    .modal-body p {
        font-size: 16px !important;
        line-height: 1.7;
    }
    
    .modal-body li {
        font-size: 16px !important;
        line-height: 1.7;
        padding-left: 0.5rem;
        list-style-position: outside;
        margin-bottom: 0.5rem;
    }
    
    .modal-body a {
        font-size: 16px !important;
        line-height: 1.7;
    }
    
    /* Fix list styling in modals for mobile */
    #terms_condition_modal .modal-body ul,
    #terms_condition_modal .modal-body ol,
    #privacy_policy_modal .modal-body ul,
    #privacy_policy_modal .modal-body ol {
        padding-left: 2rem !important;
        margin-left: 0 !important;
        list-style-position: outside;
    }
    
    #terms_condition_modal .modal-body li,
    #privacy_policy_modal .modal-body li {
        padding-left: 0.5rem;
        list-style-position: outside;
    }
    
    .modal-body strong {
        font-size: 17px !important;
    }
    
    .modal-footer .btn {
        font-size: 17px !important;
        height: 50px !important;
        min-width: 120px;
        padding: 0 20px !important;
    }
    
    /* QR Scanner Modal mobile styles */
    #qr_scanner_modal .modal-title {
        font-size: 1.5rem !important;
    }
    
    #qr_scanner_modal .modal-body p {
        font-size: 16px !important;
    }
    
    #qr_scanner_modal .modal-footer .btn {
        font-size: 17px !important;
        height: 50px !important;
        min-width: 140px;
    }
    
    /* Disclaimer text on mobile */
    .qr-scanner-disclaimer {
        font-size: 15px;
    }
    
    .qr-scanner-disclaimer strong {
        font-size: 16px;
    }
    
    .qr-scanner-disclaimer p {
        font-size: 15px;
    }
    
    /* Ensure proper display on mobile */
    #right_div.full-width {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 10 !important;
    }
    
    /* Ensure form panels are visible on mobile */
    #right_div.active .panel,
    #right_div.full-width .panel,
    #right_div.active .panel-body,
    #right_div.full-width .panel-body {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 10 !important;
    }
    
    /* Force hide elements that should be hidden */
    #location_confirmation:not(.active),
    #right_div:not(.active):not(.full-width),
    #not_found_div:not(.active),
    .start-here:not(.active) {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }
    
    /* Force show elements that should be visible */
    #location_confirmation.active,
    #right_div.active,
    #right_div.full-width,
    #not_found_div.active,
    .start-here.active {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 10 !important;
        height: auto !important;
        overflow: visible !important;
        pointer-events: auto !important;
    }
    
    /* Improve touch targets */
    .btn, 
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* Make the T&C modal body readable on mobile */
#terms_condition_modal .modal-dialog {
    max-width: 540px;
    width: 92%;
    margin: 1rem auto;
}
#terms_condition_modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
    line-height: 1.5;
}

/* Fix list styling in Terms and Conditions modal */
#terms_condition_modal .modal-body ul,
#terms_condition_modal .modal-body ol {
    padding-left: 2rem !important;
    margin-left: 0 !important;
    margin-bottom: 1rem;
    list-style-position: outside;
}

#terms_condition_modal .modal-body li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    list-style-position: outside;
}

#privacy_policy_modal .modal-dialog {
    max-width: 540px;
    width: 92%;
    margin: 1rem auto;
}
#privacy_policy_modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
    line-height: 1.5;
}

/* Fix list styling in Privacy Policy modal */
#privacy_policy_modal .modal-body ul,
#privacy_policy_modal .modal-body ol {
    padding-left: 2rem !important;
    margin-left: 0 !important;
    margin-bottom: 1rem;
    list-style-position: outside;
}

#privacy_policy_modal .modal-body li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    list-style-position: outside;
}

/* Touch-friendly improvements */
#go_btn, #wrng, #crct, #send_btn, #formSubmit {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Datepicker improvements — blue header and buttons (match form primary) */
.datepicker {
    z-index: 1060 !important;
}

/* Override red theme: header row and nav buttons to primary blue */
.datepicker thead tr:first-child th,
.datepicker .datepicker-switch,
.datepicker .prev,
.datepicker .next {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
}

.datepicker .prev:hover,
.datepicker .next:hover,
.datepicker .datepicker-switch:hover {
    background-color: var(--primary-dark) !important;
    color: #fff !important;
    border-color: var(--primary-dark) !important;
}

.datepicker .prev:hover span,
.datepicker .next:hover span {
    color: #fff !important;
    border-color: #fff !important;
}

.datepicker .prev:active,
.datepicker .next:active,
.datepicker .datepicker-switch:active {
    background-color: var(--primary-dark) !important;
    color: #fff !important;
}

.datepicker .prev span,
.datepicker .next span {
    color: #fff !important;
    border-color: #fff !important;
}

/* ===================================================================
   Mobile-friendly datepicker — large calendar, easy tap targets
   Targets bootstrap-datepicker on public lost item form
   =================================================================== */
@media (max-width: 768px), ((pointer: coarse) and (hover: none)) {
    /* Larger dropdown: min-width, padding, font */
    .datepicker.dropdown-menu,
    .datepicker {
        min-width: 320px;
        width: 94vw;
        max-width: 380px;
        padding: 16px;
        font-size: 16px;
        border-radius: var(--border-radius, 8px);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    }

    .datepicker .datepicker-days {
        padding-top: 8px;
    }

    /* Month/year and prev/next — bigger touch targets */
    .datepicker .datepicker-switch,
    .datepicker .prev,
    .datepicker .next {
        min-height: 48px;
        min-width: 48px;
        line-height: 48px;
        font-size: 1.1rem;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        -webkit-tap-highlight-color: transparent;
    }

    .datepicker .datepicker-switch {
        min-width: 140px;
        font-weight: 600;
    }

    /* Day-of-week header */
    .datepicker .table-condensed thead th {
        padding: 10px 4px;
        font-size: 0.95rem;
        font-weight: 600;
    }

    /* Day cells: 48px min for touch, larger text */
    .datepicker .table-condensed td,
    .datepicker .table-condensed th {
        min-width: 44px;
        width: 44px;
        min-height: 44px;
        height: 44px;
        line-height: 44px;
        font-size: 1rem;
        padding: 0;
        text-align: center;
        border-radius: 8px;
        -webkit-tap-highlight-color: transparent;
    }

    .datepicker .table-condensed td.day {
        font-weight: 500;
    }

    .datepicker .table-condensed td.today {
        font-weight: 700;
    }

    /* Fit 7 columns; reduce if needed on very narrow screens */
    @media (max-width: 360px) {
        .datepicker .table-condensed td,
        .datepicker .table-condensed th {
            min-width: 38px;
            width: 38px;
            min-height: 38px;
            height: 38px;
            line-height: 38px;
            font-size: 0.9rem;
        }

        .datepicker.dropdown-menu,
        .datepicker {
            min-width: 280px;
            width: 92vw;
        }
    }
}

/* Spacing utilities */
.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

/* Make sure the panel containing the map is visible when active */
#location_confirmation.active .panel {
    display: block !important;
}

/* Loading Modal Styles */
.loading-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 100000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-modal.active {
    display: flex !important;
    opacity: 1;
}

.loading-content {
    text-align: center;
    padding: 2.5rem;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color);
    display: inline-block;
    vertical-align: middle;
    border: 0.25rem solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* Fade Transitions */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

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

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

/* Ensure the form is hidden by default */
#right_div:not(.active):not(.full-width) {
    display: none !important;
}

/* Ensure the form is visible when active */
#right_div.active,
#right_div.full-width {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
} 