html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}


.club-select-mobile {
    display: none; /* hidden on desktop by default */
}



/* Increase height of each day cell */
.fc-daygrid-day-frame {
    min-height: 80px;
}

/* Make event text more readable */
.fc-daygrid-event {
    font-size: 0.7rem;
    padding: 2px 5px 1px 1px;
    line-height: 1.5;
    white-space: normal;
}

/* Optional: increase header font size */
.fc-col-header-cell-cushion {
    font-size: 1rem;
    font-weight: 600;
}


/* make the overall calendar wrapper 100% wide */
#club-calendar {
    width: 90%;
    box-sizing: border-box;
}

    /* stretch the dayGrid table to fill 100% of its parent */
    #club-calendar .fc-daygrid-body table {
        width: 90% !important;
        table-layout: fixed;
    }

    /* give each day cell an equal share of the full width */
    #club-calendar .fc-daygrid-day {
         /*width: 14.2857% !important; 100% ÷ 7 columns */
         width: 12.8571% !important;
    }

    /* optional: bump up row height so events have room */
    #club-calendar .fc-daygrid-day-frame {
        min-height: 70px;
    }


/* assign a class when loading events */
.fc-daygrid-event.fc-racing {
    background-color: #007bff;
    color: white;
    border: none;
}

club-status {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
    font-size: 0.9rem;
}

    .club-active {
        font-weight: bold;
    }
    .club-inactive {
        opacity: 0.8;
        font-style:italic;
    }
    .club-approved {
        background-color: #d4edda;
    }
    .club-notapproved {
        background-color: #f8d7da;
    }

    .right-panel p {
        padding:0.5rem;
        border-radius: 14px;
        margin-bottom: 0.5rem;
    }
.club-entry.disabled {
    opacity: 0.5;
    pointer-events: none;
}


.profile-page {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    flex-wrap: wrap; /* allows wrap on very narrow screens */
    max-width: 1200px; /* optional: limit overall width */
    margin: 0 auto; /* center on large screens */
}

/* by default each section is equal */
.profile-section {
    flex: 1 1 0; /* grow/shrink equally, base-width 0 */
    min-width: 280px; /* never get too skinny */
}

    /* target specific sections to widen or narrow */
    .profile-section.account { /* Account details */
        flex: 2 1 0; /* twice as wide as “boats” */
    }

    .profile-section.boats { /* Boats list */
        flex: 1 1 0;
    }

    .profile-section.clubs { /* Clubs & certifications */
        flex: 1 1 0;
    }


.list-group {
    list-style: none;
    padding: 0;
}

.list-group-item {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #ddd;
}

/* collapse into a single column on small screens */
@media (max-width: 768px) {
    .profile-page {
        flex-direction: column;
    }
}


input[type="radio"] {
    transform: scale(1.3);
    margin-right: 8px;
    accent-color: #007bff; /* Bootstrap primary blue */
    box-shadow: 0 0 2px rgba(50, 123, 255, 0.5);
}

.club-option input:not(:disabled) + label {
    font-size: 1.1rem;
    font-weight: 700;
}

input[type="radio"]:disabled + label {
    opacity: 0.3;
    color: #6c757d; /* Bootstrap muted gray */
}



.admin-button {
    height: 60px;
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 16px;
}
.accountadmin-button {
    height: 60px;
    width: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 16px;
}

/* Make prev/next/today buttons larger */
.fc .fc-button {
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    min-width: 70px;
}

/* Specifically target prev/next buttons */
.fc-prev-button,
.fc-next-button {
    font-size: 1.3rem;
    padding: 0.6rem 1.2rem;
}

/*.row-highlight {
    background-color: #ffff99;*/ /* light yellow */
    /*transition: background-color 1s ease;
}*/

table tbody tr.row-highlight td {
    background-color: #ffff99 !important;
    font-weight: bold;
}

.fixed-header {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 100;
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

.info-panel {
    background-color: #e0f7ff;
    padding: 12px;
    margin-bottom: 16px;
    border-left: 4px solid #0077b6;
    font-size: 0.95rem;
}

    .info-panel h4 {
        margin-top: 0;
        color: #005f8f;
    }



.title-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px; /* Optional spacing between title and panel */
    margin-bottom: 16px;
    flex-wrap: wrap; 
}

    .title-bar h1 {
        margin: 0;
        font-size: 2rem;
        flex: 0 1 auto; /* Allows title to take up remaining space */
    }

.info-panel-inline {
    background-color: #e0f7ff;
    padding: 10px 16px;
    border-left: 4px solid #0077b6;
    font-size: 0.9rem;
    max-width: 320px;
    flex: 0 0 auto; /* Prevents it from shrinking too much */
} 
    .info-panel-inline h4 {
        margin-top: 0;
        color: #005f8f;
    }

.connected {
    background-color: #005f8f; /* soft green */
    transition: background-color 0.3s ease;
}
.status-icon {
    margin-left: 6px;
    font-size: 1.2em;
}

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-footer {
    margin-top: auto;
}

.bookkeeping-form {
    font-size:0.7rem;

    .hidden {
        display: none !important;
    }
}

table tbody td.rc-race-col {
    border-left: 1px solid #ddd;
    background-color: lightgray !important;
    text-align: end !important;
    padding-right: 10px;
}

.form-control, .form-select {
    border: 1px solid #ced4da;
    border-radius: 4px !important;
}

.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ===== Page shell layout: independent-scroll left/right panels ===== */

main {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.container {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 1rem;
}

.left-panel {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

    .left-panel form {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
    }

.right-panel {
    flex: 0 0 260px;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.results-scroll-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.clubs-scroll-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

#resultsTable thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 5;
    box-shadow: 0 1px 0 #dee2e6;
}


@media (max-width: 768px) {
    .club-select-mobile {
        display: block;
        margin-bottom: 12px;
    }

    .clubs-scroll-wrapper {
        display: none;
    }

    .container {
        flex-direction: column;
        overflow: visible; /* let the page scroll instead of clipping the stacked panels */
    }

    .left-panel {
        min-height: 50vh; /* results get a reasonable chunk of the screen */
    }

    .right-panel {
        flex: 0 0 auto; /* stop it trying to be a fixed 260px column */
        width: 100%;
    }
    .info-panel-inline {
        display: none;
    }
}

@media (max-width: 768px) {
    .results-scroll-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* smooth momentum scrolling on iOS */
    }

    #resultsTable {
        min-width: 900px; /* forces horizontal scroll instead of squashing columns unreadably */
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .title-bar {
        display: none;
    }

    .left-panel form > select {
        display: none;
    }

    .fixed-header {
        display: none;
    }

    .right-panel {
        display: none;
    }

    .left-panel form > div[style*="align-self: flex-start"] {
        display: none; /* Export Race / Publish Race buttons */
    }

    .container {
        gap: 0;
        padding: 0.25rem;
    }

    .left-panel {
        flex: 1 1 100%;
    }

    .results-scroll-wrapper {
        min-height: 0;
    }
}

