@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800&display=swap');

/**
 * Puah Activity Calendar - Public Stylesheet
 * Strict rule: NO ICONS! Pure typography and clean design.
 * Brand colors: Petrol #0b4351, Turquoise #229ca0, Burgundy #9b2242
 * Font: Heebo, sans-serif
 */

.puah-calendar-container {
    font-family: 'Heebo', sans-serif !important;
    color: #1e293b;
    direction: rtl;
    text-align: right;
    width: 100%;
    max-width: 1200px;
    margin: 25px auto;
    box-sizing: border-box;
}

.puah-calendar-container *,
.puah-calendar-container *::before,
.puah-calendar-container *::after {
    box-sizing: border-box;
}

/* Cards Bento Style */
.puah-calendar-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(11, 67, 81, 0.05);
    margin-bottom: 24px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.puah-calendar-card:hover {
    box-shadow: 0 8px 25px rgba(11, 67, 81, 0.09);
}

/* Header Card */
.puah-header-card {
    padding: 24px 28px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.puah-header-main {
    flex: 1 1 300px;
}

.puah-calendar-title {
    font-family: 'Heebo', sans-serif !important;
    font-size: 26px;
    font-weight: 700;
    color: #0b4351;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.puah-calendar-subtitle {
    font-size: 15px;
    color: #64748b;
    line-height: 1.5;
}

/* Navigation Buttons and Display */
.puah-calendar-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.puah-current-month-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    padding: 6px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
}

.puah-month-gregorian {
    font-size: 18px;
    font-weight: 700;
    color: #0b4351;
}

.puah-month-hebrew {
    font-size: 14px;
    font-weight: 500;
    color: #229ca0;
    margin-top: 2px;
}

/* Text Buttons (NO ICONS!) */
.puah-btn {
    font-family: 'Heebo', sans-serif !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.2;
}

.puah-btn-nav {
    background: #ffffff;
    color: #0b4351;
    border-color: #cbd5e1;
}

.puah-btn-nav:hover {
    background: #f0f8f9;
    border-color: #229ca0;
    color: #0b4351;
}

.puah-nav-today {
    background: #f0f8f9;
    color: #229ca0;
    border-color: #b2e2e4;
}

.puah-nav-today:hover {
    background: #229ca0;
    color: #ffffff;
}

.puah-btn-primary {
    background: #0b4351;
    color: #ffffff;
}

.puah-btn-primary:hover {
    background: #08323d;
    color: #ffffff;
}

.puah-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.puah-btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Grid Card */
.puah-grid-card {
    padding: 20px;
}

/* Weekday Headers */
.puah-weekdays-header {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
    text-align: center;
}

.puah-weekdays-header.puah-days-all {
    grid-template-columns: repeat(7, 1fr);
}

.puah-weekdays-header.puah-days-weekday {
    grid-template-columns: repeat(6, 1fr);
}

.puah-weekday {
    font-weight: 700;
    font-size: 15px;
    color: #0b4351;
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px 4px;
    border: 1px solid #edf2f7;
}

.puah-weekday.puah-shabbat {
    color: #9b2242;
    background: #fff8f8;
}

/* Days Grid */
.puah-days-grid {
    display: grid;
    gap: 8px;
}

.puah-days-grid.puah-days-all {
    grid-template-columns: repeat(7, 1fr);
}

.puah-days-grid.puah-days-weekday {
    grid-template-columns: repeat(6, 1fr);
}

/* Day Cell */
.puah-day-cell {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    min-height: 105px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

.puah-day-empty {
    background: #fafbfc;
    border-color: #f1f5f9;
    cursor: default;
    opacity: 0.5;
}

/* Day Numbers: Gregorian on top, Hebrew underneath */
.puah-day-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 5px;
    margin-bottom: 6px;
    gap: 2px;
    width: 100%;
}

.puah-day-gregorian {
    font-size: 19px;
    font-weight: 700;
    color: #0b4351;
    line-height: 1.1;
    display: block;
}

.puah-day-hebrew {
    font-size: 15px;
    font-weight: 700;
    color: #229ca0;
    line-height: 1.25;
    display: block;
    margin-top: 2px;
}

/* Today Cell */
.puah-day-today {
    background: #f8fafc;
    border: 2px solid #229ca0 !important;
}

.puah-day-today .puah-day-gregorian {
    color: #0b4351;
}

/* Days with Activity - Visual Indicator */
.puah-day-has-activity {
    background: #f0f8f9;
    border: 2px solid #229ca0;
    cursor: pointer;
}

.puah-day-has-activity:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(11, 67, 81, 0.12);
    border-color: #0b4351;
}

/* Indicator Badges */
.puah-activity-indicator {
    margin-top: 4px;
}

.puah-activity-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    background: #0b4351;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 6px;
    text-align: center;
    line-height: 1.2;
    direction: rtl;
}

.puah-badge-count {
    color: #229ca0;
    background: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    direction: ltr;
    display: inline-block;
    line-height: 1.2;
}

.puah-badge-label {
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
}

/* Loading State */
.puah-loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
}

/* Modal Popup */
.puah-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px;
}

.puah-modal.puah-modal-open {
    opacity: 1;
    visibility: visible;
}

.puah-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 67, 81, 0.55);
    backdrop-filter: blur(3px);
}

.puah-modal-dialog {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 620px;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
    direction: rtl;
    text-align: right;
}

.puah-modal-header {
    padding: 18px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.puah-modal-date {
    font-size: 17px;
    font-weight: 700;
    color: #0b4351;
    line-height: 1.4;
}

.puah-modal-close {
    font-family: inherit;
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.puah-modal-close:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
}

.puah-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.puah-modal-footer {
    padding: 14px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

/* Modal Activities List */
.puah-modal-activity-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-right: 4px solid #0b4351;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.puah-modal-activity-card:last-child {
    margin-bottom: 0;
}

.puah-modal-act-title {
    font-size: 19px;
    font-weight: 700;
    color: #0b4351;
    margin: 0 0 8px 0;
}

.puah-modal-act-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.puah-modal-act-time,
.puah-modal-act-loc {
    font-size: 13px;
    font-weight: 600;
    color: #229ca0;
    background: #f0f8f9;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid #c7ecee;
}

.puah-modal-act-content {
    font-size: 15px;
    color: #334155;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.puah-modal-empty {
    text-align: center;
    padding: 30px 10px;
    color: #64748b;
    font-size: 16px;
}

/* Mobile Accordion Base (Hidden on Desktop) */
.puah-mobile-accordion {
    display: none;
}

.puah-accordion-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(11, 67, 81, 0.04);
}

.puah-accordion-item.puah-acc-today {
    border-color: #229ca0;
}

.puah-accordion-item.puah-acc-open {
    border-color: #229ca0;
    box-shadow: 0 4px 14px rgba(34, 156, 160, 0.12);
}

.puah-accordion-header {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    background: #ffffff;
    user-select: none;
    transition: background-color 0.2s ease;
}

.puah-accordion-header:hover,
.puah-accordion-header:active {
    background: #f8fafc;
}

.puah-accordion-item.puah-acc-open .puah-accordion-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.puah-acc-day-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

.puah-acc-weekday {
    font-size: 15px;
    font-weight: 700;
    color: #0b4351;
    line-height: 1.2;
}

.puah-acc-weekday.puah-shabbat {
    color: #9b2242;
}

.puah-acc-dates {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.3;
}

.puah-acc-greg {
    color: #64748b;
    font-weight: 500;
}

.puah-acc-dot {
    color: #cbd5e1;
}

.puah-acc-heb {
    color: #229ca0;
    font-weight: 600;
}

.puah-acc-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.puah-acc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #0b4351;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 7px;
    border-radius: 6px;
    direction: rtl;
}

.puah-acc-badge .puah-badge-count {
    color: #229ca0;
    background: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    direction: ltr;
    display: inline-block;
    line-height: 1.2;
}

.puah-acc-badge .puah-badge-label {
    color: #ffffff;
    font-weight: 700;
    font-size: 11px;
}

.puah-acc-toggle-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    background: #f0f8f9;
    color: #229ca0;
    border: 1px solid #b2e2e4;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.puah-accordion-item.puah-acc-open .puah-acc-toggle-btn {
    background: #229ca0;
    color: #ffffff;
    border-color: #229ca0;
}

.puah-accordion-body {
    display: none;
    padding: 12px 14px;
    background: #f8fafc;
}

.puah-acc-act-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-right: 4px solid #0b4351;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.puah-acc-act-card:last-child {
    margin-bottom: 0;
}

.puah-acc-act-title {
    font-size: 15px;
    font-weight: 700;
    color: #0b4351;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.puah-acc-act-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.puah-acc-act-time,
.puah-acc-act-loc {
    font-size: 12px;
    font-weight: 600;
    color: #229ca0;
    background: #f0f8f9;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #c7ecee;
}

.puah-acc-act-content {
    font-size: 13.5px;
    color: #334155;
    line-height: 1.6;
    word-break: break-word;
    margin-top: 4px;
}

.puah-accordion-empty {
    text-align: center;
    padding: 30px 16px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    font-size: 15px;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .puah-calendar-container {
        margin: 15px auto !important;
        padding: 0 8px !important;
    }

    .puah-calendar-card {
        margin-bottom: 15px !important;
        border-radius: 12px !important;
    }

    .puah-header-card {
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        padding: 16px !important;
        min-height: auto !important;
        height: auto !important;
    }

    .puah-header-main {
        flex: 0 0 auto !important;
        text-align: center;
        margin: 0 !important;
        padding: 0 !important;
    }

    .puah-calendar-title {
        font-size: 20px !important;
        text-align: center;
        margin: 0 0 4px 0 !important;
    }

    .puah-calendar-subtitle {
        text-align: center;
        font-size: 13px !important;
        margin: 0 !important;
    }

    .puah-calendar-navigation {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .puah-current-month-display {
        width: 100% !important;
        order: -1 !important;
        padding: 8px 12px !important;
        min-width: auto !important;
        margin-bottom: 4px !important;
    }

    .puah-month-gregorian {
        font-size: 17px !important;
    }

    .puah-month-hebrew {
        font-size: 13px !important;
    }

    .puah-calendar-navigation .puah-btn-nav {
        flex: 1 1 calc(50% - 6px) !important;
        padding: 8px 10px !important;
        font-size: 13px !important;
        text-align: center !important;
        margin: 0 !important;
    }

    .puah-grid-card {
        padding: 12px 10px !important;
    }

    /* Hide Desktop Grid & Weekdays Header on Mobile */
    .puah-weekdays-header,
    .puah-days-grid {
        display: none !important;
    }

    /* Show Mobile Accordion on Mobile */
    .puah-mobile-accordion {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
}

