/* Board of Directors Document Portal Styles */
/* All scoped under .bod-wrapper to avoid affecting other apps */

.bod-wrapper {
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    background-color: #f5f6fa;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Header */
.bod-header {
    background-color: #fff;
    color: #333;
    border-bottom: 3px solid #ed8936;
}

.bod-header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 20px;
    display: flex;
    align-items: center;
}

.bod-logo {
    height: 50px;
    width: auto;
    flex-shrink: 0;
}

.bod-header-text {
    flex: 1;
    text-align: center;
}

.bod-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin: 0;
    color: #1a365d;
    text-transform: uppercase;
}

.bod-subheading {
    margin-top: 4px;
    font-size: 2rem;
    color: #666;
    text-transform: uppercase;
}

/* Main layout with sidebar */
.bod-main-layout {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
}

.bod-sidebar {
    width: 200px;
    flex-shrink: 0;
    background-color: #f0f0f0;
    padding: 20px 0;
    min-height: calc(100vh - 100px);
}

.bod-sidebar-nav {
    display: flex;
    flex-direction: column;
}

.bod-sidebar-link {
    display: block;
    padding: 10px 20px;
    color: #d23f08;
    text-decoration: none;
    font-size: 0.95rem;
}

.bod-sidebar-link:hover {
    background-color: #e2e2e2;
    color: rgb(35, 82, 124);
    text-decoration: underline;
}

.bod-sidebar-link-nourl {
    color: #555;
    cursor: default;
}

.bod-sidebar-link-nourl:hover {
    background-color: inherit;
    color: #555;
    text-decoration: none;
}

/* Content */
.bod-content {
    flex: 1;
    max-width: 1000px;
    padding: 30px 20px;
}

.bod-content-full {
    max-width: 100%;
}

.bod-page {
    min-height: 400px;
}

.bod-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.1rem;
    color: #666;
}

/* Login */
.bod-login-container {
    display: flex;
    justify-content: center;
    padding-top: 60px;
}

.bod-login-card {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.bod-login-card h2 {
    margin: 0 0 10px;
    color: #1a365d;
}

.bod-login-card p {
    color: #666;
    margin-bottom: 24px;
}

.bod-form-group {
    margin-bottom: 16px;
}

.bod-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.bod-input:focus {
    outline: none;
    border-color: #1a365d;
    box-shadow: 0 0 0 2px rgba(26, 54, 93, 0.15);
}

.bod-input-sm {
    padding: 6px 10px;
    font-size: 0.9rem;
}

/* Buttons */
.bod-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.bod-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.bod-btn-primary {
    background-color: #1a365d;
    color: #fff;
}

.bod-btn-primary:hover:not(:disabled) {
    background-color: #2a4a7f;
}

.bod-btn-secondary {
    background-color: #e2e8f0;
    color: #333;
}

.bod-btn-secondary:hover:not(:disabled) {
    background-color: #cbd5e0;
}

.bod-btn-danger {
    background-color: #c53030;
    color: #fff;
}

.bod-btn-danger:hover:not(:disabled) {
    background-color: #e53e3e;
}

.bod-btn-sm {
    padding: 4px 10px;
    font-size: 0.85rem;
}

.bod-btn-icon {
    background: none;
    border: 1px solid #ccc;
    padding: 4px 8px;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
}

.bod-btn-icon:hover {
    background-color: #e2e8f0;
}

.bod-btn-role-active {
    background-color: #ed8936;
    color: #fff;
}

.bod-btn-role-active:hover {
    background-color: #dd6b20;
}

.bod-visibility-select {
    width: auto;
    padding: 4px 6px;
    font-size: 0.82rem;
}

/* Alerts */
.bod-alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.bod-alert-error {
    background-color: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.bod-alert-success {
    background-color: #c6f6d5;
    color: #276749;
    border: 1px solid #9ae6b4;
}

/* File List */
.bod-file-list-container {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bod-file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.bod-file-list-header h2 {
    margin: 0;
    color: #1a365d;
}

.bod-no-files {
    text-align: center;
    color: #999;
    padding: 40px;
}

/* Role-restricted items (bold + italic on viewer) */
.bod-restricted {
    font-weight: bold;
    font-style: italic;
}

/* Agenda list (viewer) */
.bod-agenda-link {
    color: #d23f08;
    text-decoration: none;
}

.bod-agenda-link:hover {
    color: rgb(35, 82, 124);
    text-decoration: underline;
}

.bod-agenda-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bod-agenda-list > li {
    padding: 6px 0;
    font-size: 1rem;
}

.bod-agenda-list > li::before {
    content: "\2022";
    color: #1a365d;
    font-weight: bold;
    margin-right: 8px;
}

.bod-agenda-sublist {
    list-style: none;
    padding-left: 24px;
    margin: 4px 0;
}

.bod-agenda-sublist > li {
    padding: 4px 0;
    font-size: 0.95rem;
}

.bod-agenda-sublist > li::before {
    content: "\25E6";
    color: #666;
    margin-right: 8px;
}

.bod-agenda-item a {
    color: #d23f08;
    text-decoration: none;
}

.bod-agenda-item a:hover {
    text-decoration: underline;
    color: rgb(35, 82, 124);
}

/* Admin */
.bod-admin-container {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bod-admin-section {
    margin-bottom: 24px;
}

.bod-admin-section h3 {
    color: #1a365d;
    margin: 0 0 10px;
}

.bod-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.bod-section-header h3 {
    margin: 0;
}

/* Sub-heading controls */
.bod-subheading-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.bod-subheading-controls .bod-input {
    flex: 1;
}

/* Preview section */
.bod-preview-section {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Upload section */
.bod-upload-section {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 24px;
}

.bod-upload-section h3 {
    margin: 0 0 12px;
    color: #1a365d;
}

.bod-upload-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.bod-file-input {
    flex: 1;
    font-size: 0.95rem;
}

/* Admin item rows (sidebar links, agenda items) */
.bod-admin-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    margin-bottom: 4px;
    background: #fff;
    position: relative;
    flex-wrap: wrap;
}

.bod-admin-item-row:hover {
    background-color: #f7fafc;
}

.bod-admin-item-restricted {
    border-color: #fbd38d;
    background-color: #fffff0;
}


.bod-item-text {
    flex: 1;
    min-width: 100px;
    font-size: 0.95rem;
}

.bod-item-link-badge {
    font-size: 0.8rem;
    color: #666;
    flex-shrink: 0;
}

.bod-item-actions {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.bod-inline-edit {
    flex: 1;
    min-width: 150px;
}

.bod-badge-role {
    font-size: 0.75rem;
    background-color: #ed8936;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    flex-shrink: 0;
}

.bod-no-files-sm {
    padding: 12px 16px;
    color: #999;
    font-size: 0.9rem;
    margin: 0;
}

/* Agenda header admin row */
.bod-admin-agenda-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: rgb(51, 51, 51);
    border: 1px solid rgb(51, 51, 51);
    border-radius: 4px;
    margin-bottom: 4px;
}

.bod-admin-agenda-header-text {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.bod-btn-icon-light {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 4px 8px;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
}

.bod-btn-icon-light:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Popup anchor — positions the menu relative to the gear button */
.bod-popup-anchor {
    position: relative;
    display: inline-block;
}

/* Popup menu */
.bod-popup-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    padding: 4px 0;
}

.bod-popup-option {
    display: block;
    width: 100%;
    padding: 8px 16px;
    border: none;
    background: none;
    text-align: left;
    font-size: 0.9rem;
    cursor: pointer;
    color: #333;
}

.bod-popup-option:hover {
    background-color: #f0f0f0;
}

.bod-popup-close {
    color: #999;
    border-top: 1px solid #eee;
    margin-top: 4px;
}

/* Modal overlay for add-link and replace-file dialogs */
.bod-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bod-modal {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.bod-modal h3 {
    margin: 0 0 16px;
    color: #1a365d;
}

.bod-modal-section {
    margin-bottom: 16px;
}

.bod-modal-section label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}

/* File list header buttons */
.bod-file-list-header > div {
    display: flex;
    gap: 8px;
}

.bod-back-link {
    margin-top: 20px;
}

.bod-back-link a {
    color: #666;
    text-decoration: none;
}

.bod-back-link a:hover {
    text-decoration: underline;
}

.bod-checkbox-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
}

/* ---- File Manager ---- */

.bod-fm-filter-bar {
    display: flex;
    gap: 4px;
    align-items: center;
}

.bod-fm-filter-btn {
    padding: 4px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 20px;
    background: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    color: #555;
}

.bod-fm-filter-btn:hover {
    background: #e2e8f0;
}

.bod-fm-filter-btn-active {
    background: #1a365d;
    color: #fff;
    border-color: #1a365d;
}

.bod-fm-sort-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #555;
}

.bod-fm-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.bod-fm-file-row {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    margin-bottom: 6px;
    background: #fff;
}

.bod-fm-file-row:hover {
    background: #f7fafc;
}

.bod-fm-file-row-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bod-fm-file-name {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    min-width: 120px;
}

.bod-fm-file-meta {
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
}

.bod-fm-usage-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
    padding-left: 4px;
}

.bod-fm-usage-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.bod-fm-usage-badge-sidebar {
    background-color: #bee3f8;
    color: #2b6cb0;
}

.bod-fm-usage-badge-agenda {
    background-color: #c6f6d5;
    color: #276749;
}

.bod-fm-unused-dim .bod-fm-file-name {
    color: #aaa;
}

.bod-fm-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.bod-fm-rename-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.bod-fm-ext-label {
    font-size: 0.9rem;
    color: #555;
    white-space: nowrap;
}

.bod-fm-upload-zone {
    border: 2px dashed #a0aec0;
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
    background: #f7fafc;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 8px;
}

.bod-fm-upload-zone:hover,
.bod-fm-upload-zone.drag-over {
    border-color: #1a365d;
    background: #ebf4ff;
}

.bod-fm-upload-zone p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.bod-fm-upload-results {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    font-size: 0.85rem;
}

.bod-fm-upload-results li {
    padding: 3px 0;
}

.bod-fm-upload-ok {
    color: #276749;
}

.bod-fm-upload-err {
    color: #c53030;
}

.bod-fm-broken-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #feb2b2;
    border-radius: 4px;
    margin-bottom: 4px;
    background: #fff5f5;
    flex-wrap: wrap;
}

.bod-fm-broken-name {
    flex: 1;
    font-size: 0.9rem;
    color: #c53030;
    min-width: 120px;
}

.bod-fm-broken-ref {
    font-size: 0.8rem;
    color: #888;
}

.bod-fm-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 16px 0 6px;
}

.bod-fm-protected-badge {
    font-size: 0.75rem;
    background-color: #e2e8f0;
    color: #555;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    flex-shrink: 0;
}
