/* SCalendar Frontend CSS */

.scalendar-container {
    font-family: var(--sc-font, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
    max-width: 100%;
    margin: 20px auto;
    background: transparent;
    border: none;
    position: relative;
}

/* --- Navigation Bar --- */
.scalendar-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 20px;
}

.sc-nav-group {
    display: flex;
    gap: 5px;
}

.sc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: #444;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sc-btn:hover {
    background-color: #f8f8f8;
    color: #222;
    border-color: #bbb;
}

.sc-icon-btn {
    padding: 8px;
    width: 36px;
    height: 36px;
}

.sc-today-btn {
    margin-left: 5px;
    padding: 8px 16px;
    color: #666;
}

.sc-nav-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.sc-current-label {
    margin: 0;
    font-size: 1.75em;
    font-weight: 400;
    color: #555;
    letter-spacing: -0.5px;
}

.sc-pickers {
    display: flex;
    gap: 5px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.sc-pickers:hover {
    opacity: 1;
}

.sc-pickers select {
    background: transparent;
    border: 1px solid transparent;
    font-size: 12px;
    color: #666;
    padding: 2px;
}

.sc-pickers select:hover {
    border-color: #ddd;
    background: #fff;
}

.sc-view-switcher {
    display: flex;
    gap: 5px;
}

.sc-view-btn {
    padding: 8px 14px;
    color: #666;
    border: 1px solid #fff;
    background: #fff;
}

.sc-view-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    opacity: 0.7;
}

.sc-view-btn.active {
    background-color: #f0ad4e;
    color: #fff;
    border-color: #eea236;
    box-shadow: 0 2px 4px rgba(240, 173, 78, 0.3);
}

.sc-view-btn.active svg {
    opacity: 1;
}

/* --- Month View --- */
.scalendar-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #eee;
    border: 1px solid #ddd;
    border-bottom: none;
}

.sc-day-name {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    color: #666;
    border-right: 1px solid #e0e0e0;
}

.sc-day-name:last-child {
    border-right: none;
}

.scalendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
}

.sc-day {
    padding: 5px;
    min-height: 120px;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    position: relative;
    background: #fff;
}

.sc-day:nth-child(7n) {
    border-right: none;
}

.sc-day:hover {
    background: #fafafa;
    cursor: pointer;
}

.sc-date-num {
    display: block;
    text-align: right;
    width: 100%;
    color: #888;
    font-size: 14px;
    margin-bottom: 5px;
    padding-right: 5px;
}

.sc-today {
    background-color: #fafafa;
}

.sc-today .sc-date-num {
    color: #d35400;
    font-weight: bold;
}

.sc-event {
    background: #3498db;
    color: #fff;
    padding: 3px 6px;
    margin-bottom: 3px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    position: relative;
    border-left: 3px solid rgba(0, 0, 0, 0.15);
}

.sc-event:hover {
    opacity: 0.9;
    background: #2980b9;
}

/* --- List View --- */
.scalendar-list-view {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.sc-list-group {
    border-bottom: 1px solid #eee;
}

.sc-list-group:last-child {
    border-bottom: none;
}

.sc-list-date-header {
    background: #f3f0fa;
    /* Light Purple tint */
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #444;
    border-bottom: 1px solid #eee;
}

.sc-list-date {
    font-size: 1.05em;
}

.sc-list-day {
    color: #666;
    font-size: 0.95em;
}

.sc-list-event-row {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #f9f9f9;
    color: #333;
    cursor: pointer;
    font-size: 14px;
}

.sc-list-event-row:last-child {
    border-bottom: none;
}

.sc-list-event-row:hover {
    background: #fcfcfc;
}

.sc-list-time {
    min-width: 80px;
    color: #555;
    font-weight: 500;
    font-size: 0.9em;
}

.sc-list-dot {
    margin: 0 15px;
    color: #3498db;
    font-size: 1.2em;
    line-height: 1;
}

.sc-list-title {
    font-weight: 500;
    color: #222;
}

/* --- Time Grid (Week/Day) --- */
.sc-grid-wrapper {
    max-height: 700px;
    overflow-y: auto;
    border: 1px solid #dcdcdc;
    background: #efebe2;
    /* Beige base */
}

.sc-time-grid {
    width: 100%;
    border-collapse: collapse;
    background: #efebe2;
    /* Fallback */
}

.sc-time-grid th {
    background: #e6e6e6;
    /* Gray header */
    color: #666;
    font-weight: 600;
    padding: 10px;
    font-size: 0.9em;
    border-bottom: 1px solid #ccc;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sc-time-col {
    width: 60px;
    background: #f0f0f0;
    text-align: center;
    border-right: 1px solid #ccc;
    font-size: 0.85em;
    color: #777;
    z-index: 11;
    /* Keep above cells */
}

.sc-time-label {
    text-align: right;
    padding: 10px 5px;
    vertical-align: top;
    font-size: 0.8em;
    color: #555;
    background: #fdfdfd;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #eee;
}

.sc-allday-row td {
    background: #e8e3d2;
    /* Darker beige for all day */
    border-bottom: 2px solid #ccc;
    padding: 5px;
}

.sc-grid-cell {
    background: #f4f1ea;
    /* Light Beige */
    border-bottom: 1px dashed #ccc;
    /* Dotted lines */
    border-right: 1px solid #e0dfd6;
    padding: 2px;
    vertical-align: top;
    height: 60px;
    /* ~1 hour height */
}

/* Zebra striping or just lines? Image seems to have just lines */
.sc-time-grid tr:nth-child(even) .sc-grid-cell {
    background: #ebe7dd;
    /* Slightly darker stripe */
}

.sc-grid-cell:hover {
    background: #e0dccc;
}

/* Week Columns */
.sc-grid-header-cell {
    border-right: 1px solid #ccc;
}

.sc-grid-header-cell.sc-today {
    background: #f0ad4e;
    color: #fff;
}

/* Events in Grid */
.sc-grid-cell .sc-event {
    margin-bottom: 2px;
    padding: 2px 4px;
    font-size: 10px;
    background: #88c057;
    /* Greenish/Yellowish from image? Defaulting to Blue for now styling overriden */
    border-left: 2px solid rgba(0, 0, 0, 0.1);
}

/* Year View Small Btn */
.sc-small-btn {
    padding: 2px 8px;
    font-size: 0.8em;
    margin-top: 5px;
}

/* Tooltip (reusing from before) */
.sc-tooltip {
    position: absolute;
    z-index: 10000;
    background: #fff;
    color: #333;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    width: 250px;
    font-size: 13px;
    border: 1px solid #ddd;
}

.sc-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    margin-left: -8px;
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

/* ... etc (tooltip arrow) ... */

@media (max-width: 768px) {
    .scalendar-nav-bar {
        flex-direction: column;
    }

    .sc-grid-wrapper {
        max-height: 500px;
    }

    .sc-time-col {
        width: 40px;
    }
}