/* public/css/style-alt.css */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    /* Light Theme Palette (Unchanged) */
    --bg-primary: #f5f7fa; --bg-secondary: #ffffff; --bg-tertiary: #eef2f7; --text-primary: #1e293b; --text-secondary: #475569; --text-tertiary: #64748b; --border-color: #e2e8f0; --accent-primary: #3b82f6; --accent-primary-darker: #2563eb; --accent-primary-text: #ffffff; --danger-bg: #fef2f2; --danger-text: #991b1b; --danger-border: #fecaca; --warning-bg: #fffbeb; --warning-text: #92400e; --info-bg: #eff6ff; --info-text: #1e40af; --info-border: #93c5fd; --success-bg: #f0fdf4; --success-text: #14532d; --shadow: 0 2px 4px rgba(0,0,0,0.04);
    /* Sizing */
    --bottom-nav-height: 60px; --header-height: 56px;
}

/* === ALTERNATIVE DARK THEME === */
body.dark {
    /* True black backgrounds */
    --bg-primary: #000000; 
    --bg-secondary: #1c1c1c; 
    --bg-tertiary: #2c2c2c; 
    
    --text-primary: #f0f0f0; 
    --text-secondary: #cccccc; 
    --text-tertiary: #a0a0a0; 
    --border-color: #3a3a3a; 
    
    /* More vibrant accent */
    --accent-primary: #0091ff; 
    --accent-primary-darker: #007ae6; 
    --accent-primary-text: #ffffff; 
    
    --danger-bg: #4d0f14; 
    --danger-text: #ff8f98; 
    --danger-border: #ff4d5a; 
    
    --info-bg: #0f3a66; 
    --info-text: #8ccbff; 
    --info-border: #0091ff; 
    
    --success-bg: #0f4d2a; 
    --success-text: #8cffc0;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { font-family: 'Roboto', -apple-system, sans-serif; background-color: var(--bg-primary); color: var(--text-primary); line-height: 1.5; -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; }
.main-wrapper { display: flex; flex-direction: column; height: 100vh; }
.main-header { flex-shrink: 0; background-color: var(--bg-secondary); border-bottom: 1px solid var(--border-color); padding: 0 1rem; height: var(--header-height); display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow); z-index: 100; }
.header-title-container { display: flex; align-items: center; gap: 1rem; flex-grow: 1; }
.header-title { font-size: 1.125rem; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.header-actions a { color: var(--text-tertiary); text-decoration: none; font-size: 1.25rem; }
.header-toggle-container { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; }
.main-content { flex-grow: 1; overflow-y: auto; padding: 12px; padding-bottom: calc(var(--bottom-nav-height) + 12px); overscroll-behavior-y: contain; }
.loading-container { display: flex; justify-content: center; align-items: center; height: 100%; flex-direction: column; gap: 1rem; color: var(--text-tertiary); }
.spinner { width: 40px; height: 40px; border: 4px solid var(--border-color); border-bottom-color: var(--accent-primary); border-radius: 50%; display: inline-block; animation: rotation 1s linear infinite; }
@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.no-data-container { text-align: center; padding: 3rem 1rem; color: var(--text-tertiary); }
.no-data-container h3 { color: var(--text-primary); margin-bottom: 0.5rem; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottom-nav-height); background-color: var(--bg-secondary); border-top: 1px solid var(--border-color); display: flex; justify-content: space-around; box-shadow: 0 -2px 5px rgba(0,0,0,0.05); z-index: 1000; }
.nav-button { flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: none; border: none; color: var(--text-tertiary); font-size: 0.7rem; cursor: pointer; transition: color 0.2s, background-color 0.2s; padding: 0.5rem 0; gap: 4px; }
.nav-button:hover { background-color: var(--bg-tertiary); }
.nav-button .icon { font-size: 1.25rem; }
.nav-button.active { color: var(--accent-primary); }
.call-card { background-color: var(--bg-secondary); border-radius: 10px; margin-bottom: 10px; padding: 12px; box-shadow: var(--shadow); cursor: pointer; border-left: 4px solid transparent; transition: transform 0.2s, box-shadow 0.2s; }
.call-card:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -2px rgba(0,0,0,0.05); }
.call-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.call-card-id { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); }
.call-card-id small { font-weight: 400; color: var(--text-tertiary); margin-left: 0.5rem; }

/* === VIBRANT BADGE STYLES === */
.priority-badge, .badge {
    padding: 2px 10px;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
.priority-1 { background: #ff4d5a; color: white; } 
.priority-2 { background: #ff9d4d; color: white; } 
.priority-3 { background: #4d94ff; color: white; } 
.priority-4 { background: #6c757d; color: white; }
body.dark .priority-1 { background: #c21a25; color: #ffd1d4; box-shadow: 0 0 8px #ff4d5a; }
body.dark .priority-2 { background: #b36b1e; color: #ffe5cd; box-shadow: 0 0 8px #ff9d4d; }
body.dark .priority-3 { background: #1e5cb3; color: #d1e3ff; box-shadow: 0 0 8px #4d94ff; }
body.dark .priority-4 { background: #495057; color: #e9ecef; }

.badge { font-size: 0.75rem; font-weight: 500; }
.badge-type { background-color: var(--info-bg); color: var(--info-text); } 

/* **FIX**: Swapped OPEN and CLEARED/CLOSED colors */
.badge-status-open { background: #198754; color: #a3ffce; box-shadow: 0 0 8px #28a745; } /* Green */
.badge-status-closed { background: #495057; color: #e9ecef; } /* Grey (like P4) */
/* === END VIBRANT BADGE STYLES === */

.call-card-body { font-size: 1rem; font-weight: 500; margin-bottom: 2px; }
.call-card-location { font-size: 0.85rem; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.detail-header { background-color: var(--bg-secondary); padding: 12px; border-radius: 10px; margin-bottom: 12px; box-shadow: var(--shadow); }
.detail-title { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); }
.detail-title small { font-size: 1rem; font-weight: 500; color: var(--text-tertiary); }
.detail-address { font-size: 0.9rem; color: var(--text-secondary); margin-top: 2px; }
.detail-badges { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tab-nav { display: flex; border-bottom: 2px solid var(--border-color); margin-bottom: 12px; }
.tab-btn { flex-grow: 1; padding: 10px 8px; background: none; border: none; cursor: pointer; color: var(--text-tertiary); font-weight: 500; position: relative; transition: color 0.2s; font-size: 0.9rem; }
.tab-btn.active { color: var(--accent-primary); }
.tab-btn.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background-color: var(--accent-primary); }
.tab-content { display: none; } .tab-content.active { display: block; }
.comment-log { background-color: var(--bg-secondary); border-radius: 10px; padding: 12px; box-shadow: var(--shadow); }
.comment-log-item { padding: 8px 0; border-bottom: 1px solid var(--bg-tertiary); }
.comment-log-item:last-child { border-bottom: none; }
.comment-log-header { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-tertiary); margin-bottom: 4px; }
.comment-log-user { font-weight: 700; color: var(--text-secondary); }
.comment-log-text { font-size: 0.9rem; color: var(--text-primary); white-space: pre-wrap; word-wrap: break-word; }
.fab { position: fixed; bottom: calc(var(--bottom-nav-height) + 1rem); right: 1rem; width: 56px; height: 56px; background-color: var(--accent-primary); color: var(--accent-primary-text); border: none; border-radius: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); font-size: 1.75rem; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 999; transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out; }
.fab.hidden { transform: scale(0); opacity: 0; pointer-events: none; }
.map-container { height: 200px; width: 100%; border-radius: 10px; overflow: hidden; margin-bottom: 12px; background-color: var(--bg-tertiary); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-item { font-size: 0.85rem; }
.info-item .label { color: var(--text-tertiary); font-size: 0.75rem; margin-bottom: 2px; }
.info-item .value { font-weight: 500; }
.action-button { display: block; width: 100%; padding: 12px; margin-top: 12px; border-radius: 8px; border: none; background-color: var(--accent-primary); color: var(--accent-primary-text); font-size: 1rem; font-weight: 700; cursor: pointer; }
.alert-card { background-color: var(--danger-bg); border: 1px solid var(--danger-border); color: var(--danger-text); border-radius: 10px; padding: 12px; }
.alert-card h3 { border-bottom-color: var(--danger-border); color: var(--danger-text); }
.alert-card p { white-space: pre-wrap; }
.unit-card { background-color: var(--bg-secondary); border-radius: 10px; padding: 12px; margin-bottom: 12px; box-shadow: var(--shadow); }
.unit-card-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; margin-bottom: 10px; }
.unit-card-header .name { font-size: 1rem; font-weight: 700; }
.unit-card-header .agency { font-size: 0.8rem; color: var(--text-tertiary); }
.unit-card-header .status { font-size: 0.8rem; font-weight: 700; }
.unit-times-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; font-size: 0.8rem; }
.unit-times-grid .time-item .label { color: var(--text-tertiary); font-size: 0.7rem; }
.unit-times-grid .time-item .value { font-weight: 500; }
.radio-status-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.status-card { background-color: var(--bg-secondary); border-radius: 10px; padding: 12px; box-shadow: var(--shadow); }
.status-card h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 700; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); }
.status-item { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; padding: 6px 0; }
.status-item .label { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); }
.status-item .value { font-weight: 700; }
.value.clickable { color: var(--accent-primary); cursor: pointer; }
.location-live-info { background-color: var(--bg-tertiary); border-radius: 10px; padding: 12px; margin-top: 12px; }
.location-live-info .status-item { padding: 8px 0; border-bottom: 1px solid var(--border-color); }
.location-live-info .status-item:last-child { border-bottom: none; }
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.6); display: flex; justify-content: center; align-items: flex-start; z-index: 2000; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; padding-top: 2rem; }
.modal-overlay.visible { opacity: 1; pointer-events: auto; }
.modal-content { background-color: var(--bg-secondary); width: calc(100% - 2rem); max-width: 500px; padding: 1.5rem 1rem 1rem 1rem; border-radius: 16px; transform: translateY(-100%); transition: transform 0.3s ease; }
.modal-overlay.visible .modal-content { transform: translateY(0); }
.modal-header { font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem; }
#comment-textarea { width: 100%; min-height: 80px; padding: 12px; border-radius: 8px; border: 1px solid var(--border-color); background-color: var(--bg-primary); color: var(--text-primary); font-size: 1rem; resize: vertical; margin-bottom: 1rem; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex-grow: 1; padding: 12px; border: none; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; }
.btn-primary { background-color: var(--accent-primary); color: var(--accent-primary-text); }
.btn-secondary { background-color: var(--bg-tertiary); color: var(--text-secondary); }
.toast { position: fixed; bottom: calc(var(--bottom-nav-height) + 1.5rem); left: 50%; transform: translateX(-50%); background-color: rgba(30, 41, 59, 0.9); color: white; padding: 12px 20px; border-radius: 2rem; font-size: 0.9rem; z-index: 3000; opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, -10px); }
.settings-section { margin-bottom: 1.5rem; }
.settings-section-title { font-size: 0.9rem; font-weight: 700; color: var(--accent-primary); text-transform: uppercase; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border-color); }
.settings-item { display: flex; justify-content: space-between; align-items: center; background-color: var(--bg-secondary); padding: 1rem; border-radius: 8px; cursor: pointer; }
.settings-item + .settings-item { margin-top: 8px; }
.settings-item-label { font-weight: 500; }
.theme-toggle { display: flex; align-items: center; gap: 12px; }
.theme-toggle i { font-size: 1.25rem; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { display: none; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--bg-tertiary); transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent-primary); }
input:checked + .slider:before { transform: translateX(20px); }
.login-container { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100vh; padding: 1rem; background: var(--bg-primary); }
.login-card { width: 100%; max-width: 400px; background-color: var(--bg-secondary); padding: 2rem; border-radius: 16px; box-shadow: var(--shadow); }
.login-header { text-align: center; margin-bottom: 1.5rem; }
.login-header h1 { font-size: 1.75rem; color: var(--text-primary); }
.login-header p { color: var(--text-tertiary); }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 8px; }
.form-group input { width: 100%; padding: 12px 1rem; border-radius: 8px; border: 1px solid var(--border-color); background-color: var(--bg-primary); color: var(--text-primary); font-size: 1rem; }
.form-group input:focus { outline: none; border-color: var(--accent-primary); }
.login-alert { padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; font-size: 0.9rem; background-color: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }
.info-card { background-color: var(--bg-secondary); border-radius: 10px; padding: 12px; margin-bottom: 12px; box-shadow: var(--shadow); }
.info-card h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 700; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); }
.location-notes-card { background-color: var(--info-bg); border: 1px solid var(--info-border); }
.location-notes-card h3 { color: var(--info-text); border-bottom-color: var(--info-border); }
.location-notes-card .notes-content { color: var(--info-text); font-weight: 500; }
.notes-content { white-space: pre-wrap; font-size: 0.9rem; line-height: 1.6; }
/* ---===[ Added for multi-agency display ]===--- */
.call-card-id .header-agency {
    color: var(--text-tertiary);
    font-weight: 500;
    font-size: 0.9em;
}

.call-card-id .header-agency-divider {
    color: var(--border-color);
    margin: 0 0.5rem;
    font-weight: 400;
}

/* --- MODIFICATION START: CSS rule to disable main scroll in chat view --- */
body.chat-view-active .main-content {
    overflow-y: hidden;
}
/* --- MODIFICATION END --- */


/* ---===[ Chat Feature Styles ]===--- */
.nav-button {
    position: relative;
}
.unread-bubble {
    position: absolute;
    top: 4px;
    right: 20px;
    background-color: var(--danger-text);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.hidden {
    display: none !important;
}
.chat-agency-card {
    background-color: var(--bg-secondary);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}
.chat-agency-card:hover {
    background-color: var(--bg-tertiary);
}
.chat-agency-card .unread-bubble {
    position: static;
    background-color: var(--accent-primary);
    color: var(--accent-primary-text);
}
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%; 
    box-sizing: border-box; 
    padding: 0.5rem;
    padding-bottom: var(--bottom-nav-height); 
}
.chat-disclaimer {
    background-color: var(--info-bg);
    color: var(--info-text);
    border: 1px solid var(--info-border);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
}
.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0.25rem;
}
.chat-message-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--border-color);
}
.chat-message-card.me {
    background-color: var(--bg-tertiary);
    border-left-color: var(--accent-primary);
}
.chat-message-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}
.chat-message-author {
    font-weight: 700;
    color: var(--text-primary);
}
.chat-message-meta {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}
.chat-message-body {
    font-size: 0.95rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
}
.read-by-list {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-align: right;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    opacity: 0.7;
}
.chat-footer {
    flex-shrink: 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}
.chat-input-area {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}
#chat-message-input {
    flex-grow: 1;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    line-height: 1.4;
    resize: none;
}
#chat-message-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}
.chat-send-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: var(--accent-primary);
    color: var(--accent-primary-text);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* --- Add these new styles to the end of your style.css file --- */

/* Styling for the new chat modal textarea */
#chat-modal-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
}

/* Styling for optimistic "Sending..." message */
.chat-message-card.optimistic {
    opacity: 0.6;
}

/* Styling for failed message */
.chat-message-card.failed {
    opacity: 0.7;
    border-left-color: var(--danger-border);
}

.chat-message-card.failed .chat-message-meta {
    color: var(--danger-text);
}
/* Add this to the end of your style.css */

/* Ensure the chat messages have bottom padding to prevent FAB overlap */
.chat-container {
    padding-bottom: 110px; /* Adjust this value as needed, roughly FAB height + some margin */
}

/* Make sure the chat messages scroll correctly within their container */
.chat-messages {
    height: 100%; /* Ensure it takes full height within its padded container */
    overflow-y: auto; /* Keep scrolling behavior */
}
/* ... (all your existing CSS code above) ... */
/* ... all of your existing CSS ... */

/* --- ADD THESE NEW STYLES AT THE END --- */
/* --- ADD THESE NEW STYLES AT THE END --- */
/* --- ADD THESE NEW STYLES AT THE END --- */
/* --- ADD THESE NEW STYLES AT THE END --- */

/* --- Trestle Person Search --- */
#trestle-search-form label {
    font-size: 0.9rem; /* Match existing form labels */
    font-weight: 500;
    margin-bottom: 8px;
}

#trestle-search-form input[type="text"],
#trestle-search-form input[type="tel"] {
    font-size: 1rem; /* Match existing form inputs */
}

.trestle-hint { 
    font-size: 0.8rem; 
    color: var(--text-tertiary); 
    margin-top: 8px;
    padding-left: 4px;
}

.trestle-errors { 
    background: var(--danger-bg); 
    border: 1px solid var(--danger-border); 
    color: var(--danger-text);
    padding: 12px; 
    border-radius: 10px; 
    margin: 0 0 16px; 
}
.trestle-errors ul { 
    margin: 8px 0 0; 
    padding-left: 20px; 
}

.trestle-card {
    padding: 16px;
}

.trestle-kv .key {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.trestle-kv .value {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    word-wrap: break-word;
}

.trestle-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
    margin-top: 24px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.trestle-list { 
    margin: 8px 0 0 0; 
    padding-left: 0; 
    line-height: 1.6; 
    list-style: none;
}
.trestle-list li {
    background-color: var(--bg-primary);
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.trestle-map-wrap { 
    margin-top: 10px; 
}
.trestle-map { 
    width: 100%; 
    max-width: 100%; 
    height: 220px; 
    border-radius: 10px; 
    border: 1px solid var(--border-color); 
    background: var(--bg-tertiary);
}
.trestle-click-note { 
    font-size: 0.8rem; 
    color: var(--text-tertiary); 
    margin-top: 6px; 
}

.trestle-ap-box { 
    background: var(--bg-primary); 
    border: 1px solid var(--border-color); 
    border-radius: 10px; 
    padding: 10px; 
}
.trestle-ap-item { 
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}
.trestle-ap-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.trestle-ap-item[open] {
    padding-bottom: 12px;
}
.trestle-ap-item summary { 
    cursor: pointer;
    font-size: 1rem; 
    font-weight: 500;
    color: var(--text-primary); 
}
.trestle-ap-item[open] summary { 
    margin-bottom: 12px; 
}
/* --- VEHICLE LOOKUP STYLES --- */

/* Style for the button container at the bottom of results */
.rms-button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 2rem; /* Ensure space above the bottom navigation bar */
}

/* Custom style for secondary action buttons (Copy Report, Owner Details) */
.action-button-secondary {
    flex-grow: 1;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-button-secondary:hover {
    background-color: var(--bg-tertiary);
}

/* Specific button style (CAD integration uses a different color) */
.action-button-cad {
    flex-grow: 1;
    background-color: #329632; /* CAD Green from reference file */
    color: white;
    border: none;
}

.action-button-cad:hover {
    background-color: #2b7d2b;
}

/* Disabled state */
.action-button-secondary:disabled,
.action-button-cad:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}