/* =========================================================
   SADDLE LAKE CREE NATION - BYLAWS & NATION LAWS STYLES
   Clean, official editorial layout matching slcn125.ca
   ========================================================= */

.slcn-bylaws-wrapper {
    font-family: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--slcn-text, #212121);
    max-width: 1140px;
    margin: 0 auto;
    padding: 4px 15px 48px;
    box-sizing: border-box;
}

.slcn-bylaws-wrapper * {
    box-sizing: border-box;
}

/* Clean Editorial Intro Header (no AI gradients, orbs, or stat boxes) */
.slcn-bylaws-header {
    padding: 0 0 22px 0;
    margin-bottom: 24px;
    border-bottom: 2px solid #E8E3DA;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.slcn-bylaws-kicker {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--slcn-red, #D32F2F);
    margin-bottom: 4px;
}

.slcn-bylaws-header h1 {
    font-family: 'Inter', sans-serif !important;
    font-size: 32px !important;
    font-weight: 800 !important;
    color: var(--slcn-earth, #4E342E) !important;
    line-height: 1.2 !important;
    margin: 0 0 10px 0 !important;
    letter-spacing: -0.4px;
}

.slcn-bylaws-header p {
    font-family: 'Merriweather', Georgia, serif !important;
    font-size: 15.5px !important;
    line-height: 1.75 !important;
    color: #4A4A4A !important;
    margin: 0 !important;
    max-width: 820px;
}

.slcn-bylaws-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #666666;
    padding-top: 4px;
}

.slcn-bylaws-header-meta strong {
    color: var(--slcn-earth, #4E342E);
}

.slcn-meta-sep {
    color: #C4BCB0;
}

/* Search & Filter Controls */
.slcn-bylaws-controls {
    background: #FAF8F4;
    border: 1px solid #E6E0D5;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 20px;
}

.slcn-bylaws-search-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.slcn-bylaws-search-wrap {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.slcn-bylaws-search-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #777777;
    font-size: 14px;
    pointer-events: none;
}

.slcn-bylaws-search-input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1px solid #D5CEC2;
    border-radius: 6px;
    font-size: 14.5px;
    background: #ffffff;
    color: #212121;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.slcn-bylaws-search-input:focus {
    border-color: var(--slcn-earth, #4E342E);
    box-shadow: 0 0 0 2px rgba(78, 52, 46, 0.12);
}

.slcn-bylaws-status-filter {
    min-width: 195px;
}

.slcn-bylaws-select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #D5CEC2;
    border-radius: 6px;
    background: #ffffff;
    color: #212121;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.slcn-bylaws-select:focus {
    border-color: var(--slcn-earth, #4E342E);
}

/* Category Filter Tabs (Explicit !important to override global button rule in custom.css) */
.slcn-bylaws-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.slcn-bylaws-wrapper button.slcn-bylaw-pill {
    background-color: #ffffff !important;
    border: 1px solid #D5CEC2 !important;
    color: #4E342E !important;
    padding: 7px 14px !important;
    border-radius: 5px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease !important;
    transform: none !important;
    box-shadow: none !important;
}

.slcn-bylaws-wrapper button.slcn-bylaw-pill:hover {
    background-color: #F5F1E7 !important;
    border-color: var(--slcn-earth, #4E342E) !important;
    color: var(--slcn-earth, #4E342E) !important;
    transform: none !important;
}

.slcn-bylaws-wrapper button.slcn-bylaw-pill.active {
    background-color: var(--slcn-earth, #4E342E) !important;
    border-color: var(--slcn-earth, #4E342E) !important;
    color: #ffffff !important;
}

/* Meta Result Bar */
.slcn-bylaws-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding: 0 2px;
    font-size: 13.5px;
    color: #666666;
}

/* Document Cards List */
.slcn-bylaws-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.slcn-bylaw-card {
    background: #ffffff;
    border: 1px solid #E2DDD4;
    border-left: 4px solid var(--slcn-red, #D32F2F);
    border-radius: 6px;
    padding: 22px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.slcn-bylaw-card:hover {
    border-color: #CFC7BA;
    border-left-color: var(--slcn-red-dark, #B71C1C);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

.slcn-bylaw-card-body {
    flex: 1;
    min-width: 0;
}

.slcn-bylaw-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
}

.slcn-bylaw-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.35;
}

.slcn-bylaw-tag.tag-number {
    background: #4E342E;
    color: #ffffff;
}

.slcn-bylaw-tag.tag-category {
    background: #F5F1E7;
    color: #4E342E;
    border: 1px solid #E3DAC8;
}

.slcn-bylaw-tag.status-in-effect {
    background: #E8F5E9;
    color: #2E7D32;
}

.slcn-bylaw-tag.status-in-effect i {
    font-size: 6px;
    color: #2E7D32;
}

.slcn-bylaw-tag.status-amended {
    background: #E3F2FD;
    color: #1565C0;
}

.slcn-bylaw-tag.status-proposed {
    background: #FFF3E0;
    color: #E65100;
}

.slcn-bylaw-tag.status-archived {
    background: #EEEEEE;
    color: #616161;
}

.slcn-bylaw-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: #222222 !important;
    margin: 0 0 6px 0 !important;
}

.slcn-bylaw-cree {
    font-family: 'Merriweather', Georgia, serif;
    font-style: italic;
    font-size: 14px;
    color: #7A4B3A;
    margin-bottom: 10px;
}

.slcn-bylaw-details-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 8px 0 12px 0;
    font-size: 13.5px;
    color: #555555;
}

.slcn-bylaw-detail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.slcn-bylaw-detail i {
    color: #8D6E63;
    font-size: 13px;
}

.slcn-bylaw-summary {
    font-family: 'Merriweather', Georgia, serif !important;
    font-size: 14.5px !important;
    line-height: 1.72 !important;
    color: #3D3D3D !important;
    margin: 0 !important;
}

/* Action Buttons Column */
.slcn-bylaw-card-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: 220px;
    flex-shrink: 0;
    padding-top: 2px;
}

.slcn-bylaws-wrapper .slcn-bylaw-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 15px !important;
    border-radius: 5px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    text-align: center !important;
    width: 100%;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease !important;
    transform: none !important;
}

.slcn-bylaws-wrapper .slcn-bylaw-btn-primary {
    background-color: var(--slcn-red, #D32F2F) !important;
    border: 1.5px solid var(--slcn-red, #D32F2F) !important;
    color: #ffffff !important;
}

.slcn-bylaws-wrapper .slcn-bylaw-btn-primary:hover {
    background-color: var(--slcn-red-dark, #B71C1C) !important;
    border-color: var(--slcn-red-dark, #B71C1C) !important;
    color: #ffffff !important;
}

.slcn-bylaws-wrapper .slcn-bylaw-btn-outline {
    background-color: #ffffff !important;
    border: 1.5px solid #4E342E !important;
    color: #4E342E !important;
}

.slcn-bylaws-wrapper .slcn-bylaw-btn-outline:hover {
    background-color: #4E342E !important;
    border-color: #4E342E !important;
    color: #ffffff !important;
}

.slcn-bylaws-wrapper .slcn-bylaw-btn-secondary {
    background-color: #F5F1E7 !important;
    border: 1px solid #D9CFC0 !important;
    color: #4E342E !important;
    font-size: 12.5px !important;
    padding: 8px 12px !important;
}

.slcn-bylaws-wrapper .slcn-bylaw-btn-secondary:hover {
    background-color: #EAE2D3 !important;
    border-color: #4E342E !important;
    color: #2C1D1A !important;
}

/* Empty State */
.slcn-bylaws-empty {
    text-align: center;
    padding: 44px 24px;
    background: #ffffff;
    border: 1px dashed #D5CEC2;
    border-radius: 6px;
    color: #666666;
}

.slcn-bylaws-empty i {
    font-size: 32px;
    color: #B0A698;
    margin-bottom: 10px;
    display: block;
}

.slcn-bylaws-empty h3 {
    margin: 0 0 8px 0 !important;
    color: #4E342E !important;
    font-size: 19px !important;
}

.slcn-bylaws-empty p {
    margin: 0 0 16px 0 !important;
    font-size: 14.5px !important;
}

.slcn-bylaws-empty .slcn-bylaw-btn {
    width: auto !important;
    padding: 9px 20px !important;
}

/* Governance Footer Card */
.slcn-bylaws-footer-card {
    background: #FAF8F4;
    border: 1px solid #E6E0D5;
    border-top: 3px solid var(--slcn-earth, #4E342E);
    border-radius: 6px;
    padding: 20px 24px;
}

.slcn-bylaws-footer-text h3 {
    font-size: 17px !important;
    color: #4E342E !important;
    margin: 0 0 6px 0 !important;
}

.slcn-bylaws-footer-text p {
    font-size: 14.5px !important;
    line-height: 1.6 !important;
    color: #4A4A4A !important;
    margin: 0 0 12px 0 !important;
}

.slcn-bylaws-footer-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 14px;
    font-weight: 600;
}

.slcn-bylaws-footer-contacts a,
.slcn-bylaws-footer-contacts span {
    color: #4E342E !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.slcn-bylaws-footer-contacts a:hover {
    color: var(--slcn-red, #D32F2F) !important;
}

.slcn-bylaws-footer-contacts i {
    color: var(--slcn-red, #D32F2F);
}

/* Built-in PDF Preview Modal */
.slcn-pdf-modal[hidden] {
    display: none !important;
}

.slcn-pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.slcn-pdf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 14, 12, 0.78);
}

.slcn-pdf-modal-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1080px;
    height: 88vh;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.42);
}

.slcn-pdf-modal-header {
    background: #4E342E;
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-bottom: 3px solid var(--slcn-red, #D32F2F);
}

.slcn-pdf-modal-heading {
    min-width: 0;
}

.slcn-pdf-modal-heading h3 {
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#slcn-pdf-modal-sub {
    color: #E0D7D5;
    font-size: 12.5px;
    margin-top: 2px;
}

.slcn-pdf-modal-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.slcn-modal-action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s;
}

.slcn-modal-action-link:hover {
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff !important;
}

.slcn-modal-action-link.slcn-modal-download {
    background: var(--slcn-red, #D32F2F);
}

.slcn-modal-action-link.slcn-modal-download:hover {
    background: var(--slcn-red-dark, #B71C1C);
}

button.slcn-pdf-modal-close {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    border-radius: 4px !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
}

button.slcn-pdf-modal-close:hover {
    background: var(--slcn-red, #D32F2F) !important;
    border-color: var(--slcn-red, #D32F2F) !important;
    transform: none !important;
}

.slcn-pdf-modal-body {
    flex: 1;
    background: #525659;
    position: relative;
}

#slcn-pdf-modal-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Responsive */
@media (max-width: 860px) {
    .slcn-bylaw-card {
        flex-direction: column;
        padding: 20px;
    }
    .slcn-bylaw-card-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .slcn-bylaws-wrapper .slcn-bylaw-btn {
        width: auto;
        flex: 1 1 160px;
    }
}

@media (max-width: 640px) {
    .slcn-bylaws-header h1 {
        font-size: 25px !important;
    }
    .slcn-bylaws-status-filter {
        width: 100%;
    }
    .slcn-pdf-modal {
        padding: 8px;
    }
    .slcn-pdf-modal-dialog {
        height: 92vh;
    }
    .slcn-pdf-modal-header {
        flex-wrap: wrap;
        padding: 12px 14px;
    }
    .slcn-modal-action-link {
        font-size: 12px;
        padding: 6px 10px;
    }
}
