/**
 * TCC CRM Page Styles
 * Consistent styling for all pages following TCC Brand Guide
 * Colors: Navy (#273566), Red (#e31837), White (#ffffff)
 * Created: January 30, 2026
 */

/* ===========================================
 * PAGE HEADER BANNERS
 * Each page can use a different variant for visual distinction
 * =========================================== */

/* State Legislature Banner - Navy gradient with prominent styling */
.page-header-banner {
    background: linear-gradient(135deg, #273566 0%, #1e2a52 50%, #273566 100%);
    box-shadow: 0 4px 12px rgba(39, 53, 102, 0.3);
    padding: 1.5rem 2rem;
    border-radius: 0.5rem;
    color: white;
}

.page-header-banner .page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.page-header-banner .btn-light {
    background: white;
    color: #273566;
    border: 2px solid white;
    font-weight: 600;
}

.page-header-banner .btn-light:hover {
    background: #f0f0f0;
    border-color: #f0f0f0;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg, 0.75rem);
    color: white;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header__content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.page-header__icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.page-header__icon i {
    display: block;
}

.page-header__text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.page-header__title {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.page-header__subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.page-header__actions {
    display: flex;
    gap: 0.75rem;
}

/* Navy Banner - Default/Standard */
.page-header--navy {
    background: linear-gradient(135deg, #273566 0%, #1e2a52 50%, #273566 100%);
    box-shadow: 0 4px 12px rgba(39, 53, 102, 0.3);
}

/* Navy Light Banner - Softer variant */
.page-header--navy-light {
    background: linear-gradient(135deg, #3d4d7a 0%, #273566 100%);
    box-shadow: 0 4px 12px rgba(39, 53, 102, 0.25);
}

/* Red Banner - For attention/urgent pages */
.page-header--red {
    background: linear-gradient(135deg, #e31837 0%, #c4142f 50%, #e31837 100%);
    box-shadow: 0 4px 12px rgba(227, 24, 55, 0.3);
}

/* Red Light Banner - Softer urgent */
.page-header--red-light {
    background: linear-gradient(135deg, #ef4444 0%, #e31837 100%);
    box-shadow: 0 4px 12px rgba(227, 24, 55, 0.25);
}

/* Navy with Red Accent - For mixed importance */
.page-header--navy-accent {
    background: linear-gradient(135deg, #273566 0%, #1e2a52 100%);
    border-left: 5px solid #e31837;
    box-shadow: 0 4px 12px rgba(39, 53, 102, 0.3);
}

/* Navy Subtle - For admin/settings pages */
.page-header--navy-subtle {
    background: linear-gradient(180deg, #273566 0%, #3d4d7a 100%);
    box-shadow: 0 4px 12px rgba(39, 53, 102, 0.2);
}

/* ===========================================
 * TCC BRANDED BADGES
 * Replace Bootstrap semantic colors
 * =========================================== */

.badge {
    padding: 0.35em 0.65em;
    font-size: 0.8em;
    font-weight: 600;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Navy badge - Primary actions, connected calls */
.badge--navy {
    background-color: #273566;
    color: white;
}

/* Navy light badge - Secondary info */
.badge--navy-light {
    background-color: rgba(39, 53, 102, 0.15);
    color: #273566;
    border: 1px solid rgba(39, 53, 102, 0.3);
}

/* Red badge - Warnings, do not call */
.badge--red {
    background-color: #e31837;
    color: white;
}

/* Red light badge - Follow-ups, attention needed */
.badge--red-light {
    background-color: rgba(227, 24, 55, 0.12);
    color: #c4142f;
    border: 1px solid rgba(227, 24, 55, 0.3);
}

/* Muted badge - Inactive/neutral states */
.badge--muted {
    background-color: #6c757d;
    color: white;
}

/* ===========================================
 * TCC TABLE STYLING
 * Zebra striping, hover effects, consistent colors
 * =========================================== */

.tcc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.tcc-table__header {
    background: linear-gradient(180deg, rgba(39, 53, 102, 0.08) 0%, rgba(39, 53, 102, 0.04) 100%);
}

.tcc-table__header th {
    padding: 0.875rem 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #273566;
    border-bottom: 2px solid rgba(39, 53, 102, 0.15);
    white-space: nowrap;
}

.tcc-table__body .tcc-table__row {
    transition: all 0.2s ease;
}

/* Zebra striping */
.tcc-table__body .tcc-table__row:nth-child(odd) {
    background-color: white;
}

.tcc-table__body .tcc-table__row:nth-child(even) {
    background-color: rgba(248, 250, 252, 0.6);
}

/* Hover effect - more visible */
.tcc-table__body .tcc-table__row:hover {
    background-color: rgba(39, 53, 102, 0.12) !important;
    box-shadow: inset 0 0 0 1px rgba(39, 53, 102, 0.2);
    cursor: pointer;
}

.tcc-table__body .tcc-table__row:hover td {
    color: #1e2a52;
}

.tcc-table__body td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

/* Overdue row styling */
.tcc-table__row--overdue {
    background-color: rgba(227, 24, 55, 0.06) !important;
    border-left: 3px solid #e31837;
}

.tcc-table__row--overdue:hover {
    background-color: rgba(227, 24, 55, 0.1) !important;
}

/* ===========================================
 * TCC CARDS
 * Consistent card styling with shadows
 * =========================================== */

.tcc-card {
    border: 1px solid var(--color-border-light, rgba(0, 0, 0, 0.08));
    border-radius: var(--radius-lg, 0.75rem);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06),
                0 4px 16px rgba(39, 53, 102, 0.04);
    transition: box-shadow 0.3s ease;
    overflow: hidden;
}

.tcc-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
                0 8px 24px rgba(39, 53, 102, 0.06);
}

/* ===========================================
 * STAT CARDS - Brand Colors Only
 * =========================================== */

.stat-card-tcc {
    padding: 1.25rem;
    border-radius: var(--radius-lg, 0.75rem);
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
}

/* Navy stat card */
.stat-card-tcc--navy {
    background: linear-gradient(135deg, #273566 0%, #1e2a52 100%);
    color: white;
}

/* Navy light stat card */
.stat-card-tcc--navy-light {
    background: rgba(39, 53, 102, 0.08);
    border-color: rgba(39, 53, 102, 0.15);
    color: #273566;
}

/* Red stat card */
.stat-card-tcc--red {
    background: linear-gradient(135deg, #e31837 0%, #c4142f 100%);
    color: white;
}

/* Red light stat card */
.stat-card-tcc--red-light {
    background: rgba(227, 24, 55, 0.08);
    border-color: rgba(227, 24, 55, 0.15);
    color: #c4142f;
}

/* White stat card with navy text */
.stat-card-tcc--white {
    background: white;
    border-color: rgba(39, 53, 102, 0.15);
    color: #273566;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-card-tcc__value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card-tcc__label {
    font-size: 0.875rem;
    opacity: 0.85;
    margin-top: 0.25rem;
}

.stat-card-tcc {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card-tcc:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===========================================
 * SECTION HEADERS
 * For grouping content within pages
 * =========================================== */

.section-header-tcc {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(90deg, rgba(39, 53, 102, 0.1) 0%, transparent 100%);
    border-left: 4px solid #273566;
    border-radius: 0 var(--radius-md, 0.5rem) var(--radius-md, 0.5rem) 0;
    margin-bottom: 1rem;
}

.section-header-tcc--red {
    background: linear-gradient(90deg, rgba(227, 24, 55, 0.1) 0%, transparent 100%);
    border-left-color: #e31837;
}

.section-header-tcc__icon {
    color: #273566;
    font-size: 1.25rem;
}

.section-header-tcc--red .section-header-tcc__icon {
    color: #e31837;
}

.section-header-tcc__title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #273566;
    margin: 0;
}

.section-header-tcc--red .section-header-tcc__title {
    color: #c4142f;
}

/* ===========================================
 * INFO BOXES
 * Replace cyan/yellow alert boxes
 * =========================================== */

.info-box-tcc {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md, 0.5rem);
    margin-bottom: 1rem;
}

/* Navy info box */
.info-box-tcc--navy {
    background: rgba(39, 53, 102, 0.08);
    border: 1px solid rgba(39, 53, 102, 0.2);
    color: #273566;
}

/* Red warning box */
.info-box-tcc--red {
    background: rgba(227, 24, 55, 0.08);
    border: 1px solid rgba(227, 24, 55, 0.2);
    color: #c4142f;
}

.info-box-tcc__title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===========================================
 * BUTTON VARIANTS
 * Consistent with TCC brand
 * =========================================== */

.btn-tcc-navy {
    background-color: #273566;
    border-color: #273566;
    color: white;
}

.btn-tcc-navy:hover {
    background-color: #1e2a52;
    border-color: #1e2a52;
    color: white;
}

.btn-tcc-red {
    background-color: #e31837;
    border-color: #e31837;
    color: white;
}

.btn-tcc-red:hover {
    background-color: #c4142f;
    border-color: #c4142f;
    color: white;
}

.btn-outline-tcc-navy {
    background-color: transparent;
    border-color: #273566;
    color: #273566;
}

.btn-outline-tcc-navy:hover {
    background-color: #273566;
    color: white;
}

.btn-outline-tcc-red {
    background-color: transparent;
    border-color: #e31837;
    color: #c4142f;
}

.btn-outline-tcc-red:hover {
    background-color: #e31837;
    border-color: #e31837;
    color: white;
}

/* ===========================================
 * FILTER CARDS
 * Consistent filter panel styling
 * =========================================== */

.filter-card-tcc {
    background: white;
    border: 1px solid var(--color-border-light, rgba(0, 0, 0, 0.08));
    border-radius: var(--radius-lg, 0.75rem);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.filter-card-tcc__header {
    background: linear-gradient(135deg, rgba(39, 53, 102, 0.06) 0%, rgba(39, 53, 102, 0.02) 100%);
    margin: -1.25rem -1.25rem 1rem -1.25rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid rgba(39, 53, 102, 0.1);
    font-weight: 600;
    color: #273566;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===========================================
 * PRIORITY BADGES
 * For follow-up priorities
 * =========================================== */

.priority-badge {
    padding: 0.25em 0.5em;
    font-size: 0.7em;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.priority-badge--high {
    background-color: #e31837;
    color: white;
}

.priority-badge--medium {
    background-color: rgba(39, 53, 102, 0.15);
    color: #273566;
}

.priority-badge--low {
    background-color: rgba(39, 53, 102, 0.08);
    color: #5a6a8a;
}

/* ===========================================
 * OVERDUE INDICATOR
 * =========================================== */

.overdue-badge {
    background-color: #e31837;
    color: white;
    padding: 0.2em 0.5em;
    font-size: 0.7em;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

/* ===========================================
 * RESPONSIVE ADJUSTMENTS
 * =========================================== */

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
    }

    .page-header__content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .page-header__icon {
        font-size: 2rem;
    }

    .page-header__title {
        font-size: 1.5rem;
    }

    .page-header__actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .page-header__actions .btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .page-header__actions {
        flex-direction: column;
    }

    .page-header__actions .btn {
        flex: none;
        width: 100%;
    }
}

/* ===========================================
 * TCC CARD HEADERS
 * Standard card header styling variants
 * =========================================== */

.tcc-card__header {
    background: linear-gradient(135deg, rgba(39, 53, 102, 0.08) 0%, rgba(39, 53, 102, 0.04) 100%);
    color: #273566;
    font-weight: 600;
}

.tcc-card__header--red {
    background: linear-gradient(135deg, rgba(227, 24, 55, 0.08) 0%, rgba(227, 24, 55, 0.04) 100%);
    color: #c4142f;
}

/* ===========================================
 * TEXT UTILITY CLASSES
 * Brand-specific text colors
 * =========================================== */

.text-tcc-navy { color: #273566 !important; }
.text-tcc-red { color: #e31837 !important; }

/* ===========================================
 * BOOTSTRAP-TO-TCC COLOR OVERRIDES
 * Remap Bootstrap semantic colors to TCC brand
 * Navy replaces: primary, success, info
 * Red replaces: danger, warning
 * =========================================== */

/* --- Badge / Background Overrides --- */
.bg-primary { background-color: #273566 !important; }
.bg-success { background-color: #273566 !important; }
.bg-info { background-color: rgba(39, 53, 102, 0.15) !important; color: #273566 !important; }
.bg-warning { background-color: rgba(227, 24, 55, 0.12) !important; color: #e31837 !important; }
.bg-danger { background-color: #e31837 !important; }

/* --- Solid Button Overrides --- */
.btn-success { background-color: #273566 !important; border-color: #273566 !important; color: white !important; }
.btn-success:hover { background-color: #1e2a52 !important; border-color: #1e2a52 !important; }
.btn-danger { background-color: #e31837 !important; border-color: #e31837 !important; color: white !important; }
.btn-danger:hover { background-color: #c4142f !important; border-color: #c4142f !important; }
.btn-warning { background-color: #e31837 !important; border-color: #e31837 !important; color: white !important; }
.btn-warning:hover { background-color: #c4142f !important; border-color: #c4142f !important; }
.btn-info { background-color: rgba(39, 53, 102, 0.15) !important; border-color: #273566 !important; color: #273566 !important; }
.btn-info:hover { background-color: #273566 !important; color: white !important; }

/* --- Outline Button Overrides --- */
.btn-outline-primary { border-color: #273566 !important; color: #273566 !important; }
.btn-outline-primary:hover { background-color: #273566 !important; border-color: #273566 !important; color: white !important; }
.btn-outline-success { border-color: #273566 !important; color: #273566 !important; }
.btn-outline-success:hover { background-color: #273566 !important; border-color: #273566 !important; color: white !important; }
.btn-outline-danger { border-color: #e31837 !important; color: #e31837 !important; }
.btn-outline-danger:hover { background-color: #e31837 !important; border-color: #e31837 !important; color: white !important; }
.btn-outline-warning { border-color: #e31837 !important; color: #e31837 !important; }
.btn-outline-warning:hover { background-color: #e31837 !important; border-color: #e31837 !important; color: white !important; }
.btn-outline-info { border-color: #273566 !important; color: #273566 !important; }
.btn-outline-info:hover { background-color: #273566 !important; border-color: #273566 !important; color: white !important; }

/* --- Alert Overrides --- */
.alert-success { background-color: rgba(39, 53, 102, 0.08) !important; border-color: rgba(39, 53, 102, 0.2) !important; color: #273566 !important; }
.alert-info { background-color: rgba(39, 53, 102, 0.08) !important; border-color: rgba(39, 53, 102, 0.2) !important; color: #273566 !important; }
.alert-warning { background-color: rgba(227, 24, 55, 0.08) !important; border-color: rgba(227, 24, 55, 0.2) !important; color: #c4142f !important; }
.alert-danger { background-color: rgba(227, 24, 55, 0.08) !important; border-color: rgba(227, 24, 55, 0.2) !important; color: #c4142f !important; }

/* --- Text Color Overrides --- */
.text-primary { color: #273566 !important; }
.text-success { color: #273566 !important; }
.text-info { color: #273566 !important; }
.text-warning { color: #e31837 !important; }
.text-danger { color: #e31837 !important; }

/* --- Table Row Overrides --- */
.table-success { background-color: rgba(39, 53, 102, 0.08) !important; }
.table-danger { background-color: rgba(227, 24, 55, 0.08) !important; }
.table-warning { background-color: rgba(227, 24, 55, 0.06) !important; }
.table-info { background-color: rgba(39, 53, 102, 0.06) !important; }
.table-secondary { background-color: rgba(108, 117, 125, 0.08) !important; }

/* --- Border Color Overrides --- */
.border-success { border-color: #273566 !important; }
.border-danger { border-color: #e31837 !important; }
.border-warning { border-color: #e31837 !important; }
.border-info { border-color: #273566 !important; }
.border-primary { border-color: #273566 !important; }

/* ===========================================
 * USER AVATAR STYLES (Global)
 * Used in navbar, PM module, comments, etc.
 * =========================================== */

.pm-avatar-img {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(39, 53, 102, 0.2);
}

.pm-avatar-img.pm-avatar--sm {
    width: 1.5rem;
    height: 1.5rem;
}

.pm-avatar-img.pm-avatar--nav {
    width: 1.75rem;
    height: 1.75rem;
    border-width: 1.5px;
}
