/* ── Events Calendar Plugin — Frontend Styles ── */

/*
  Paleta e ngjyrave:
  --ec-red:      #C0392B  → kuq kryesore (evente me dot, badge, ora)
  --ec-red-dark: #8B1A1A  → burgundy (hover)
  --ec-red-bg:   #F8F0EF  → rozë shumë e lehtë (sfond i djathtë, emoji bg)
  --ec-red-lite: #FDECEA  → hover i ditëve
  --ec-today:    #E74C3C  → kuq e ndezur për sot
  --ec-selected: #C0392B  → kuq për ditën e zgjedhur
*/

.ec-plugin {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 8px 48px rgba(0,0,0,.10);
    overflow: hidden;
    max-width: 1024px;
    margin: 2rem auto;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', serif;
    min-height: 480px;
}

/* ─ Left ─ */
.ec-left {
    padding: 2rem;
    border-right: 1px solid #f0e0de;
}

.ec-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.6rem;
}

.ec-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #C0392B;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 2px;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s;
    font-family: inherit;
}
.ec-nav-btn:hover { color: #8B1A1A; }

.ec-cal-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: .03em;
    color: #1a1010;
    text-align: center;
}

/* ─ Grid ─ */
.ec-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.ec-day-name {
    text-align: center;
    font-size: .68rem;
    font-weight: 700;
    color: #b08080;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding-bottom: .7rem;
}

.ec-day-cell {
    text-align: center;
    padding: 5px 2px;
    cursor: pointer;
}

.ec-day-num {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: .86rem;
    font-weight: 500;
    margin: 0 auto;
    transition: background .15s, color .15s;
}

.ec-day-cell:hover .ec-day-num {
    background: #FDECEA;
    color: #8B1A1A;
}

/* Sot — kuq e ndezur me unazë */
.ec-day-cell.ec-today .ec-day-num {
    background: #E74C3C;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(231,76,60,.38);
    outline: 2px solid #fff;
    outline-offset: -3px;
}

/* Dita e zgjedhur — burgundy */
.ec-day-cell.ec-selected .ec-day-num {
    background: #C0392B;
    color: #fff;
    box-shadow: 0 3px 10px rgba(192,57,43,.30);
}

.ec-day-cell.ec-other-month .ec-day-num {
    color: #d9c0be;
}

/* Pika — kuq kryesore */
.ec-dot {
    width: 7px;
    height: 7px;
    background: #C0392B;
    border-radius: 50%;
    margin: 3px auto 0;
}

.ec-day-cell.ec-other-month .ec-dot { background: #e0cece; }

/* ─ Right ─ */
.ec-right {
    padding: 2rem;
    background: #fffbfb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#ec-events-list {
    overflow-y: auto;
    flex: 1;
    padding-right: 4px;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #e0c8c6 transparent;
}

#ec-events-list::-webkit-scrollbar {
    width: 5px;
}
#ec-events-list::-webkit-scrollbar-track {
    background: transparent;
}
#ec-events-list::-webkit-scrollbar-thumb {
    background: #e0c8c6;
    border-radius: 10px;
}

.ec-events-header {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.4rem;
}

.ec-ev-label,
.ec-ev-month,
.ec-ev-year {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #b08080;
}

.ec-ev-badge {
    background: #C0392B;
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 800;
}

/* ─ Event Cards ─ */
.ec-event-card {
    background: #fff;
    border: 1px solid #f0e0de;
    border-left: 3px solid #C0392B;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: .85rem;
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .18s, transform .15s;
    animation: ec-fade-in .28s ease;
}

.ec-event-card:hover {
    box-shadow: 0 4px 18px rgba(192,57,43,.13);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

@keyframes ec-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ec-event-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.ec-event-emoji {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #FDECEA;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.ec-event-info { flex: 1; min-width: 0; }

.ec-event-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .73rem;
    color: #C0392B;
    font-weight: 700;
    margin-bottom: 3px;
}

.ec-event-time svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.ec-event-title {
    font-size: .82rem;
    font-weight: 700;
    color: #1a2332;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: .01em;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ec-event-org {
    font-size: .72rem;
    color: #b08080;
    font-style: italic;
}

.ec-event-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

/* ─ States ─ */
.ec-no-events {
    text-align: center;
    color: #b08080;
    font-size: .88rem;
    margin-top: 3rem;
    line-height: 1.7;
}
.ec-no-events span {
    font-size: 2.2rem;
    display: block;
    margin-bottom: .4rem;
}

.ec-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: #b08080;
    font-size: .85rem;
    padding: 2rem;
}

/* ─ Responsive ─ */

/* Tablet */
@media (max-width: 780px) {
    .ec-plugin {
        grid-template-columns: 1fr;
        max-width: 480px;
        min-height: auto;
        border-radius: 14px;
    }
    .ec-left {
        border-right: none;
        border-bottom: 1px solid #f0e0de;
        padding: 1.4rem 1.2rem;
    }
    .ec-right {
        padding: 1.4rem 1.2rem;
        max-height: 420px;
    }
    .ec-cal-title {
        font-size: 1.1rem;
    }
    .ec-nav-btn {
        font-size: .7rem;
    }
    .ec-day-num {
        width: 30px;
        height: 30px;
        font-size: .8rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .ec-plugin {
        max-width: 100%;
        border-radius: 12px;
        margin: 1rem 0;
    }
    .ec-left {
        padding: 1.1rem .9rem;
    }
    .ec-right {
        padding: 1.1rem .9rem;
    }
    .ec-cal-header {
        margin-bottom: 1rem;
    }
    .ec-cal-title {
        font-size: 1rem;
    }
    .ec-nav-btn {
        font-size: .65rem;
    }
    .ec-day-name {
        font-size: .6rem;
        letter-spacing: .06em;
    }
    .ec-day-num {
        width: 26px;
        height: 26px;
        font-size: .75rem;
    }
    .ec-dot {
        width: 4px;
        height: 4px;
        margin-top: 2px;
    }
    .ec-event-card {
        padding: .8rem .9rem;
        gap: .7rem;
    }
    .ec-event-emoji,
    .ec-event-thumb {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .ec-event-title {
        white-space: normal;
        font-size: .78rem;
    }
    .ec-event-time {
        font-size: .68rem;
    }
    .ec-event-org {
        font-size: .67rem;
    }
    .ec-events-header {
        margin-bottom: 1rem;
    }
    .ec-ev-badge {
        width: 24px;
        height: 24px;
        font-size: .78rem;
    }
    .ec-ev-label,
    .ec-ev-month {
        font-size: .63rem;
    }
}
