/* Basic styling for Covered Classes */

.cc-wrapper {
    margin: 1em 0;
}

.cc-view-toggle {
    margin-bottom: 1em;
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    align-items: center;
}

.cc-view-link {
    text-decoration: none;
}

.cc-view-active {
    font-weight: bold;
    text-decoration: underline;
}

.cc-new-request,
.cc-request-page {
    margin-bottom: 2em;
}

.cc-new-request {
    padding: 1em;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cc-new-request-form input[type="date"],
.cc-new-request-form input[type="time"],
.cc-new-request-form textarea,
.cc-new-request-form select {
    max-width: 100%;
}

.cc-button {
    display: inline-block;
    padding: 0.4em 0.8em;
    border-radius: 4px;
    border: 1px solid #ccc;
    cursor: pointer;
    background: #f5f5f5;
}

.cc-button-primary {
    border-color: #2271b1;
    background: #2271b1;
    color: #fff;
}

.cc-button-secondary {
    background: #fff;
}

.cc-list-view .cc-class-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.8em;
    margin-bottom: 0.8em;
}

.cc-class-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5em;
}

.cc-class-datetime {
    min-width: 150px;
}

.cc-class-info {
    flex: 1;
    min-width: 200px;
}

.cc-class-actions {
    min-width: 220px;
    text-align: right;
}

.cc-requester-actions {
    margin-top: 0.5em;
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}

.cc-badge {
    display: inline-block;
    padding: 0.1em 0.4em;
    border-radius: 3px;
    font-size: 0.8em;
}

.cc-badge-open {
    background: #fef3c7;
    border: 1px solid #fbbf24;
}

.cc-badge-covered {
    background: #dcfce7;
    border: 1px solid #22c55e;
}

.cc-class-message {
    margin-top: 0.4em;
    font-size: 0.85em;
    color: #b91c1c;
}

.cc-loading {
    opacity: 0.6;
}

.cc-just-duplicated {
    outline: 2px solid #2271b1;
}

/* Calendar */
.cc-calendar-view {
    margin-top: 1em;
}

.cc-calendar-stage {
    position: relative;
    overflow: hidden;
    min-height: 520px;
}

.cc-calendar-month {
    width: 100%;
}

.cc-calendar-nav {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    border: 2px solid #777;
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    min-height: 125px;
    background: #fff;
}

.cc-calendar-current {
    display: block;
    text-align: center;
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: 1;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: #000;
}

.cc-calendar-prev,
.cc-calendar-next {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    text-decoration: none;
    color: #777;
    font-size: 2.5rem;
    line-height: 1;
    opacity: 0.45;
}

.cc-calendar-prev:hover,
.cc-calendar-next:hover,
.cc-calendar-prev:focus,
.cc-calendar-next:focus {
    opacity: 1;
    color: #222;
}

.cc-calendar-scroll {
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 2px;
}

.cc-calendar-table {
    width: 100%;
    min-width: 840px;
    table-layout: fixed;
    border-collapse: collapse;
    border: 2px solid #777;
    background: #fff;
}

.cc-calendar-table th,
.cc-calendar-table td {
    border: 2px solid #aaa;
    position: relative;
}

.cc-calendar-table th {
    height: 48px;
    padding: 0.35em 0.4em;
    text-align: center;
    vertical-align: middle;
    font-size: clamp(1rem, 1.7vw, 1.35rem);
    font-weight: 700;
    color: #111;
    background: #fff;
}

.cc-calendar-table td {
    height: 132px;
    padding: 0.3em 0.4em 0.5em;
    text-align: left;
    vertical-align: top;
    background: #fff;
}

.cc-calendar-table .cc-empty {
    background: #fff;
}

.cc-day-number {
    display: inline-block;
    min-width: 1.5em;
    margin-bottom: 0.25em;
    color: #111;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
}

.cc-day-number:hover,
.cc-day-number:focus {
/*    text-decoration: underline; */
}

.cc-calendar-entries {
    position: relative;
    margin-top: 1.9em;
}

.cc-calendar-entry {
    position: relative;
    display: block;
    margin: 0.2em 0;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.25;
 /*   font-weight: 400; */
}

.cc-calendar-entry-covered {
    color: #000000;
}

.cc-calendar-entry-open {
    color: #ff1717;
}

.cc-calendar-entry:hover,
.cc-calendar-entry:focus,
.cc-calendar-entry:focus-visible {
    text-decoration: underline;
}

.cc-day-tooltip {
    display: none;
    position: absolute;
    left: 0.1em;
    bottom: calc(100% + 7px);
    z-index: 100;
    width: max-content;
    max-width: 250px;
    padding: 0.55em 0.7em;
    border-radius: 5px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    white-space: normal;
    box-shadow: 0 5px 14px rgba(0,0,0,0.2);
    pointer-events: none;
}

.cc-calendar-entry-covered .cc-day-tooltip {
    background: #00a847;
}

.cc-calendar-entry-open .cc-day-tooltip {
    background: #e31616;
}

.cc-calendar-entry:hover .cc-day-tooltip,
.cc-calendar-entry:focus .cc-day-tooltip,
.cc-calendar-entry:focus-visible .cc-day-tooltip {
    display: block;
}

.cc-calendar-note {
    margin-top: 0.6em;
    font-size: 0.9em;
    color: #555;
}

.cc-slide-in-left,
.cc-slide-in-right,
.cc-slide-out-left,
.cc-slide-out-right {
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.cc-slide-in-left { transform: translateX(-100%); opacity: 0.4; }
.cc-slide-in-right { transform: translateX(100%); opacity: 0.4; }
.cc-slide-active { transform: translateX(0); opacity: 1; }
.cc-slide-out-left { transform: translateX(-100%); opacity: 0.2; }
.cc-slide-out-right { transform: translateX(100%); opacity: 0.2; }

@media (max-width: 700px) {
    .cc-calendar-stage {
        min-height: 460px;
    }

    .cc-calendar-nav {
        grid-template-columns: 38px 1fr 38px;
        min-height: 90px;
        border-radius: 16px 16px 0 0;
    }

    .cc-calendar-current {
        font-size: clamp(2rem, 10vw, 3.1rem);
    }

    .cc-calendar-table td {
        height: 112px;
    }

    .cc-calendar-entries {
        margin-top: 1em;
    }

    .cc-day-tooltip {
        max-width: 210px;
    }
}

/* Edit form */
.cc-edit-form {
    margin-top: 0.5em;
    padding-top: 0.5em;
    border-top: 1px dashed #ddd;
}

.cc-edit-form input[type="date"],
.cc-edit-form input[type="time"],
.cc-edit-form select,
.cc-edit-form textarea {
    max-width: 100%;
}

.cc-add-note-toggle {
    display: inline-block;
    margin-bottom: 0.4em;
    font-size: 0.85em;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    color: #2271b1;
}

/* Multi-date selector */
.cc-selected-dates-wrap {
    margin-bottom: 0.75em;
}

.cc-selected-dates-list {
    margin-top: 0.4em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
}

.cc-selected-date-pill {
    background: #eef4ff;
    border: 1px solid #c8d7f3;
    border-radius: 999px;
    padding: 0.2em 0.55em;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
}

.cc-selected-date-remove {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #2271b1;
    font-size: 0.85em;
}

.cc-selected-date-empty {
    color: #666;
}

.cc-multi-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1em;
}

.cc-mini-calendar {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.75em;
}

.cc-mini-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5em;
    margin-bottom: 0.5em;
}

.cc-mini-calendar-title {
    font-weight: 600;
    color: #222;
    text-align: center;
    flex: 1;
}

.cc-mini-calendar-prev,
.cc-mini-calendar-next {
    border: 1px solid #ccc;
    background: #fff;
    color: #222;
    border-radius: 4px;
    padding: 0.2em 0.55em;
    cursor: pointer;
}

.cc-mini-calendar-head,
.cc-mini-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25em;
}

.cc-mini-calendar-head span,
.cc-mini-calendar-empty,
.cc-mini-date-btn {
    text-align: center;
}

.cc-mini-date-btn {
    border: 1px solid #ddd;
    background: #fff;
    color: #222;
    border-radius: 4px;
    padding: 0.35em 0;
    cursor: pointer;
}

.cc-mini-date-btn:hover,
.cc-mini-calendar-prev:hover,
.cc-mini-calendar-next:hover {
    border-color: #999;
}

.cc-mini-date-btn.is-selected {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

@media (max-width: 700px) {
    .cc-class-actions {
        min-width: 100%;
        text-align: left;
    }

    .cc-requester-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cc-day-tooltip {
        left: 0;
        transform: none;
        width: 200px;
    }
}

.cc-view-link-add {
    font-weight: 600;
}


.cc-requested-coaches-field {
    display: block;
    margin-top: 0.35em;
}

.cc-field-label {
    display: block;
    margin-bottom: 0.45em;
    font-weight: 600;
}

.cc-requested-coaches-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.45em 1em;
    max-width: 680px;
    margin-bottom: 0.4em;
}

.cc-requested-coach-option {
    display: flex;
    align-items: center;
    gap: 0.45em;
}

.cc-requested-coach-option input[type="checkbox"] {
    margin: 0;
}

.cc-requested-tag {
    display: inline-block;
    margin-left: 0.4em;
    padding: 0.1em 0.45em;
    border-radius: 999px;
    background: #e8f0fe;
    border: 1px solid #b7c9ee;
    font-size: 0.8em;
}

.cc-login-wrapper {
    display: grid;
    gap: 1em;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.cc-login-box input[type="email"],
.cc-login-box input[type="password"] {
    width: 100%;
    max-width: 360px;
}
