﻿/* ===========================================
   GLOBAL TYPOGRAPHY / BASE
   =========================================== */

:root {
    --bs-body-font-size: 1rem; /* Larger readable global text */
    --bs-body-line-height: 1.5;
}

html {
    font-size: 13px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
    font-family: 'Open Sans';
}

.container {
    width: 100%;
}

header {
    height: 64px;
    margin-bottom: 15px;
}

.row-tight {
    margin-bottom: 0px;
}

.hidden {
    display: none !important;
}

.section-header {
    margin-top: 40px;
}



/*Validation*/
.chip {
    background-color: #F44336;
    color: white;
    padding: 0px 8px 0px 8px;
    border: solid 1px #F44336;
    border-radius: 8px;
    margin: 0px 3px 0px 3px;
    text-decoration: none;
    cursor: pointer;
}

.validation-summary {
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

    .validation-summary h4 {
        flex-basis: 100%; /* take full width */
    }

/* Focus outline improvements */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/*Customize button to match previous design*/
.btn {
    border: none;
    height: 36px;
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);
}

.disabled {
    color: #5e5c5c !important;
}

/* ===========================================
   LOADING/SUBMIT OVERLAY STYLING
   =========================================== */

.submit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.loader-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 24px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e5e5;
}

    .loader-box p {
        margin: 16px 0 8px;
        font-size: 16px;
        font-weight: 600;
    }

    .loader-box small {
        color: #666;
        font-size: 13px;
    }

.spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto;
    border: 4px solid #e5e5e5;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* ===========================================
   MATERIALIZE-STYLE FLOATING INPUTS
   =========================================== */

/* Underline-only styling for all floating controls */
.form-floating .form-control,
.form-floating .form-select,
.form-floating textarea.form-control {
    border: 0;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.25);
    border-radius: 0;
    padding-left: 0;
    padding-right: 0;
    background-color: transparent;
    box-shadow: none;
    font-size: 16px; /* Larger input text */
}

/* Resting label — close to underline */
.form-floating > label {
    color: rgba(0, 0, 0, 0.45);
    font-size: 1.2rem; /* Larger floating label text */
    padding-left: 0;
    transform: translateY(0.30rem) !important;
    transition: transform .15s ease, color .15s ease, opacity .15s ease;
}

/* Floating state for input + textarea */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > textarea.form-control:focus ~ label,
.form-floating > textarea.form-control:not(:placeholder-shown) ~ label {
    color: rgba(0, 0, 0, 0.6);
    transform: scale(.82) translateY(-1.0rem) !important;
}

/* Compact input height + zero bottom padding */
.form-floating > .form-control,
.form-floating > .form-select {
    height: calc(2.4rem + 2px);
    padding-top: 1rem !important;
    padding-bottom: 0 !important;
    line-height: 1.25;
}

/* Floating textarea size */
.form-floating > textarea.form-control {
    height: 120px;
    padding-top: 1.25rem !important;
    padding-bottom: 0 !important;
    resize: vertical;
}



/* Validation underline colors */
.was-validated .form-control:invalid,
.form-control.is-invalid,
.was-validated .form-select:invalid,
.form-select.is-invalid,
.was-validated textarea.form-control:invalid,
textarea.form-control.is-invalid {
    border-bottom-color: var(--bs-danger);
    box-shadow: 0 1px 0 0 var(--bs-danger);
}

.was-validated .form-control:valid,
.was-validated .form-select:valid,
.was-validated textarea.form-control:valid {
    border-bottom-color: var(--bs-success);
}

/* Section Title Cleanup */
.section-title {
    margin-bottom: .75rem;
    font-size: 1.35rem;
    font-weight: 600;
}


/* ===========================================
   SELECT DROPDOWN IMPROVEMENTS
   =========================================== */

/* Improve select element appearance */
.form-floating > .form-select {
    padding-top: 1rem !important;
    padding-bottom: 0 !important;
    /* Remove Bootstrap box styles */
    border: 0;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.25);
    border-radius: 0;
    background-color: transparent;
    background-image: none;
    box-shadow: none;
    font-size: 16px;
}

/* Wrapper to show custom dropdown arrow */
.form-floating.select-arrow {
    position: relative;
}

    /* Custom arrow */
    .form-floating.select-arrow::after {
        content: "▼";
        position: absolute;
        right: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.7rem;
        color: rgba(0, 0, 0, 0.45);
        pointer-events: none;
    }

/* Float label when select has a value */
.form-floating > .form-select:not([value=""]) ~ label {
    transform: scale(.82) translateY(-1.0rem) !important;
    color: rgba(0, 0, 0, 0.6);
}

/* Better internal option appearance */
select option {
    padding: 8px 12px;
    font-size: 1.05rem;
}

/* ===========================================
   CUSTOM SWITCH
   =========================================== */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.setting-label {
    font-size: 1.2rem;
    font-weight: 500;
    color: #343a40;
}

.custom-switch {
    width: 3.25rem !important;
    height: 1.75rem !important;
    cursor: pointer;
    background-color: #d6d6d6;
    border: none;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.15);
}



/* ===========================================
   TOAST NOTIFICATION SYSTEM
   =========================================== */
#toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: 20px;
    text-align:center;
    min-width: 250px;
    padding: 14px 20px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .3s ease, transform .3s ease;
    z-index: 9999;
}

    #toast.show {
        opacity: 1;
        transform: translateY(0);
    }

    #toast.success {
        background-color: #4CAF50;
    }

    #toast.error {
        background-color: #F44336;
    }

    #toast.info {
        background-color: #2196F3;
    }


/* ===========================================
   TEXT AREA IMPROVEMENTS
   =========================================== */
.textarea-emphasis {
    border-right: 1px solid #ced4da !important;
    background-color: #fafafa;
}

    .textarea-emphasis:focus {
        border-color: #86b7fe !important;
        box-shadow: 0 0 0 .15rem rgba(13,110,253,.15);
    }

/* ===========================================
   TABS
   =========================================== */
.tab-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 16px 16px 0 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.tab-button {
    position: relative;
    border: none;
    border-radius: 18px 18px 0 0;
    padding: 14px 20px;
    background: rgba(255,255,255,0.35);
    color: #4b5563;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
    transform: scale(1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.45);
    border-bottom: none;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.5);
}

    .tab-button.active {
        background: rgba(255,255,255,0.72);
        color: #111827;
        z-index: 2;
        transform: translateY(-2px) scale(1.06);
    }

        .tab-button.active::after {
            content: '';
            position: absolute;
            left: 16px;
            right: 16px;
            bottom: 6px;
            height: 3px;
            border-radius: 999px;
        }

.tab-content-container {
    margin-top: -1px;
    padding: 4px;
    padding-bottom: 120px;
}

.tab-panel {
    display: none;
}

    .tab-panel.active {
        display: block;
    }

.glass-section {
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 12px 12px 12px 12px;
    padding: 14px;
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 25px -10px rgba(31, 41, 55, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

    .glass-section h3 {
        margin-bottom: 20px;
        font-size: 20px;
        font-weight: 700;
        color: #111827;
    }


/*Menu Card Item*/
.rental-card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    background: white;
    max-width: 420px;
    margin-bottom: 40px;
}

.card-body {
    padding: 20px;
}

.card-icon {
    font-size: 40px;
    margin-right: 15px;
}

.card-text h4 {
    margin: 0;
    font-weight: 600;
}

.card-text p {
    margin: 5px 0 0;
    color: #333;
}

.card-footer {
    /*border-top: 1px solid #ddd;*/
    padding: 15px;
    background: white;
}

.card-button {
    align-content: center;
    display: block;
    width: 100%;
    background: #f5c400;
    color: black;
    font-weight: bold;
    text-align: center;
    border-radius: 4px;
}

/*Signature Pad Styling*/
.signature-container {
    position: relative;
    border: 1px solid #ccc;
    border-radius: 8px 8px 0px 0px;
    width: 100%;
    max-width: 400px;
    height: 200px;
    overflow: hidden;
}

    .signature-container canvas {
        width: 100%;
        height: 100%;
        display: block;
        border-radius: 8px 8px 0px 0px;
    }

.clear-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 24px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    padding: 4px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* show when hovered or active (writing) */
.signature-container.active .clear-icon {
    opacity: 1;
    pointer-events: auto;
}

.blue-text {
    color: #2196F3 !important;
}

.hide {
    display: none;
}
}

/* ===========================================
   USE CURRENT LOCATION BUTTON
   =========================================== */

.location-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 2px 18px;
    margin-bottom: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.6);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 8px 20px -10px rgba(31,41,55,0.08), inset 0 1px 1px rgba(255,255,255,0.6);
}

    .location-card:active {
        transform: scale(0.98);
    }

    .location-card:hover {
        background: rgba(255,255,255,0.7);
    }

.location-card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255,255,255,0.7);
    font-size: 1.4rem;
}

.location-card-content {
    flex: 1;
}

.location-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.location-card-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
}

.location-card-arrow {
    color: #9ca3af;
}

.location-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

    .location-card.loading .location-card-icon i {
        animation: pulseLocation 1s infinite;
    }

@keyframes pulseLocation {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}


/* ===========================================
   Injured Persons Styling
   =========================================== */
.injured-person-block {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    background: rgba(255,255,255,0.72);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 25px -10px rgba(31, 41, 55, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}



/* ===========================================
   Index Page Styling
   =========================================== */
.app-tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    margin-bottom: 16px;
    border-radius: 20px;
    /* background: rgba(255, 255, 255, 0.14); */
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* border: 1px solid rgba(255, 255, 255, 0.18); */
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10), inset 0 1px 1px rgba(255,255,255,0.15); */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10), inset 0 1px 1px rgba(255,255,255,0.15);
    /* color: white; */
    color: #1f2937;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    .app-tile:active {
        transform: scale(0.985);
    }

    .app-tile:hover {
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), inset 0 1px 1px rgba(255,255,255,0.2);
    }

    .app-tile::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient( 135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.02) );
        pointer-events: none;
    }

.app-tile-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(255,255,255,0.16);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.2), 0 4px 12px rgba(0,0,0,0.12);
    flex-shrink: 0;
}

.app-tile-content {
    flex: 1;
}

.app-tile-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.app-tile-description {
    font-size: 14px;
    opacity: 0.82;
    line-height: 1.4;
}

.app-tile-arrow {
    opacity: 0.55;
    font-size: 18px;
}
}
.red-text {
    color: #F44336 !important;
}

.green-text {
    color: #4CAF50 !important;
}