/* Google Calendar Embed – Frontend Styles */

.gce-calendar {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    position: relative;
}

/* ---- Nav ---- */
.gce-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.gce-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.gce-btn {
    padding: 5px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: background .15s;
}

.gce-btn:hover { background: #f3f4f6; }

.gce-view-switcher {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.gce-view-btn {
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    transition: all .15s;
}

.gce-view-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

/* ---- Body ---- */
.gce-body { padding: 12px; min-height: 200px; }

/* ---- Loading ---- */
.gce-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #6b7280;
    padding: 40px 0;
}

.gce-spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid #d1d5db;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: gce-spin .7s linear infinite;
}

@keyframes gce-spin { to { transform: rotate(360deg); } }

.gce-error {
    color: #dc2626;
    text-align: center;
    padding: 20px;
}

/* ---- List view ---- */
.gce-list-group { margin-bottom: 16px; }

.gce-list-date {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6b7280;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #f3f4f6;
}

.gce-list-group.gce-today .gce-list-date { color: #2563eb; }

.gce-no-events { color: #9ca3af; text-align: center; padding: 30px 0; }

/* ---- Event pill ---- */
.gce-event {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    margin-bottom: 4px;
    border-radius: 5px;
    background: #f0f4ff;
    cursor: pointer;
    transition: background .12s;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gce-event:hover { background: #dbeafe; }

.gce-event-time {
    font-size: 11px;
    color: #6b7280;
    flex-shrink: 0;
}

.gce-event-title {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Grid ---- */
.gce-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid #e5e7eb;
}

.gce-grid-cell-header {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #9ca3af;
    padding: 6px 0;
}

.gce-grid-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid #f3f4f6;
}

.gce-grid-row:last-child { border-bottom: none; }

.gce-grid-cell {
    min-height: 90px;
    padding: 4px;
    border-right: 1px solid #f3f4f6;
    overflow: hidden;
}

.gce-grid-cell:last-child { border-right: none; }

.gce-cell-date {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 3px;
}

.gce-grid-cell.gce-today .gce-cell-date {
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    width: 22px; height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gce-grid-cell.gce-other-month { background: #fafafa; }
.gce-grid-cell.gce-other-month .gce-cell-date { color: #d1d5db; }

.gce-grid-cell .gce-event {
    font-size: 11px;
    padding: 2px 5px;
    margin-bottom: 2px;
}

/* ---- Modal ---- */
.gce-modal {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 10px;
}

.gce-modal-inner {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    max-width: 380px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 24px rgba(0,0,0,.18);
}

.gce-modal-close {
    position: absolute;
    top: 10px; right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
}

.gce-modal-close:hover { color: #374151; }

.gce-modal-content h3 { margin: 0 0 12px; font-size: 17px; }
.gce-modal-time  { color: #6b7280; font-size: 13px; margin: 6px 0; }
.gce-modal-loc   { color: #6b7280; font-size: 13px; margin: 6px 0; }
.gce-modal-desc  { font-size: 13px; margin: 10px 0; line-height: 1.5; }

.gce-btn-primary {
    display: inline-block;
    margin-top: 10px;
    padding: 7px 14px;
    background: #2563eb;
    color: #fff !important;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.gce-btn-primary:hover { background: #1d4ed8; }
