/**
 * Beer Festival Display Board - Projection Styles
 * 
 * Optimized for large-screen projection with high contrast and readability
 * 
 * @package Beer_Festival_Manager
 * @subpackage Display_Board
 * @since 2.4.0
 */

/* ============================================
   MAXIMISE SPACE
   ============================================ */
   
/* Hide header and navigation */
.page-id-11493 .site-header,
.page-id-11493 .ast-header,
.page-id-11493 #masthead,
.page-id-11493 .ast-primary-header,
.page-id-11493 .ast-main-header-wrap,
.page-id-11493 .main-header-bar-wrap {
    display: none !important;
}

/* Hide footer */
.page-id-11493 .site-footer,
.page-id-11493 #colophon {
    display: none !important;
}

/* Hide WordPress admin bar (when logged in) */
.page-id-11493 #wpadminbar {
    display: none !important;
}

/* Remove any padding/margin that the theme adds to page content */
.page-id-11493 .site-content,
.page-id-11493 .ast-container,
.page-id-11493 #primary,
.page-id-11493 .main-header-bar {
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure the display board takes full screen */
.page-id-11493 .site-content,
.page-id-11493 .ast-container,
.page-id-11493 #primary,
.page-id-11493 #primary .site-main {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Remove any potential body padding/margin */
.page-id-11493 {
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove any content wrappers that might add spacing */
.page-id-11493 .hentry,
.page-id-11493 .entry-content,
.page-id-11493 .entry-header {
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================
   BASE CONTAINER
   ============================================ */

.bfm-display-board {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Theme: Dark (default, recommended for projection) */
.bfm-display-board[data-theme="dark"] {
    background-color: #1a1a1a;
    color: #ffffff;
}

.bfm-display-board[data-theme="dark"] .bfm-display-table {
    background-color: #1a1a1a;
}

.bfm-display-board[data-theme="dark"] .bfm-display-table th {
    background-color: #2d2d2d;
    color: #ffffff;
    border-bottom-color: #444444;
}

.bfm-display-board[data-theme="dark"] .bfm-display-table td {
    border-bottom-color: #333333;
    color: #e0e0e0;
}

.bfm-display-board[data-theme="dark"] .bfm-display-table tr:hover td {
    background-color: #2a2a2a;
}

/* Theme: Light (alternative for bright environments) */
.bfm-display-board[data-theme="light"] {
    background-color: #ffffff;
    color: #333333;
}

.bfm-display-board[data-theme="light"] .bfm-display-table {
    background-color: #ffffff;
}

.bfm-display-board[data-theme="light"] .bfm-display-table th {
    background-color: #f0f0f0;
    color: #333333;
    border-bottom-color: #dddddd;
}

.bfm-display-board[data-theme="light"] .bfm-display-table td {
    border-bottom-color: #eeeeee;
    color: #555555;
}

.bfm-display-board[data-theme="light"] .bfm-display-table tr:hover td {
    background-color: #f9f9f9;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.bfm-display-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
    overflow: auto;
}

/* Loading state */
.bfm-display-loading {
    text-align: center;
    font-size: 24px;
    padding: 50px;
    animation: bfm-pulse 1.5s ease-in-out infinite;
}

@keyframes bfm-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ============================================
   TABLE STYLES
   ============================================ */

.bfm-display-table-wrapper {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    overflow-x: auto;
}

.bfm-display-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--bfm-base-font, 24px);
    table-layout: fixed;
    border: 2px solid #444444;  /* Add border around entire table */
}

/* Column widths */
.bfm-display-table th:first-child,
.bfm-display-table td:first-child {
    width: 25%;  /* Brewery column */
}

.bfm-display-table th:nth-child(2),
.bfm-display-table td:nth-child(2) {
    width: 35%;  /* Beer name column */
}

.bfm-display-table th:nth-child(3),
.bfm-display-table td:nth-child(3) {
    width: 8%;   /* ABV column */
}

.bfm-display-table th:nth-child(4),
.bfm-display-table td:nth-child(4) {
    width: 17%;  /* Style column */
}

.bfm-display-table th:nth-child(5),
.bfm-display-table td:nth-child(5) {
    width: 15%;  /* Status column */
}

/* Table headers */
.bfm-display-table th {
    padding: 20px 15px;
    text-align: center;
    font-weight: 600;
    font-size: var(--bfm-heading-font, 32px);
    border: 2px solid #ffffff !important;  /* Add border on all sides */
    border-top: none;  /* Remove top border to avoid double border with table border */
}

/* Table cells */
.bfm-display-table td {
    padding: 18px 15px;
    text-align: left;
    border: 2px solid #444444;  /* Add border on all sides */
    vertical-align: middle;
}

/* Remove left and right borders from first and last cells to avoid double borders with table */
.bfm-display-table th:first-child,
.bfm-display-table td:first-child {
    border-left: none;
}

.bfm-display-table th:last-child,
.bfm-display-table td:last-child {
    border-right: none;
}

/* Remove bottom border from last row to avoid double border with table */
.bfm-display-table tbody tr:last-child td {
    border-bottom: none;
}

/* For themes - dark theme borders */
.bfm-display-board[data-theme="dark"] .bfm-display-table {
    border-color: #555555;
}

.bfm-display-board[data-theme="dark"] .bfm-display-table th,
.bfm-display-board[data-theme="dark"] .bfm-display-table td {
    border-color: #555555;
}

/* For themes - light theme borders */
.bfm-display-board[data-theme="light"] .bfm-display-table {
    border-color: #dddddd;
}

.bfm-display-board[data-theme="light"] .bfm-display-table th,
.bfm-display-board[data-theme="light"] .bfm-display-table td {
    border-color: #dddddd;
}

/* Text wrapping controls */
.bfm-display-table[data-brewery-wrap="true"] td:first-child {
    white-space: normal;
    word-wrap: break-word;
}

.bfm-display-table[data-brewery-wrap="false"] td:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bfm-display-table[data-beer-wrap="true"] td:nth-child(2) {
    white-space: normal;
    word-wrap: break-word;
}

.bfm-display-table[data-beer-wrap="false"] td:nth-child(2) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   STATUS CELL STYLES
   ============================================ */

.bfm-status-cell {
    text-align: center;
    font-weight: 600;
    border-radius: 6px;
    padding: 8px 12px;
    display: inline-block;
    min-width: 100px;
}

/* Status colors */
.bfm-status-1 {
    background-color: #4CAF50;
    color: #ffffff;
}

.bfm-status-2 {
    background-color: #FF9800;
    color: #ffffff;
}

.bfm-status-3 {
    background-color: #F44336;
    color: #ffffff;
}

.bfm-status-4 {
    background-color: #2196F3;
    color: #ffffff;
}

/* ============================================
   HIGHLIGHT CHANGES (recently updated)
   ============================================ */

.bfm-display-board[data-highlight-changes="true"] tr.bfm-recently-changed {
    animation: bfm-highlight-pulse 2s ease-in-out;
    background-color: rgba(255, 193, 7, 0.15);
}

@keyframes bfm-highlight-pulse {
    0% { background-color: rgba(255, 193, 7, 0); }
    25% { background-color: rgba(255, 193, 7, 0.3); }
    50% { background-color: rgba(255, 193, 7, 0.15); }
    100% { background-color: rgba(255, 193, 7, 0); }
}

/* ============================================
   CATEGORY TITLE
   ============================================ */

.bfm-category-title {
    text-align: center;
    padding: 40px 20px;
    font-size: 48px;
    font-weight: 600;
    letter-spacing: 2px;
}

/* ============================================
   MESSAGE/SLIDE DISPLAY
   ============================================ */

.bfm-message-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000000;
}

.bfm-message-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bfm-message-content {
    text-align: center;
    font-size: 36px;
    padding: 40px;
    max-width: 80%;
}

/* ============================================
   STATUS INDICATOR (subtle, bottom-right)
   ============================================ */

.bfm-display-status {
    position: fixed;
    bottom: 15px;
    right: 15px;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #cccccc;
    font-family: monospace;
    z-index: 1000;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.bfm-display-status.visible {
    display: block !important;
}

.bfm-status-icon {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    animation: bfm-blink 1s ease-in-out infinite;
}

.bfm-status-icon.success {
    background-color: #4CAF50;
    animation: none;
}

.bfm-status-icon.warning {
    background-color: #FF9800;
}

.bfm-status-icon.error {
    background-color: #F44336;
}

.bfm-status-icon.loading {
    background-color: #FFC107;
}

@keyframes bfm-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

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

/* For very large screens (4K+) */
@media (min-width: 2560px) {
    .bfm-display-table th,
    .bfm-display-table td {
        padding: 30px 25px;
    }
    
    .bfm-status-cell {
        min-width: 140px;
        padding: 12px 18px;
    }
}

/* For smaller projection screens (720p) */
@media (max-width: 1280px) {
    .bfm-display-container {
        padding: 20px;
    }
    
    .bfm-display-table th,
    .bfm-display-table td {
        padding: 12px 10px;
    }
    
    .bfm-status-cell {
        min-width: 80px;
        padding: 6px 10px;
    }
}

/* Hide scrollbars for cleaner look (optional - keeps functionality) */
.bfm-display-container {
    scrollbar-width: thin;
}

.bfm-display-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.bfm-display-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.bfm-display-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

/* Print styles - hide status indicator when printing (if ever needed) */
@media print {
    .bfm-display-status {
        display: none !important;
    }
}