/* tracker.css - Premium Legislative Dashboard Styles */

.tracker-dashboard {
    max-width: 1050px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

.header-title-area h1 {
    font-size: 1.75rem;
    margin-bottom: 4px;
}

/* --- SEARCH & FILTERS --- */
.controls-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    font-size: 0.95rem;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    transition: all 0.15s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 3px var(--brand-teal-light);
}

/* Reuse pro-filter-bar from grants, slightly modified for tabs */
.pro-filter-bar {
    display: inline-flex;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 4px;
    box-shadow: var(--shadow-sm);
}

.filter-btn {
    background: transparent;
    border: none;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--bg-app);
    color: var(--brand-navy);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sub-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.topic-pill {
    padding: 4px 12px;
    font-size: 0.8rem;
    border-radius: 20px;
    background: var(--bg-app);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.topic-pill:hover,
.topic-pill.active {
    background: var(--brand-navy);
    color: white;
    border-color: var(--brand-navy);
}

/* --- LEGISLATION LIST CARDS --- */
.legislation-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.leg-row {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.leg-row:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-teal);
}

.leg-main h3 {
    font-size: 1.1rem;
    color: var(--brand-navy);
    margin-bottom: 6px;
}

.leg-ref {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.leg-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.leg-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 12px;
    min-width: 150px;
}

/* Badges */
.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.status-draft {
    background: #fef3c7;
    color: #92400e;
}

.status-trilogue {
    background: #e0e7ff;
    color: #3730a3;
}

.status-adopted {
    background: #dcfce7;
    color: #166534;
}

.status-transposition {
    background: #ffedd5;
    color: #c2410c;
}

.status-implemented {
    background: #f3f4f6;
    color: #374151;
}

.country-flag {
    font-size: 1.5rem;
    line-height: 1;
}

/* --- MODAL SPECIFICS --- */
/* (Reuses modal-overlay, leg-modal from grants, but renamed classes slightly for isolation) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 24, 39, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    backdrop-filter: blur(4px);
}

.leg-modal {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-surface-hover);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-tertiary);
    cursor: pointer;
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
}

.modal-body h2 {
    font-size: 1.5rem;
    color: var(--brand-navy);
    margin-bottom: 4px;
}

.leg-reference {
    font-family: monospace;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.status-area {
    background: var(--bg-app);
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.rich-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

.highlight-box {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding: 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.highlight-box h3 {
    color: #166534;
}

.highlight-box p {
    color: #15803d;
}