/* ─────────────────────────────────────────────
   BASE 
───────────────────────────────────────────── */
body {
    background-color: #ffffff;
    color: #000000;
    font-family: "Montserrat", Arial, sans-serif;
}
footer a {
    background-color: #2e77f9;
    color: #ffffff;
    padding: 8px;
    width: 80px;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}
header {
    border-bottom: 3px solid black;
    padding: 10px;
    margin-bottom: 30px;
}
h2 {
    color: #000;
    padding: 15px 15px 22px 15px;
    font-size: 43px;
    font-weight: 600;
    margin-top: 90px;
    margin-left: 30px;
    margin-bottom: 10px;
    display: inline-block;
    line-height: 1.1;
    background-image: linear-gradient(#f64fd6, #f64fd6);
    background-repeat: no-repeat;
    background-size: 100% 18px;
    background-position: 0 85%;
    text-decoration: none;
}
h3 {
    background-color: #43d1bf;
    display: inline;
    color: #ffffff;
    padding: 10px;
    font-size: 25px;
    margin: 40px;
}
#logo {
    height: 66px;
    padding-left: 20px;
}
li {
    padding: 5px;
}

/* ─────────────────────────────────────────────
   WEEK SELECTOR 
───────────────────────────────────────────── */
#week-selector-panel {
    margin: 140px 30px 50px 30px;
    padding: 20px;
    border: 1px solid #ccc;
}

#week-grid-nav {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 16px;
}

#week-grid-nav button {
    padding: 6px 14px;
}

#week-grid-nav button:hover {
    background-color: #f0f0f0;
}

#month-year-label {
    font-size: 18px;
    font-weight: 700;
    min-width: 180px;
    text-align: center;
}


#yearly-total-label {
    margin-left: auto;
    font-size: 15px;
    font-weight: 600;
    color: #222;
}
#yearly-total-label #yearly-total {
    color: #2e77f9;
    font-weight: 700;
}

.selector-hint {
    font-size: 13px;
    color: #555;
    margin: 0 0 12px 0;
}

/* ─────────────────────────────────────────────
   CALENDAR GRID
───────────────────────────────────────────── */
#calendar-grid {
    width: 100%;
    border: 1px solid #ccc;
    margin-bottom: 16px;
}

.cal-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #e8e8e8;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
}

.cal-header-cell {
    padding: 8px 0;
    border-right: 1px solid #ccc;
}
.cal-header-cell:last-child {
    border-right: none;
}

.cal-week-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-top: 1px solid #ccc;
    cursor: pointer;
}

.cal-week-row:hover {
    background-color: #f5f5f5;
}

/* TODO: add full week glow on hover */

.cal-week-row.selected {
    background-color: #d0e4ff;
}

.cal-day-cell {
    padding: 10px 8px;
    border-right: 1px solid #eee;
    min-height: 55px;
    text-align: center;
}
.cal-day-cell:last-child {
    border-right: none;
}

.day-num {
    font-size: 15px;
    font-weight: 600;
    color: #222;
}

.cal-day-cell.other-month .day-num {
    color: #bbb;
}

.cal-day-cell.today .day-num {
    background-color: #2e77f9;
    color: #fff;
    border-radius: 50%;
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
}

/* ─────────────────────────────────────────────
   SELECTION SUMMARY + ADD BUTTON
───────────────────────────────────────────── */
#selection-summary {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
}

#selected-count-label {
    font-size: 14px;
    font-weight: 600;
}

#btn-clear-weeks {
    padding: 4px 12px;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 13px;
    cursor: pointer;
}

#btn-add-schedule {
    background-color: #2e77f9;
    color: #fff;
    border: none;
    padding: 10px 24px;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
#btn-add-schedule:hover:not(:disabled) {
    background-color: #1a5fd4;
}
#btn-add-schedule:disabled {
    background-color: #b0c8f5;
    cursor: not-allowed;
}

/* ─────────────────────────────────────────────
   SCHEDULE BLOCKS
───────────────────────────────────────────── */
#schedules-container {
    padding: 0 30px;
}

.schedule-block {
    border: 1px solid #ccc;
    margin-bottom: 50px;
    padding: 20px;
}

.schedule-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

/* Week label + popup wrapper */
.schedule-week-label {
    background-color: #43d1bf;
    color: #fff;
    padding: 8px 16px;
    font-size: 18px;
    font-weight: 700;
    display: inline-block;
    margin: 0;
    position: relative;
}

/* Clickable button inside the teal label */
.weeks-summary-btn {
    background: none;
    border: none;
    color: #fff;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: underline dotted;
}
.weeks-summary-btn:hover {
    opacity: 0.85;
}

/* Popup box that appears on click */
.weeks-popup {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #fff;
    border: 2px solid #43d1bf;
    border-radius: 6px;
    padding: 12px 16px;
    z-index: 200;
    min-width: 220px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    font-size: 13px;
    color: #222;
}
.weeks-popup ul {
    margin: 8px 0 0 0;
    padding-left: 18px;
}
.weeks-popup li {
    font-weight: 600;
    padding: 3px 0;
}

.btn-delete-schedule {
    background: none;
    border: 2px solid #e03a3a;
    color: #e03a3a;
    padding: 6px 14px;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.btn-delete-schedule:hover {
    background: #e03a3a;
    color: #fff;
}

/* ─────────────────────────────────────────────
   SCHEDULE TABLE 
───────────────────────────────────────────── */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    table-layout: fixed;
}
.schedule-table th,
.schedule-table td {
    padding: 12px 10px;
    width: 90px;
    vertical-align: middle;
    text-align: center;
}
.schedule-table th:first-child,
.schedule-table td:first-child {
    width: 220px;
    text-align: left;
}
.schedule-table th:nth-child(3),
.schedule-table td:nth-child(3) {
    width: 110px;
}
td[contenteditable="true"]:hover {
    background-color: #f2f2f2;
}
td[contenteditable="true"]:focus {
    outline: 2px solid #2e77f9;
    background-color: #ffffff;
}
.daypart-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.daypart-add-btn {
    color: white;
    background-color: #2e77f9;
    border: 2px solid white;
    font-weight: bold;
    padding: 5px;
    cursor: pointer;
}
.daypart-add-btn:hover {
    border: 2px solid black;
}

.daypart-cell {
    text-align: left;
}
.daypart-cell-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.daypart-label {
    display: inline-block;
    min-width: 120px;
}
.daypart-label:hover {
    background-color: #f2f2f2;
}
.daypart-label:focus {
    outline: 2px solid #2e77f9;
    background-color: #ffffff;
}
.daypart-remove-btn {
    background: none;
    border: 1px solid #e03a3a;
    color: #e03a3a;
    padding: 3px 8px;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.daypart-remove-btn:hover {
    background-color: #e03a3a;
    color: #ffffff;
}

/* Remove row button inside table */
.btn-remove-row {
    background: none;
    border: 1px solid #e03a3a;
    color: #e03a3a;
    font-size: 11px;
    padding: 3px 7px;
    cursor: pointer;
    font-family: "Montserrat", Arial, sans-serif;
    font-weight: 600;
}
.btn-remove-row:hover {
    background: #e03a3a;
    color: #fff;
}

/* ─────────────────────────────────────────────
   DESKTOP 1920px+ — original styles kept
───────────────────────────────────────────── */
@media (min-width: 1920px) {
    body {
        font-size: 22px;
    }
    header {
        margin-bottom: 20px;
    }
    #logo {
        height: 90px;
        padding-left: 40px;
    }
    h2 {
        font-size: 65px;
        margin-left: 70px;
        padding-bottom: 32px;
        background-size: 100% 28px;
        margin-bottom: 15px;
    }
    h3 {
        font-size: 34px;
        padding: 14px 20px;
    }
    button, select, option, input {
        font-size: 22px;
    }
    #month-year-label {
        font-size: 25px;
    }
    #yearly-total-label {
        font-size: 22px;
    }
    #calendar-grid {
        font-size: 22px;
    }
    #week-grid-nav {
        font-size: 22px;
    }
    .schedule-table th,
    .schedule-table td {
        padding: 20px 18px;
        font-size: 20px;
    }
    footer a {
        padding: 12px 18px;
        font-size: 18px;
        width: 120px;
    }
}