/* Content Calendar Pro - Public (front-end) styles */

.ccx-calendar {
    margin: 1em 0;
    font-family: inherit;
    position: relative;
}

/* Filter bar */
.ccx-calendar-filters {
    margin-bottom: 1em;
}
.ccx-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75em 1.5em;
}
.ccx-filter-bar label {
    display: inline-flex;
    align-items: center;
    margin: 0;
}
.ccx-filter-bar select {
    min-width: 140px;
    padding: 0.4em 0.6em;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 0.95em;
}

/* View toggle */
.ccx-calendar-view-toggle {
    margin-bottom: 1em;
}
.ccx-view-btn {
    display: inline-block;
    padding: 0.4em 0.9em;
    margin-right: 0.25em;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #f0f0f1;
    text-decoration: none;
    color: #1d2327;
    font-size: 0.95em;
}
.ccx-view-btn:hover {
    background: #e0e0e0;
}
.ccx-view-btn.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

/* List view */
.ccx-calendar-list .ccx-calendar-list-content {
    transition: opacity 0.2s ease;
}
.ccx-calendar-list.ccx-loading .ccx-calendar-list-content {
    opacity: 0.6;
}
.ccx-calendar-list .ccx-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ccx-calendar-list .ccx-event-item {
    padding: 0.5em 0;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5em 1em;
}
.ccx-calendar-list .ccx-event-date {
    font-weight: 600;
    min-width: 7em;
}
.ccx-calendar-list .ccx-event-title {
    text-decoration: none;
    font-weight: 500;
}
.ccx-calendar-list .ccx-event-title:hover {
    text-decoration: underline;
}
.ccx-calendar-list .ccx-event-meta {
    color: #666;
    font-size: 0.9em;
}
.ccx-no-events {
    color: #666;
    font-style: italic;
}

/* Month view - 7-column grid */
.ccx-calendar-month .ccx-month-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1em;
    gap: 1em;
}
.ccx-calendar-month .ccx-month-prev,
.ccx-calendar-month .ccx-month-next {
    padding: 0.4em 0.75em;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #f0f0f1;
    cursor: pointer;
    font-size: 1em;
}
.ccx-calendar-month .ccx-month-prev:hover,
.ccx-calendar-month .ccx-month-next:hover {
    background: #e0e0e0;
}
.ccx-calendar-month .ccx-month-title {
    margin: 0;
    font-size: 1.25em;
}
.ccx-month-grid-wrap {
    overflow-x: auto;
}
.ccx-calendar-month .ccx-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    min-width: 320px;
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}
.ccx-month-grid-head {
    display: contents;
}
.ccx-month-grid-head-cell {
    padding: 0.5em;
    background: #f0f0f1;
    font-weight: 600;
    font-size: 0.85em;
    text-align: center;
}
.ccx-month-grid-body {
    display: contents;
}
.ccx-month-grid-row {
    display: contents;
}
.ccx-day-cell {
    min-height: 80px;
    padding: 4px;
    background: #fff;
    font-size: 0.9em;
}
.ccx-day-cell--empty {
    background: #fafafa;
    min-height: 60px;
}
.ccx-day-cell--today {
    background: #f0f6fc;
}
.ccx-day-num {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}
.ccx-event-pills {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ccx-event-pill {
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    line-height: 1.2;
    border: none;
    background: #e0e0e0;
    color: #1d2327;
    text-align: left;
}
.ccx-event-pill:hover,
.ccx-event-pill:focus {
    opacity: 0.9;
    outline: 1px solid #2271b1;
}
.ccx-event-pill-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ccx-event-pill-time {
    display: block;
    font-size: 0.9em;
    color: #666;
}
/* Industry color pills (default palette) */
.ccx-industry-default { background: #8c8f94; color: #fff; }
.ccx-industry-retail { background: #2271b1; color: #fff; }
.ccx-industry-finance { background: #00a32a; color: #fff; }
.ccx-industry-health { background: #d63638; color: #fff; }
.ccx-industry-tech { background: #dba617; color: #1d2327; }
.ccx-industry-education { background: #7c3aed; color: #fff; }

/* Event detail popover */
.ccx-event-detail-popover {
    position: absolute;
    z-index: 100;
    padding: 0.75em 1em;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-width: 320px;
}
.ccx-event-detail-popover[hidden] {
    display: none !important;
}
.ccx-event-detail-content p {
    margin: 0 0 0.5em 0;
}
.ccx-event-detail-content p:last-child {
    margin-bottom: 0;
}
.ccx-popover-link,
.ccx-popover-ics {
    margin-right: 0.75em;
    font-size: 0.9em;
}

/* Single event card */
.ccx-event-single {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin: 1em 0;
    background: #fff;
}
.ccx-event-single .ccx-event-image {
    line-height: 0;
}
.ccx-event-single .ccx-event-image img {
    width: 100%;
    height: auto;
    display: block;
}
.ccx-event-single .ccx-event-body {
    padding: 1em;
}
.ccx-event-single .ccx-event-title {
    margin: 0 0 0.5em 0;
    font-size: 1.25em;
}
.ccx-event-single .ccx-event-date {
    color: #666;
    margin: 0 0 0.75em 0;
}
.ccx-event-single .ccx-event-description {
    margin: 0.75em 0;
}
.ccx-event-single .ccx-event-terms {
    font-size: 0.9em;
    color: #666;
    margin: 0.5em 0;
}

/* Add to calendar buttons */
.ccx-add-to-calendar {
    margin: 1em 0;
}
.ccx-add-to-calendar-label {
    font-weight: 600;
    margin-right: 0.5em;
}
.ccx-add-to-calendar .ccx-cal-link {
    display: inline-block;
    margin: 0.25em 0.5em 0.25em 0;
    padding: 0.35em 0.75em;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    text-decoration: none;
    color: #1d2327;
    font-size: 0.9em;
}
.ccx-add-to-calendar .ccx-cal-link:hover {
    background: #e0e0e0;
}

/* Responsive */
@media (max-width: 640px) {
    .ccx-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .ccx-filter-bar select {
        width: 100%;
        max-width: 100%;
    }
    .ccx-calendar-month .ccx-month-grid {
        min-width: 280px;
    }
    .ccx-day-cell {
        min-height: 60px;
    }
    .ccx-event-pill-title {
        max-width: 100%;
    }
    .ccx-calendar-list .ccx-event-item {
        flex-direction: column;
        align-items: flex-start;
    }
}
