/* 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: 320px;
}

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

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

.cc-calendar-table {
    width: 100%;
    border-collapse: collapse;
}

.cc-calendar-table th,
.cc-calendar-table td {
    border: 1px solid #eee;
    text-align: center;
    padding: 0.5em;
    position: relative;
}

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

.cc-day-number {
    display: inline-block;
    min-width: 1.5em;
    color: #222;
}

.cc-calendar-day-link {
    display: block;
    position: relative;
    text-decoration: none;
}

.cc-has-class .cc-day-number {
    font-weight: bold;
    text-decoration: underline;
}

.cc-day-tooltip {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(100% + 8px);
    z-index: 20;
    width: 220px;
    text-align: left;
    background: #111;
    color: #fff;
    padding: 0.6em 0.75em;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.cc-day-tooltip ul {
    margin: 0;
    padding-left: 1.2em;
}

.cc-day-tooltip li {
    margin: 0.25em 0;
}

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

.cc-calendar-note {
    margin-top: 0.5em;
    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; }

/* 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;
}
