/* Explain: Styles for the calendar page, now including indicators for Telegram group campaigns. */
/* Calendar page — month and week schedule board with drag & drop rescheduling */

.cal-view-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-color);
}

.cal-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cal-view-btn:hover {
    color: var(--primary-color);
}

.cal-view-btn.is-active {
    background: var(--primary-color);
    color: #ffffff;
}

.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.cal-legend[hidden] {
    display: none;
}

.cal-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.cal-dot {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 999px;
    background: var(--primary-color);
    flex-shrink: 0;
}

.cal-dot--fb {
    background: #1877F2;
}

.cal-dot--wa {
    background: #25D366;
}

.cal-dot--ig {
    background: #E1306C;
}

.cal-dot--tt {
    background: #FE2C55;
}

.cal-dot--tw {
    background: #1DA1F2;
}

.cal-dot--li {
    background: #0A66C2;
}

.cal-dot--tg {
    background: #229ED9;
}

.cal-dot--yt {
    background: #FF0000;
}

.cal-dot--pin {
    background: #E60023;
}

.cal-dot--th {
    background: #000000;
}

.cal-chip {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: grab;
}

.cal-chip.is-dragging {
    opacity: 0.45;
    cursor: grabbing;
}

.cal-chip__text {
    display: block;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-cell.is-drop {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: inset 0 0 0 2px rgba(30, 64, 175, 0.28);
}

.week-scroll {
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.week-grid {
    display: grid;
    grid-template-columns: 4.5rem repeat(7, minmax(0, 1fr));
    gap: 0.3rem;
    min-width: 54rem;
}

.week-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.45rem 0.3rem;
    border-radius: 0.75rem;
    background: var(--surface-color);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.week-head--gutter {
    background: transparent;
}

.week-head--today {
    background: var(--primary-color);
    color: #ffffff;
}

.week-head__letter {
    font-family: var(--font-heading);
}

.week-head__date {
    font-size: 0.68rem;
    font-weight: 600;
    opacity: 0.85;
}

.week-gutter {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0.35rem;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
}

.week-slot {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-height: 3.1rem;
    padding: 0.2rem;
    border: 1px dashed var(--border-color);
    border-radius: 0.7rem;
    background: #ffffff;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.week-slot--weekend {
    background: var(--surface-color);
}

.week-slot.is-drop {
    border-style: solid;
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.week-slot .cal-chip {
    font-size: 0.68rem;
    padding: 0.18rem 0.35rem;
    border-radius: 0.45rem;
}

.cal-group-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 0.85rem;
}

.cal-group-row__body {
    flex: 1;
    min-width: 0;
}