/* Outer container to center and allow horizontal scroll */
#outer-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    overflow-x: auto;
}
/* Inner container for scaling content */
#scale-wrapper {
    transform-origin: top center;
    transition: transform 0.2s ease-out;
}

/* Material Design Default Variables */
:root {
    --md-primary: #08b0f5;
    --md-on-primary: #ffffff;
    --md-surface: #ffffff;
    --md-text: #000000;
    --md-secondary-pink: #ff016d;
    --md-secondary-green: #0daa17;
    --md-secondary-yellow: #fed600;
    --spacing-unit: 8px;

    --md-elevation-4: 0px 4px 8px rgba(0, 0, 0, 0.16);
    --md-elevation-6: 0px 6px 12px rgba(0, 0, 0, 0.20);
}

/* Global Styles */
body,
button,
input {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: var(--md-surface);
    color: var(--md-text);
    margin: 0;
    padding: 0;
}

h1,
h2 {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.15px;
    color: #212121;
}

/* Containers */
.chart-container {
    display: flex;
    gap: 30px;
    justify-content: space-around;
    padding: 0 16px;
    margin-bottom: calc(var(--spacing-unit) * 3);
    flex-wrap: nowrap;
    /* allow scaling via transform */
    /* transform-origin and transition moved to #seating-wrapper */
}

.side-container {
    border-radius: 4px;
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 5);
    background-color: var(--md-surface);
    box-shadow: var(--md-elevation-4);
    margin-bottom: calc(var(--spacing-unit) * 3);
    flex: 0 0 auto;
    min-width: 300px;
}

.side-container h2 {
    margin-bottom: 16px;
    text-transform: uppercase;
}

/* Seat Grid */
.row {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-unit);
}

.row-name {
    width: 10px;
    font-weight: 500;
    font-size: 80%;
    text-align: center;
    margin-right: 8px;
}

 .seat-container {
    display: grid;
    /* Grid spacing as per the initial design specification */
    grid-gap: 7px 11px;
    padding: 11px 20px;
}

 .side-A .seat-container {
    /* fixed column count for side A */
    grid-template-columns: repeat(4, 100px);
}

 .side-B .seat-container {
    /* fixed column count for side B */
    grid-template-columns: repeat(6, 100px);
}

/* Seats */
.seat {
    width: 100px;
    height: 50px;
    font-size: 13px;
    /* reduce slightly */
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background-color: #EEEEEE;
    text-align: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 10;
}

.seat:hover {
    transform: translateY(-3px);
    box-shadow: var(--md-elevation-6);
    z-index: 9999;
    filter: brightness(1.05);
}
/* Keyboard focus style for seat */
.seat:focus {
    outline: 2px solid var(--md-secondary-pink);
    outline-offset: 2px;
    transform: translateY(-3px);
    box-shadow: var(--md-elevation-6);
}

.seat.occupied {
    background-color: var(--md-primary);
}

.seat.empty {
    border: 1px dashed var(--md-secondary-green);
    background-color: rgba(13, 170, 23, 0.1);
}

.name {
    font-weight: normal;
    opacity: 0.9;
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--md-on-primary);
}

.avatar {
    top: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--md-primary);
    color: var(--md-on-primary);
    font-size: 11px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: var(--md-elevation-4);
    z-index: 20;
    overflow: hidden;
    transition: transform 0.2s;
}



.seat.occupied:hover::after {
    content: attr(data-name);
    font-weight: 500;
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--md-text);
    color: var(--md-on-primary);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    animation: fadeIn 0.1s forwards;
    z-index: 9999;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Search Bar */

.search-container {
    /* position: absolute;
    top: 50%;
    left: 50%; */
    /* transform: translate(-50%, -50%); */
    justify-content: center;
    align-items: center;
    display: flex;
    flex: 1;
    max-width: 400px;
    gap: 8px;
    z-index: 1000;
}

.search-input {
    padding: 14px 12px;
    font-size: 14px;
    flex: 1;
    width: 100%;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    box-shadow: var(--md-elevation-4);
}

/* Clear button for search: always visible but toggled via disabled attribute */
.clear-btn {
    padding: 6px 10px;
    font-size: 14px;
    background-color: rgba(0, 174, 239, 0.1);
    border: 1px solid var(--md-primary);
    border-radius: 4px;
    color: var(--md-primary);
    font-weight: 500;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.clear-btn:not(:disabled):hover {
    background-color: var(--md-primary);
    color: var(--md-on-primary);
    box-shadow: var(--md-elevation-4);
}

/* Toggled off when disabled */
.clear-btn:disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

/* Link to Office Faces directory in header search */
.faces-link {
    margin-left: 8px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 500;
    background-color: rgba(0, 174, 239, 0.1);
    border: 1px solid var(--md-primary);
    border-radius: 4px;
    color: var(--md-primary);
    text-decoration: none;
    transition: background-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.faces-link:hover,
.faces-link:focus-visible {
    background-color: var(--md-primary);
    color: var(--md-on-primary);
    box-shadow: var(--md-elevation-4);
    text-decoration: none;
}



.search-input:focus {
    border-bottom-color: var(--md-primary);
}
.search-input:focus-visible {
    outline: 2px solid var(--md-secondary-pink);
    outline-offset: 2px;
}

.highlight {
    background-color: var(--md-secondary-yellow) !important;
    color: #000;
}
/* Ensure name text inside highlighted seats stays high-contrast */
.seat.highlight .name {
    color: #000 !important;
    font-weight: 500;
}
/* Easter egg celebration overlay */
.easter-egg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 10;
    text-align: center;
}
/* Frame styling for Alex's photo in the easter egg */
.alex-frame {
    border: 4px dashed var(--md-secondary-pink);
    padding: 12px;
    border-radius: 8px;
    background-color: var(--md-surface);
    display: flex;
    justify-content: center;
}
/* Responsive tweaks */
@media (max-width: 600px) {
  .chart-container {
    flex-wrap: wrap;
    justify-content: center;
  }
  .seat {
    width: 80px;
    height: 40px;
  }
}
.alex-frame img {
    max-width: 50%;  /* shrink image to ~50% of container width */
    height: auto;
    display: block;
}

/* Conference Rooms */

.conference-container.top-conference-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 15px 24px;
    margin-bottom: calc(var(--spacing-unit) * 2);
    flex-wrap: wrap;
    /* height: auto; etc. */
  }
/* Ensure top conference groups have proper flex layout */
.conference-container.top-conference-container .conf-group {
    display: flex;
    gap: 12px;
}


  /* Make “conf-room-top” match the bottom rooms’ look */
.conf-room-top {
    width: 100px;
    height: 60px;
    background-color: var(--md-primary);
    color: var(--md-on-primary);
    box-shadow: var(--md-elevation-4);
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
  }
  
  .conf-split-vertical {
    display: flex;
    flex-direction: column;
    width: 100px;  /* match .conf-room-top width */
    height: 60px;  /* match .conf-room-top height */
  }
  .conf-split-vertical .conf-segment {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .conf-split-vertical .conf-segment + .conf-segment {
    border-top: 1px solid rgba(255, 255, 255, 0.5);
  }



.conf-split {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.conf-split .conf-segment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.conf-split .conf-segment+.conf-segment {
    border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.conference-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 24px;
    margin-bottom: calc(var(--spacing-unit) * 3);
    flex-wrap: wrap;
    gap: 20px;
}

.conf-room-bottom {
    width: 100px;
    height: 60px;
    background-color: var(--md-primary);
    color: var(--md-on-primary);
    box-shadow: var(--md-elevation-4);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.conf-split-horizontal {
    display: flex;
    /* allow horizontal split to size based on content */
    width: auto;
}

.conf-split-horizontal .conf-segment {
    /* allow segments to size to content, then grow/shrink equally */
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
    /* prevent labels (e.g. 'Nook A') from wrapping */
    white-space: nowrap;
}

.conf-split-horizontal .conf-segment+.conf-segment {
    border-left: 1px solid rgba(255, 255, 255, 0.5);
}

.footer__logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 0;
    background-color: var(--md-surface);
    color: var(--md-text);
    width: 100%;           /* Make container full width */
}

.footer__logo-container img {
    max-width: 80px;       /* Control logo size */
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;        /* Center horizontally if needed */
    transition: filter 0.2s;
}

.footer__logo-container svg {
    width: 80px;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: filter 0.2s;
    fill: currentColor;
}
/* Dark Mode Styles */
@media (prefers-color-scheme: dark) {
    :root {
        --md-primary: #90CAF9;
        --md-surface: #121212;
        --md-text: #FFFFFF;
        --md-on-primary: #121212;
    }

    body,
    .side-container,
    .search-input {
        background-color: var(--md-surface);
        color: var(--md-text);
    }

    .side-container {
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: var(--md-elevation-4);
    }

    h1,
    h2,
    .side-container h2 {
        color: rgba(255, 255, 255, 0.9);
    }

    .seat.empty {
        border-color: rgba(255, 255, 255, 0.3);
        background-color: rgba(255, 255, 255, 0.08);
    }

    .search-input {
        background-color: #2c2c2c;
        border-bottom: 2px solid rgba(255, 255, 255, 0.7);
    }

    .seat.occupied:hover::after {
        background-color: rgba(255, 255, 255, 0.9);
        color: #121212;
    }
    .footer__logo-container img {
        filter: invert(1);
    }
/* Ensure name text is readable on occupied (blue) seats */
.seat.occupied .name {
    color: var(--md-on-primary);
    font-weight: 500;
}
/* Keep search bar on top of Easter-egg overlay */
.easter-egg-active .search-container {
    position: relative;
    z-index: 3000;
}