/* Default layout: stacked */
      #all-container {
    display: flex;
    flex-direction: column;
}

/* Amber game chrome bar — keep above PlayBridgeDoctor cards / auction */
#miniMenu {
  position: relative;
  z-index: 2147483000;
}

/* Resizer styling — only usable in side-by-side layout */
#resizer {
    display: none;
    width: 6px;
    flex: 0 0 6px;
    background-color: #ccc;
    cursor: col-resize;
    position: relative;
    align-self: stretch;
}

#all-container.horizontal #resizer {
    display: block;
}

#resizer:hover,
#all-container.horizontal #resizer:active {
    background-color: #00BFA5;
}

#game-container {
    flex: none;
    height: auto; /* Default height for stacked layout */
}


        #game-container img {
    max-width: 100%; /* Ensure the image does not exceed the width of its container */
    height: auto;    /* Maintain the aspect ratio of the image */
}

#info-container {
    flex: none;
    height: auto; /* Default height for stacked layout */
    width: 100%; /* Full width in vertical layout */
}

        /* Horizontal layout: side-by-side */
#all-container.horizontal {
    flex-direction: row;
}

#all-container.horizontal #info-container {
    --info-panel-min: 640px;
    width: 640px;
    min-width: var(--info-panel-min);
    max-width: 50%;
    flex: 0 0 auto;
    overflow-x: hidden; /* Keep content inside the panel */
    box-sizing: border-box;
}

#all-container.horizontal #game-container {
    flex: 1; /* Allow the game-container to fill the remaining space */
    height: auto;
    align-self: flex-start;
    min-width: 0; /* Prevent the game-container from exceeding the available space */
}

/* Side panel text must wrap instead of overflowing when the panel is resized */
#all-container.horizontal .tab-panels,
#all-container.horizontal .tab-panel,
#all-container.horizontal #game-guide,
#all-container.horizontal #contentDiv,
#all-container.horizontal #contentDiv .twoGameGuideColumns {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

#all-container.horizontal #game-guide,
#all-container.horizontal #contentDiv {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

#all-container.horizontal input#tab1:checked ~ .tab-panels #panel1 {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

#all-container.horizontal #panel1 > * {
    min-width: 0;
}

#all-container.horizontal #game-guide {
    flex: 1 1 auto;
}

/* Keep the four tabs on one row in split view */
#all-container.horizontal .tab-buttons {
    flex-wrap: nowrap;
}

#all-container.horizontal .tab-buttons label {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 0.9rem;
}

        /* end horizontal layout */

/* Help panel hidden */
#all-container.help-hidden #info-container,
#all-container.help-hidden #resizer {
    display: none !important;
}

        #info-icon-bar {
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
    gap: 10px; /* Add spacing between buttons */
    margin-bottom: 10px; /* Optional: Add spacing below the button bar */
}

/* Display layout dropdown — right of the tabs in the tab bar */
.display-menu {
  position: relative;
  flex-shrink: 0;
  margin-left: auto;
  /* Above PlayBridgeDoctor cards / bidding pad (~110000+) */
  z-index: 2147483000;
}

.display-menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.45rem 0.85rem;
  border: 2px solid #00BFA5;
  border-radius: 6px;
  background: #fff;
  color: #008F7A;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.display-menu__toggle:hover {
  background: rgba(0, 191, 165, 0.08);
}

.display-menu__toggle:focus-visible {
  outline: 2px solid #008F7A;
  outline-offset: 2px;
}

.display-menu__caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.15rem;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  vertical-align: middle;
}

.display-menu__list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 2147483000;
  min-width: 14rem;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.display-menu__option {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.7rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #212121;
  cursor: pointer;
}

.display-menu__option:hover {
  background: #FFF8E1;
}

.display-menu__option.is-selected {
  background: #E0F7F4;
  color: #008F7A;
}

.display-menu__option.is-selected::after {
  content: " ✓";
  font-weight: 700;
}

/* Side-by-side option only when viewport is wide enough */
@media (max-width: 1599px) {
  .display-menu__option[data-layout="horizontal"] {
    display: none;
  }
}

.tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.75rem 0;
  background: #F5F5F5;
  border-bottom: 1px solid #E0E0E0;
  /* Keep Layout dropdown above scrolling tab panels AND game chrome */
  position: relative;
  z-index: 2147483000;
}

  /* Basic styling for tabs */
    .tabs {
        display: flex;
        flex-direction: column;
    }

.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

    .tab-buttons label {
    padding: 10px 18px;
    text-align: center;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-family: "Roboto", sans-serif;
    font-weight: 600;
    color: #6B7785;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 0;
    /* Teal accent bar, revealed on the active tab */
    box-shadow: inset 0 0 0 0 #00BFA5;
}

   /* Hover effect for tabs */
.tab-buttons label:hover {
    background-color: #FFF8E1; /* soft amber tint, matches menu hovers */
    color: #212121;
}


    input[type="radio"] {
        display: none;
    }

   /* Active tab styling (now controlled by a class) */
.tab-buttons label.tab-label-active {
    background-color: #fff;
    color: #212121;
    border-color: #E0E0E0;
    box-shadow: inset 0 3px 0 0 #00BFA5, 0 -2px 6px rgba(0, 0, 0, 0.06);
    margin-bottom: -1px; /* sit on top of the bar's bottom border */
    padding-bottom: 11px;
    z-index: 2;
}

    /* Ensure the tab-panels container can scroll vertically */
.tab-panels {
    overflow-y: auto; /* Enable vertical scrolling */
    max-height: 100%; /* Ensure it doesn't exceed the container's height */
    position: relative;
    z-index: 1; /* Below .tab-bar so Layout menu isn't covered by panel content */
}

    .tab-panel {
        display: none;
        background-color: #ffffff;
        overflow-y: auto; /* Enable vertical scrolling for the content */
    max-height: calc(100vh - 0px); /* Adjust height based on your layout */
    box-sizing: border-box; /* Ensure padding is included in the height */

    }

    .tab-panels #panel2 {
        background-color: #f9f9f9;
        padding: 0px;
    }

    

    input#tab1:checked ~ .tab-panels #panel1,
    input#tab2:checked ~ .tab-panels #panel2,
    input#tab3:checked ~ .tab-panels #panel3,
    input#tab4:checked ~ .tab-panels #panel4 {
        display: block;
    }

    input#tab1:checked ~ .tab-panels #panel1 {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}




.icon-buttons {
  display: flex;
  gap: 0.5rem;
}




    .makeable-contracts-container {
        display: flex;
        justify-content: center;
        align-items: center;
  
        box-sizing: border-box;
      }
  
      .makeable-contracts-table {
        width: 80%;
        /* Makes the table responsive */
        max-width: 800px;
        /* Set a max width for larger screens */
        border-collapse: collapse;
        /* Remove default spacing between cells */
        box-shadow: 0px 4px 8px rgba(172, 170, 170, 0.954);
        /* Soft shadow for elegance */
      }
  
      .makeable-contracts-table caption {
        caption-side: top;
        padding: 10px;
        font-size: 1.25em;
        font-weight: bold;
        text-align: center;
      }
  
      .makeable-contracts-table th,
      .makeable-contracts-table td {
        padding: 12px 15px;
        border: 1px solid #000000;
        text-align: center;
      }
  
      .makeable-contracts-table th {
        background-color: #E0E5C2;
        /* Light background for headers */
        font-weight: bold;
      }
  
      .makeable-contracts-table tbody tr:nth-child(even) {
        background-color: #FFFFE8;
        /* Alternating row colors */
      }
  
      .makeable-contracts-table tbody tr:hover {
        background-color: #f1f1f1;
        /* Highlight row on hover */
        cursor: pointer;
      }
  
      .makeable-contracts-table td {
        font-size: 1.1em;
      }
  
      /* Optional: A subtle transition effect for hover */
      .makeable-contracts-table tbody tr {
        transition: background-color 0.3s ease;
      }



/* Game pages embed the flipper in a tab — no room for printing there */
.tab-panel .flipper-toolbar__actions,
.tab-panel .flipper-print-btn {
  display: none !important;
}

/* ==== Phones: smaller tab bar ==== */
@media (max-width: 600px) {
  .tab-bar {
    padding: 0.25rem 0.4rem 0;
  }

  .tab-buttons {
    gap: 0.2rem;
  }

  .tab-buttons label {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .tab-buttons label.tab-label-active {
    padding-bottom: 7px;
  }
}
