/*
 * ParkPlus Portal - Page-Specific Styles
 * Consolidated CSS for all page-specific styling
 * This file contains styles that were previously embedded in individual HTML templates
 * Updated to use CSS variables from glass-theme.css for theming support
 */

/* ============================================ */
/* PATROL PAGE STYLES                          */
/* templates/towing/towing_patrol.html         */
/* ============================================ */

/* Shutter effect animation */
#shutter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.08s ease-out;
}

#shutter.on {
    opacity: 0.9;
}

/* Hide flash checkbox but keep it functional */
.flash-checkbox-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Video container styles */
#video-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 520px;
    background-color: black;
    border-radius: 1rem;
}

/* Mobile video container - reduce height by 20% */
@media (max-width: 768px) {
    #video-container {
        height: 416px; /* 520px * 0.8 = 416px */
    }
}

#video {
    object-fit: cover;
    transform-origin: center center;
    transform: scale(2);
}

/* Camera controls overlay */
.camera-controls {
    position: absolute;
    z-index: 2;
    right: 1rem;
    top: 1rem;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.camera-control-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    background-color: transparent;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.camera-control-btn:hover {
    color: var(--color-primary-light);
}

.material-symbols-sharp {
    font-family: 'Material Symbols Sharp';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
}

/* Capture button - circular overlay within video */
#captureButton {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: 3px solid rgba(255, 255, 255, 0.9);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(var(--color-primary-rgb), 0.6), 0 0 0 0 rgba(var(--color-primary-rgb), 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

#captureButton:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 6px 30px rgba(var(--color-primary-rgb), 0.8), 0 0 0 8px rgba(var(--color-primary-rgb), 0.2);
}

#captureButton:active {
    transform: translateX(-50%) scale(0.95);
}

/* Modern liquid glass scan result cards */
#result {
    width: 100%;
    margin-top: 0;
}

#result tbody tr {
    display: block;
    margin-bottom: 1rem;
}

#result tbody td {
    display: block;
    border: none;
    padding: 0;
}

/* Compact liquid glass result card */
.result-card {
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.1) 0%, var(--glass-bg-dark) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
    border-radius: 0.75rem;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(var(--color-primary-rgb), 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.result-card:hover {
    border-color: rgba(var(--color-primary-rgb), 0.6);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(var(--color-primary-rgb), 0.25);
}

/* Status header bar - solid deep colors */
.result-header {
    padding: 0.625rem 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-header.allowed {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.result-header.denied {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.result-header.unknown {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* Plate number display */
.plate-display {
    font-family: 'Courier New', monospace;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 2px;
}

/* Status badge - white text/border, colored background */
.status-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 1rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    color: #ffffff;
}

.status-badge.allowed {
    background: rgba(16, 185, 129, 0.7);
}

.status-badge.denied {
    background: rgba(239, 68, 68, 0.7);
}

.status-badge.unknown {
    background: rgba(245, 158, 11, 0.7);
}

/* Compact result content */
.result-content {
    padding: 0.75rem 0.875rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 0.75rem;
}

.result-row {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.result-row.full-width {
    grid-column: 1 / -1;
}

.result-label {
    color: var(--color-primary-light);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.result-value.highlight {
    color: var(--text-primary);
    font-weight: 600;
}

.result-value.expired {
    color: #fca5a5;
    font-weight: 600;
}

.result-value.wrong-zone {
    color: #f87171;
    font-weight: 700;
}

/* Compact tag notes badge */
.tag-notes-badge {
    display: inline-block;
    background: linear-gradient(135deg, #4285F4 0%, #357ae8 100%);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.4);
}

/* Compact action buttons */
.result-actions {
    padding: 0.625rem 0.875rem;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(var(--color-primary-rgb), 0.2);
    display: flex;
    gap: 0.5rem;
}

.citation-history {
    padding: 0.625rem 0.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.citation-history-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.citation-history-today {
    color: #f87171;
}
.citation-history-previous {
    color: #60a5fa;
    margin-top: 0.5rem;
}
.citation-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.125rem;
}
.citation-history-item-today {
    background: rgba(239, 68, 68, 0.08);
}
.citation-history-item-previous {
    background: rgba(96, 165, 250, 0.06);
}
.citation-history-violation {
    color: #fca5a5;
    font-size: 0.8rem;
    font-weight: 500;
}
.citation-history-violation-old {
    color: #93c5fd;
}
.citation-history-meta {
    color: #94a3b8;
    font-size: 0.7rem;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.action-btn-tow,
.action-btn-tag,
.action-btn-delete {
    flex: 1;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-btn-tow {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(100, 116, 139, 0.4);
}

.action-btn-tow:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(100, 116, 139, 0.6);
}

.action-btn-tag {
    background: linear-gradient(135deg, #4285F4 0%, #357ae8 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(66, 133, 244, 0.4);
}

.action-btn-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(66, 133, 244, 0.6);
}

.action-btn-delete {
    background: linear-gradient(135deg, #EA4335 0%, #d33426 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(234, 67, 53, 0.4);
}

.action-btn-delete:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(234, 67, 53, 0.6);
}

/* Checking placeholder */
.checking-placeholder {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}


/* ============================================ */
/* ACCORDION COMPONENT STYLES                  */
/* templates/towing/towing_settings.html       */
/* ============================================ */

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content.active {
    max-height: 5000px;
    transition: max-height 0.5s ease-in;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-toggle.active .accordion-icon {
    transform: rotate(180deg);
}


/* ============================================ */
/* LOGIN PAGE STYLES                           */
/* templates/login.html                        */
/* ============================================ */

/* Login page specific body style - applied via class */
.login-page-body {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
}

/* Login page specific glass card variant */
.login-glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: 1rem;
}

/* Login page input variant */
.login-input-glass {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    width: 100%;
}

.login-input-glass:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--input-focus-bg);
}

.login-input-glass::placeholder {
    color: var(--text-placeholder);
}

/* Login select variant */
.login-select-glass {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    width: 100%;
}

.login-select-glass:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--input-focus-bg);
}

/* Login button variant */
.login-btn-glass-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.login-btn-glass-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(var(--color-primary-rgb), 0.3);
}

/* Login checkbox variant */
.login-checkbox-glass {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-glass);
    background: var(--input-bg);
}

.login-checkbox-glass:checked {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-color: var(--color-primary);
}


/* ============================================ */
/* VEHICLE LOCATE PAGE STYLES                  */
/* templates/towing/towing_vehicle_locate.html */
/* ============================================ */

/* Vehicle locate page body style - applied via class */
.vehicle-locate-body {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
}

/* Radio button toggle styling */
.radio-btn {
    padding: 1rem 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
}

.radio-btn.selected {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border-color: var(--color-primary);
}


/* ============================================ */
/* MAP/DASHBOARD STYLES                        */
/* templates/towing/towing_dashboard.html      */
/* templates/tools/towing_dashboard.html       */
/* ============================================ */

#maps {
    height: 400px;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-glass-lg);
}

.legend {
    background: var(--glass-bg-dark);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 0.75rem;
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.legend img {
    width: 20px;
    height: 32px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.legend span {
    vertical-align: middle;
}


/* ============================================ */
/* CONTRACT SIGNING PAGE STYLES                */
/* templates/tools/contract_sign.html          */
/* ============================================ */

/* Contract page body style - applied via class */
.contract-page-body {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
}

.signature-pad-wrapper {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    overflow: hidden;
    background: white;
    height: 200px;
}

.signature-pad {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

.contract-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass-subtle);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-glass-lg);
}

.contract-header {
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.2), rgba(var(--color-primary-rgb), 0.1));
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-glass-lg);
}

.contract-data-point {
    font-weight: 600;
    color: var(--text-secondary);
}

/* Print Styles for Contract */
@media print {
    .contract-page-body {
        background: white !important;
    }
    .contract-section,
    .contract-header,
    .glass-card {
        background: white !important;
        border: 1px solid #e5e7eb !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
    }
    .text-white,
    .text-gray-200,
    .text-gray-300 {
        color: #000 !important;
    }
    .no-print {
        display: none !important;
    }
    .signature-pad-wrapper {
        border: 2px solid #000 !important;
    }
}


/* ============================================ */
/* KNOWLEDGE BASE PAGE STYLES                  */
/* templates/tools/knowledge_base.html         */
/* ============================================ */

.knowledge-base-content {
    margin-left: 12.5rem;
    margin-right: 0rem;
    margin-top: 3.2rem;
}

@media (max-width: 768px) {
    .knowledge-base-content {
        margin-left: 0rem;
        margin-right: 0rem;
        margin-top: 3.9rem;
    }
}


/* ============================================ */
/* VEHICLE LOCATE TOOL STYLES (Bootstrap ver)  */
/* templates/tools/vehicle_locate.html         */
/* ============================================ */

.radio-button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.custom-radio {
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--input-border, rgba(255, 255, 255, 0.1));
    border-radius: 0.75rem;
    cursor: pointer;
    text-align: center;
    background: var(--glass-bg, rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-secondary, #9ca3af);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.custom-radio:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-primary-light, #60a5fa);
}

.custom-radio.selected {
    background: linear-gradient(135deg, var(--color-primary, #3b82f6), var(--color-primary-light, #60a5fa));
    color: white;
    border-color: var(--color-primary, #3b82f6);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.custom-radio:not(.selected) {
    background: var(--glass-bg, rgba(255, 255, 255, 0.05));
    color: var(--text-secondary, #9ca3af);
    border-color: var(--input-border, rgba(255, 255, 255, 0.1));
}

/* This style applies specifically to the Bootstrap version */
.vehicle-locate-input-group {
    margin-top: 10px;
}


/* ============================================ */
/* IMAGE CAPTURE STYLES                        */
/* templates/pictures.html                     */
/* ============================================ */

#captured-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.captured-image-container {
    position: relative;
}

.captured-image-container img {
    max-width: 200px;
    height: auto;
    border: 1px solid var(--border-color);
}

.delete-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 5px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 12px;
}

#image-capture-input {
    display: none;
}

/* =====================================================
   TAG NOTICE - Displayed in scan result cards
   ===================================================== */

.tag-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    background: rgba(245, 158, 11, 0.1);
    border-top: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-notice-icon {
    color: #f59e0b;
    font-size: 0.875rem;
    margin-top: 0.125rem;
}

.tag-notice-content {
    flex: 1;
    min-width: 0;
}

.tag-notice-message {
    color: #fcd34d;
    font-size: 0.8125rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.tag-notice-time {
    color: rgba(252, 211, 77, 0.6);
    font-size: 0.6875rem;
    margin-top: 0.25rem;
}

/* =====================================================
   TAG MODAL - For tagging vehicles during patrol
   ===================================================== */

.tag-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.tag-modal {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
    border-radius: 0.75rem;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(var(--color-primary-rgb), 0.15);
}

.tag-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(245, 158, 11, 0.15);
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
    font-weight: 600;
}

.tag-modal-plate {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.tag-modal-body {
    padding: 1.25rem;
}

.tag-modal-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    padding: 0.75rem;
    color: #ffffff;
    font-size: 0.9375rem;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.tag-modal-input:focus {
    outline: none;
    border-color: rgba(var(--color-primary-rgb), 0.5);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}

.tag-modal-input.error {
    border-color: #ef4444;
}

.tag-modal-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.tag-modal-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tag-modal-actions button {
    flex: 1;
}
