/* Styles for the GP Hours Admin Page */
#mainWrapper {
    border: solid 1px #000;
    padding: 15px;
}              

#spinnerRow{
    min-height: 25px; 
    position: relative;
}

#areaHdrWrapper{
    max-width: 70%;
    padding-left: 15px;
}

#cpyBtnWrapper {
    margin-top: 25px;
    max-width: 30%;
}

#gp-hours-copy-btn {
    background-color: #0d6efd;
    color: #ffffff;             
    float: right;
    margin-right: 5px;
}   

#gp-hours-copy-btn:disabled{
    background-color: #b6bab7;
}

#gp-hours-form div table thead tr th,
#gp-hours-display div table thead tr th {
    background-color: #a2e9d8;
    border: 1px solid #000000;
}

#gp-hours-form > div > table,  .form-select, .form-control {
    border-color: #000000;
}

label {
    font-weight: bold;
    /* padding-left: 10px; */
}        

th, td:nth-child(1) {
    text-align: center;
}

#gp-hours-weeks-table tr td:nth-child(1),
.dayAbbr {
    font-weight: bold;
}

#notesLabelCol { /* Undo the nth-child*/
    text-align: left;
}

#notesLabelCol > input {
    max-width: 600px;
    font-size: 14px;
}

#gp-hours-submit-cell {
    text-align: center;
    vertical-align: middle;
}           

#gp-form-submit-btn {
    background-color: #ff5300;
} 

#gp-form-submit-btn:disabled{
    background-color: #b6bab7;
}

#gp-hours-display {
    text-align: center;
}

#gp-hours-weeks-table tr td.notesPreview  {
    text-align: left;
}

#gp-hours-weeks-table tr td {
    border: 1px solid #000000;
}

/* Spinner         */
.gp-hours-spinner {
    display: none;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(90deg, red 50%, blue 50%);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0% {transform: rotate(0);}
    100% {transform: rotate(360deg);}
}
/* End Spinner      */

/* Hours View Hours */
#gp-hours-table td, #gp-hours-table th {    
    font-size: .7em;    
}   
/* End Hours View Hours */


/* Start Extended Hours Styles */
.gp-hours-modal {
    position: fixed;
    z-index: 99999;
    left:0; top:0;
    width:100%; height:100%;
}
#gp-hours-modal-title,
#gp-hours-modal-extended-title {
    text-align: center;
    margin: 3px;
}
.gp-hours-modal-content {    
    background: #e3e3e3;
    left: 50%;    
    max-width: 800px;
    padding: 10px;
    position: fixed;      /* instead of relative */
    top: 50%;
    transform: translate(-50%, -50%);  /* perfect center */
    width: 90%;           /* responsive */    
    z-index: 100000;      /* above backdrop */
}
.gp-hours-modal-close {
    position:absolute;
    right:15px; top:10px;
    font-size:24px;
    cursor:pointer;
}
.gp-hours-calendar-nav {
    display:flex;
    justify-content: space-between; /* lock arrows left/right */
    align-items:center;    
    width: 245px;                   /* ← pick a width you like */
    margin: 0 auto 10px;            /* center the whole bar */
}

.gp-hours-nav-btn {
    flex: 0 0 auto;
    padding:4px 10px;
    border:1px solid #1f4056;
    background:#1f4056;
    border-radius:3px;
    color: #fff;
    cursor:pointer;
    text-align: center;
    width: 40px;    /* ← consistent button width */
}
.gp-hours-nav-btn:disabled {
    visibility: hidden; /* hide when disabled to keep layout */
}

#gp-hours-current-month {
    flex: 1;            /* middle item expands */
    text-align: center; /* month stays centered */
}

/* Give the calendar a fixed vertical size */
.gp-hours-calendar-grid {
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:4px;
    height: 420px;  /* adjust to taste */
    font-size:0.8rem;
}
.gp-hours-cal-header {
    background:#1f4056;
    color:#fff;
    text-align:center;
    padding:4px 0;
    font-weight:bold;
}
.gp-hours-cal-cell {
    border:1px solid #dadada;
    min-height:65px;
    background:#fafafa;
    padding:4px;
    position:relative;
}
.gp-hours-cal-cell.empty {
    border-style:dashed;
    background:#f5f5f5;
}
.gp-hours-daynum {
    font-weight:bold;
    margin-bottom:2px;
    color:#1f4056;
}
.gp-hours-timewrap {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-left: 5px;
}

.gp-hours-time {
    font-size: 0.7rem;
}

.gp-hours-note-icon {
    margin-left: 6px;
}

.gp-hours-cal-cell.closed .gp-hours-time {
    color:#777;
    font-style:italic;
}
.gp-hours-note-icon {
    border:1px solid #1f4056;
    width:14px; height:14px;
    display:inline-block;
    line-height:12px;
    text-align:center;
    border-radius:50%;
    font-size:0.7rem;
    margin-left:3px;
    cursor:help;
}
.gp-hours-notes-legend {
    font-size: 0.7em;
    margin-top: 35px;
}

/* ----------------------------------------
   MOBILE RESPONSIVE IMPROVEMENTS
-----------------------------------------*/
@media (max-width: 600px) {

    /* Modal content adapts for smaller screens */
    .gp-hours-modal-content {
        width: 95%;
        max-width: 95%;
        top: 50%;
        transform: translate(-50%, -50%);
        max-height: 90vh;         /* allow scrolling inside modal */
        overflow-y: auto;         /* scroll calendar if tall */
        padding: 12px;
    }

    /* Navigation bar scales properly */
    .gp-hours-calendar-nav {
        width: 100%;              /* use full modal width */
        max-width: 300px;         /* cap so it doesn't stretch too wide */
    }

    /* Month label stays centered using flex */
    #gp-hours-current-month {
        text-align: center;
        font-size: 0.9rem;
    }

    /* Calendar grid adapts height */
    .gp-hours-calendar-grid {
        height: auto;             /* allow grid to grow naturally */
        min-height: 375px;        /* still keeps consistency */
        grid-auto-rows: minmax(40px, auto); 
        font-size: 0.75rem;       /* slightly smaller text on mobile */
    }

    /* Each cell adapts better on small screens */
    .gp-hours-cal-cell {
        min-height: 50px;
        padding: 3px;
    }

    /* Keep note icon on same line without overflow */
    .gp-hours-timewrap {
        display: flex;
        justify-content: space-between;
        gap: 4px;
        padding-left: 0;
    }

    /* legend spacing */
    .gp-hours-notes-legend {
        margin-top: 10px;
        font-size: 0.65rem;
        text-align: center;
    }

    .gp-hours-cal-header {
        background:#1f4056;
    }

      /* Hide the ? icon on mobile */
    .gp-hours-note-icon {
        display: none !important;
    }

    /* Light rose background for note days */
    .gp-hours-cal-cell.has-note {
        background: #ffeef4 !important; /* very subtle rose */
        border-color: #f7d6df !important;
    }
/* ----------------------------------------
   MOBILE FONT SIZE OVERRIDES
-----------------------------------------*/
    /* Modal overall font scaling */
    .gp-hours-modal-content {
        font-size: 0.85rem;
    }

    /* Month title + headings */
    #gp-hours-modal-title,
    #gp-hours-modal-extended-title {
        font-size: 1.0rem;
    }

    /* Calendar month label (e.g. "April 2025") */
    #gp-hours-current-month {
        font-size: 0.95rem;
    }

    /* Weekday header row (Sun–Sat) */
    .gp-hours-cal-header {
        font-size: 0.75rem;
    }

    /* Calendar grid cells (numbers + time block) */
    .gp-hours-cal-cell {
        font-size: 0.75rem;
    }

    /* Day number inside each cell */
    .gp-hours-daynum {
        font-size: 0.55rem;
    }

    /* “10a–5p” / “Closed” text */
    .gp-hours-time {
        font-size: 0.7rem;
    }

    /* ? icon sizing */
    .gp-hours-note-icon {
        font-size: 0.7rem;
        width: 14px;
        height: 14px;
        line-height: 12px;
    }

    /* Legend text */
    .gp-hours-notes-legend {
        font-size: 0.70rem;
    }
}
/* End Extended Hours Styles */