/* =========================================
   JAIN CALENDAR — PAGE STYLES
   Classic parchment-inspired aesthetic
   Compact spacing · Desktop sidebar layout
   ========================================= */

/* ---------- Old-world texture overlay ---------- */
.cal-hero,
.cal-grid-wrapper,
.cal-detail-card,
.upcoming-card,
.jain-month-card {
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(255,215,0,0.04) 0%, transparent 70%),
        radial-gradient(ellipse at 80% 50%, rgba(255,107,53,0.03) 0%, transparent 70%);
}

/* ---------- Hero ---------- */
.cal-hero {
    padding: 105px 0 40px;
    text-align: center;
    background: linear-gradient(180deg, #faf8f5 0%, #f3ece2 60%, #ede4d8 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid rgba(255,215,0,0.18);
}
.cal-hero::after {
    content: '☸';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 6rem;
    opacity: 0.04;
    pointer-events: none;
}
.cal-hero h1 {
    font-family: 'Merriweather', serif;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.cal-hero .muted {
    color: var(--text-light);
    font-size: 1.05rem;
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.55;
}
.cal-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,107,53,0.09);
    color: var(--accent-saffron);
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 14px;
    border: 1px solid rgba(255,107,53,0.14);
    letter-spacing: 0.03em;
}

/* ---------- Ornamental divider ---------- */
.cal-legend::before,
.cal-upcoming::before {
    content: '· · ✦ · ·';
    display: block;
    text-align: center;
    color: rgba(255,215,0,0.45);
    font-size: 0.9rem;
    letter-spacing: 6px;
    margin-bottom: 2px;
}

/* ---------- Legend ---------- */
.cal-legend {
    margin: 6px 0 0;
    padding: 0 8px;
}
.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.legend-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--bg-white);
    box-shadow: 0 2px 10px var(--shadow-light);
    border: 1px solid var(--border-light);
}
.legend-parv { color: #bf360c; }
.legend-festival { color: #6a1b9a; }
.legend-auspicious { color: #0d47a1; }
.legend-today { color: var(--accent-saffron); }

/* ---------- Controls ---------- */
.cal-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 4px 0 8px;
    flex-wrap: wrap;
}
.cal-nav-btn {
    width: 42px;
    height: 42px;
    border: 1.5px solid var(--border-light);
    border-radius: 50%;
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 3px 14px var(--shadow-light);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cal-nav-btn:hover {
    background: var(--accent-saffron);
    border-color: var(--accent-saffron);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-saffron-light);
}
.cal-month-display {
    text-align: center;
    min-width: 200px;
}
.cal-month-title {
    font-family: 'Merriweather', serif;
    font-size: 1.45rem;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.cal-jain-month {
    display: block;
    font-size: 0.88rem;
    color: var(--accent-saffron);
    font-weight: 600;
    margin-top: 3px;
}
.cal-today-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 2px solid var(--accent-saffron);
    border-radius: 999px;
    background: transparent;
    color: var(--accent-saffron);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.25s ease;
}
.cal-today-btn:hover {
    background: var(--accent-saffron);
    color: #fff;
}

/* ---------- Two-column layout ---------- */
.cal-layout {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 24px;
    align-items: start;
    margin-bottom: 28px;
}
.cal-main-col {
    min-width: 0; /* prevent grid blowout */
}

/* ---------- Calendar Grid ---------- */
.cal-grid-wrapper {
    background-color: var(--bg-white);
    border-radius: 16px;
    padding: 22px 20px;
    box-shadow: 0 10px 40px var(--shadow-light);
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
    overflow: hidden;
}
.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-saffron);
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255,215,0,0.18);
    margin-bottom: 8px;
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    overflow: hidden;
}

/* ---------- Day Cell ---------- */
.cal-day {
    position: relative;
    height: 90px;
    padding: 6px 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
    display: flex;
    flex-direction: column;
    background: rgba(250,248,245,0.5);
    overflow: hidden;
}
.cal-day:hover {
    background: rgba(255,107,53,0.05);
    border-color: rgba(255,107,53,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(255,107,53,0.08);
}
.cal-day.empty {
    cursor: default;
    pointer-events: none;
    background: transparent;
}
.cal-day .day-num {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1.04rem;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 2px;
}
.cal-day.sunday .day-num {
    color: #b71c1c;
}
.cal-day .day-tithi {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 2px;
    line-height: 1.3;
    letter-spacing: 0.01em;
}
.cal-day .day-paksha {
    font-size: 0.62rem;
    color: var(--text-light);
    opacity: 0.7;
}

/* Event dots row */
.cal-day .day-dots {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 3px;
}
.day-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.day-dot.parv { background: #bf360c; }
.day-dot.festival { background: #6a1b9a; }
.day-dot.auspicious { background: #0d47a1; }

/* Event labels */
.cal-day .day-label {
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 2px 5px;
    border-radius: 4px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.day-label.parv {
    background: rgba(191,54,12,0.1);
    color: #bf360c;
}
.day-label.festival {
    background: rgba(106,27,154,0.1);
    color: #6a1b9a;
}
.day-label.auspicious {
    background: rgba(13,71,161,0.08);
    color: #0d47a1;
}

/* Today */
.cal-day.today {
    background: linear-gradient(135deg, rgba(255,107,53,0.07), rgba(255,215,0,0.07));
    border-color: var(--accent-saffron);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.1), 0 4px 16px rgba(255,107,53,0.08);
}
.cal-day.today .day-num {
    background: var(--accent-saffron);
    color: #fff;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.88rem;
}

/* Selected */
.cal-day.selected {
    background: rgba(255,107,53,0.08);
    border-color: var(--accent-saffron);
    box-shadow: 0 0 0 2px rgba(255,107,53,0.12);
}

/* ---------- Detail Panel ---------- */
.cal-detail-panel {
    display: none;
    margin-bottom: 20px;
}
.cal-detail-panel.open {
    display: block;
    animation: fadeSlideUp 0.35s ease;
}
.cal-detail-card {
    background-color: var(--bg-white);
    border-radius: 16px;
    padding: 24px 24px;
    box-shadow: 0 12px 44px var(--shadow-light);
    border: 1px solid var(--border-light);
    position: relative;
}
.cal-detail-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.cal-detail-close:hover {
    background: rgba(0,0,0,0.06);
    color: var(--text-dark);
}
.cal-detail-header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}
.cal-detail-date {
    font-family: 'Merriweather', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
}
.cal-detail-tithi {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-saffron);
    background: rgba(255,107,53,0.09);
    padding: 3px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,107,53,0.14);
}
.cal-detail-body p {
    color: var(--text-light);
    line-height: 1.65;
    margin-bottom: 8px;
    font-size: 0.94rem;
}
.cal-detail-body .detail-event {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 10px;
}
.detail-event.parv {
    background: rgba(191,54,12,0.06);
    border-left: 4px solid #bf360c;
}
.detail-event.festival {
    background: rgba(106,27,154,0.06);
    border-left: 4px solid #6a1b9a;
}
.detail-event.auspicious {
    background: rgba(13,71,161,0.05);
    border-left: 4px solid #0d47a1;
}
.detail-event .event-icon {
    font-size: 1.1rem;
    margin-top: 2px;
}
.detail-event .event-info h4 {
    font-family: 'Merriweather', serif;
    font-size: 0.96rem;
    margin-bottom: 3px;
    color: var(--text-dark);
}
.detail-event .event-info p {
    font-size: 0.88rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.55;
}

/* ---------- Sidebar — Jain Months (desktop right pane) ---------- */
.cal-sidebar {
    position: sticky;
    top: 86px;
    background-color: var(--bg-white);
    border-radius: 16px;
    padding: 16px 12px;
    box-shadow: 0 6px 28px var(--shadow-light);
    border: 1px solid var(--border-light);
    overflow: hidden;
    align-self: start;
}
.cal-sidebar-title {
    font-family: 'Merriweather', serif;
    font-size: 0.95rem;
    color: var(--text-dark);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255,215,0,0.18);
}
.cal-sidebar-title i {
    color: var(--accent-saffron);
    font-size: 0.88rem;
}
.cal-sidebar .cal-months-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cal-sidebar .jain-month-card {
    padding: 6px 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    background-color: rgba(250,248,245,0.5);
}
.cal-sidebar .jain-month-card:hover {
    transform: translateX(2px);
    box-shadow: 0 3px 12px var(--shadow-saffron-light);
    border-color: rgba(255,107,53,0.2);
}
.cal-sidebar .jain-month-card.active {
    border-color: var(--accent-saffron);
    background: linear-gradient(135deg, rgba(255,107,53,0.06), rgba(255,215,0,0.05));
    box-shadow: 0 3px 12px var(--shadow-saffron-light);
}
.cal-sidebar .jain-month-card .month-emoji {
    font-size: 1.1rem;
    margin-bottom: 0;
    flex-shrink: 0;
    line-height: 1;
}
.cal-sidebar .jain-month-card h4 {
    font-family: 'Merriweather', serif;
    font-size: 0.78rem;
    color: var(--text-dark);
    margin-bottom: 0;
    line-height: 1.2;
}
.cal-sidebar .jain-month-card span {
    font-size: 0.66rem;
    color: var(--text-light);
    display: block;
    line-height: 1.2;
}

/* ---------- Upcoming ---------- */
.cal-upcoming {
    margin-bottom: 32px;
}
.cal-section-title {
    font-family: 'Merriweather', serif;
    font-size: 1.35rem;
    color: var(--text-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cal-section-title i {
    color: var(--accent-saffron);
    font-size: 1rem;
}
.cal-upcoming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.upcoming-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 4px 18px var(--shadow-light);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.25s ease;
    cursor: default;
}
.upcoming-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--shadow-saffron-light);
    border-color: rgba(255,107,53,0.15);
}
.upcoming-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.upcoming-icon.parv { background: rgba(191,54,12,0.08); color: #bf360c; }
.upcoming-icon.festival { background: rgba(106,27,154,0.08); color: #6a1b9a; }
.upcoming-icon.auspicious { background: rgba(13,71,161,0.06); color: #0d47a1; }
.upcoming-info h4 {
    font-family: 'Merriweather', serif;
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 2px;
}
.upcoming-info span {
    font-size: 0.84rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* ---------- Animations ---------- */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
    opacity: 0;
    transform: translateY(22px);
    animation: fadeSlideUp 0.65s ease forwards;
}
.stagger-1 { animation-delay: 0.15s; }
.stagger-2 { animation-delay: 0.3s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .cal-layout {
        grid-template-columns: 1fr;
    }
    .cal-sidebar {
        position: static;
        max-height: none;
    }
    .cal-sidebar .cal-months-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    .cal-sidebar .jain-month-card {
        flex-direction: column;
        text-align: center;
        padding: 14px 10px;
    }
}

@media (max-width: 768px) {
    .cal-hero { padding: 95px 0 32px; }
    .cal-hero h1 { font-size: 2rem; }
    .cal-hero .muted { font-size: 0.96rem; }
    .cal-grid-wrapper { padding: 16px 12px; }
    .cal-day { height: 70px; padding: 4px 4px; }
    .cal-day .day-num { font-size: 0.92rem; }
    .cal-day .day-tithi { font-size: 0.62rem; }
    .cal-day .day-label { font-size: 0.56rem; }
    .cal-controls { gap: 10px; margin: 12px 0 12px; }
    .cal-month-title { font-size: 1.25rem; }
    .cal-detail-card { padding: 20px 16px; }
    .cal-upcoming-grid { grid-template-columns: 1fr; }
    .cal-section-title { font-size: 1.2rem; }
    .cal-sidebar .cal-months-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
    .cal-hero { padding: 85px 0 26px; }
    .cal-hero h1 { font-size: 1.6rem; }
    .cal-hero .muted { font-size: 0.9rem; }
    .cal-weekdays { font-size: 0.7rem; letter-spacing: 0.04em; }
    .cal-day { height: 56px; padding: 3px 3px; border-radius: 8px; }
    .cal-day .day-num { font-size: 0.82rem; }
    .cal-day.today .day-num { width: 22px; height: 22px; font-size: 0.76rem; }
    .cal-day .day-tithi { display: none; }
    .cal-day .day-label { font-size: 0.5rem; padding: 1px 3px; }
    .cal-day .day-dots .day-dot { width: 5px; height: 5px; }
    .legend-items { gap: 6px; }
    .legend-dot { font-size: 0.74rem; padding: 4px 10px; }
    .cal-today-btn { padding: 6px 12px; font-size: 0.8rem; }
    .cal-legend::before,
    .cal-upcoming::before { font-size: 0.82rem; letter-spacing: 4px; margin-bottom: 10px; }
    .upcoming-card { padding: 14px; gap: 12px; }
    .upcoming-icon { width: 40px; height: 40px; }
    .cal-detail-header { gap: 8px; margin-bottom: 10px; padding-bottom: 10px; }
    .cal-detail-date { font-size: 1.15rem; }
    .cal-sidebar .cal-months-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================
   PWA INSTALL BAR
   ========================================= */
.pwa-install-bar {
    position: fixed;
    bottom: -120px;
    left: 0;
    right: 0;
    z-index: 10001;
    transition: bottom 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.pwa-install-bar.visible {
    bottom: 0;
    pointer-events: auto;
}
.pwa-install-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto 16px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #fff8f2 0%, #fff 100%);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 107, 53, 0.12);
    border: 1.5px solid rgba(255, 107, 53, 0.18);
}
.pwa-install-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.pwa-install-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}
.pwa-install-info strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-dark, #333);
    line-height: 1.2;
}
.pwa-install-info span {
    display: block;
    font-size: 0.78rem;
    color: var(--text-light, #777);
    margin-top: 2px;
}
.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.pwa-install-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff6b35, #e85d26);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(255, 107, 53, 0.35);
    transition: all 0.25s ease;
    white-space: nowrap;
}
.pwa-install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.45);
    background: linear-gradient(135deg, #ff7a4a, #ff6b35);
}
.pwa-install-btn:active {
    transform: translateY(0);
}
.pwa-dismiss-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: #888;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.pwa-dismiss-btn:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #555;
}

/* iOS Instructions Modal */
.pwa-ios-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.pwa-ios-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
.pwa-ios-modal {
    background: #fff;
    max-width: 400px;
    width: 90%;
    padding: 28px 24px 24px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.pwa-ios-overlay.visible .pwa-ios-modal {
    transform: translateY(0);
}
.pwa-ios-modal h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-dark, #333);
}
.pwa-ios-modal p {
    font-size: 0.92rem;
    color: var(--text-light, #666);
    margin-bottom: 12px;
}
.pwa-ios-modal ol {
    text-align: left;
    padding-left: 22px;
    margin-bottom: 20px;
}
.pwa-ios-modal ol li {
    font-size: 0.9rem;
    margin-bottom: 8px;
    line-height: 1.45;
    color: var(--text-dark, #333);
}
.pwa-ios-close {
    padding: 12px 36px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff6b35, #e85d26);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pwa-ios-close:hover {
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.4);
}

/* =========================================
   FLOATING ACTION HUB (theme + install)
   ========================================= */
.fab-hub {
    position: fixed;
    bottom: 18px;
    right: 18px;
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    transition: bottom 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.fab-hub.bar-visible {
    bottom: 100px;
}

/* Main hub toggle */
.fab-hub-toggle {
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: var(--btn-primary-bg, #ff6b35);
    color: var(--btn-primary-text, #fff);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    z-index: 2;
}
.fab-hub-toggle:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}
.fab-hub-toggle .fa-times { display: none; }
.fab-hub.open .fab-hub-toggle .fa-cog { display: none; }
.fab-hub.open .fab-hub-toggle .fa-times { display: inline; }
.fab-hub.open .fab-hub-toggle {
    transform: rotate(90deg);
}

/* Child buttons container */
.fab-hub-items {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    opacity: 0;
    transform: translateX(20px) scale(0.85);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.fab-hub.open .fab-hub-items {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Individual child FAB */
.fab-child {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}
.fab-child:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

/* Tooltip label */
.fab-child::before {
    content: attr(data-label);
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    white-space: nowrap;
    text-align: center;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.2s ease;
}
.fab-hub.open:not(.hide-labels) .fab-child::before {
    opacity: 1;
    transform: translateY(0);
}

/* Theme child */
.fab-child-theme {
    background: var(--btn-primary-bg, #ff6b35);
}

/* Install child */
.fab-child-install {
    background: linear-gradient(135deg, #ff6b35, #e85d26);
}

/* Backdrop overlay when hub is open */
.fab-hub-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: transparent;
}
.fab-hub-backdrop.active {
    display: block;
}

/* On desktop, hide install child (optional: keep it visible everywhere) */
@media (min-width: 769px) {
    .pwa-install-bar {
        display: none;
    }

    .fab-child-install {
        display: none;
    }
}
