/* =============================================
   ACF Events Calendar – Front-end Styles
   Warm / Arabic RTL aesthetic
   ============================================= */

/* ── Google Font (Cairo – supports Arabic) ── */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap');

/* ── Reset / base ── */
.aec-calendar-wrap,
.aec-list-wrap {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    box-sizing: border-box;
}

.aec-inline-events {
    margin-top: 16px;
    border-top: 1px solid #e8ddd4;
    padding-top: 14px;
}

/* ══════════════════════════════
   CALENDAR WIDGET
══════════════════════════════ */
.aec-calendar-wrap {
    background-color: #fdf6ee;
    border: 1.5px solid #e8ddd4;
    border-radius: 18px;
    padding: 20px;
    max-width: 420px;
    width: 100%;
    user-select: none;
}

/* Header row: prev / month-year / next */
.aec-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    color: #3d2b1f;
}

.aec-cal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .02em;
}

.aec-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #3d2b1f;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background .15s;
    line-height: 1;
}
.aec-nav-btn:hover { background: #efe4da; }

/* Day-of-week labels */
.aec-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
}

.aec-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 0;
    color: #c0593a;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Day cells */
.aec-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.aec-day {
    border: .75px solid #e8ddd4;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 5px 7px 4px;
    cursor: default;
    transition: background .12s;
    position: relative;
}

.aec-day span {
    font-size: 13px;
    font-weight: 600;
    color: #3d2b1f;
    line-height: 1;
}

.aec-day.aec-other-month span { color: #c8bdb6; }

/* Days that have events → clickable */
.aec-day.aec-has-event { cursor: pointer; }
.aec-day.aec-has-event:hover { background: #f5e9de; }

/* All current-month days are clickable */
.aec-day:not(.aec-other-month) {
    cursor: pointer;
}
.aec-day:not(.aec-other-month):hover { background: #f5e9de; }

/* Today highlight */
.aec-day.aec-today {
    background-color: #c0593a;
    border-color: #c0593a;
}
.aec-day.aec-today span { color: #fff; }

/* Selected day */
.aec-day.aec-selected {
    background-color: #c0593a;
    border-color: #c0593a;
}
.aec-day.aec-selected span { color: #fff; }
.aec-day.aec-selected .aec-dot { background: #fff; }

/* Event dot */
.aec-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #c0593a;
    margin-top: 3px;
}

/* ══════════════════════════════
   EVENTS LIST WIDGET
══════════════════════════════ */
.aec-list-wrap {
    background-color: #fdf6ee;
    border: 1.5px solid #e8ddd4;
    border-radius: 18px;
    padding: 20px 24px;
    max-width: 380px;
    width: 100%;
    min-height: 180px;
}

.aec-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.aec-list-title {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    color: #3d2b1f;
}

/* Individual event pills */
.aec-events-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aec-event-item {
    background-color: #f5e9de;
    border-radius: 50px;
    padding: 12px 20px;
    color: #3d2b1f;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: block;
    cursor: pointer;
    transition: background .15s, transform .1s;
    text-align: right;
    border: 1px solid transparent;
}
.aec-event-item:hover {
    background-color: #ecd9ca;
    transform: translateY(-1px);
    border-color: #c0593a33;
    color: #3d2b1f;
    text-decoration: none;
}

.aec-placeholder {
    color: #a8968d;
    font-size: 14px;
    text-align: center;
    padding: 30px 0;
    margin: 0;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .aec-calendar-wrap,
    .aec-list-wrap { max-width: 100%; }
    .aec-day { min-height: 44px; }
    .aec-day span { font-size: 12px; }
}
