/* ==========================================================================
   Haminja PWA Install Page - Minimalist, Modern, Fluid Responsive
   ========================================================================== */

:root {
    --pwa-primary: #0F9F8A;
    --pwa-primary-hover: #0c8270;
    --pwa-primary-light: rgba(15, 159, 138, 0.08);
    --pwa-primary-glow: rgba(15, 159, 138, 0.25);
    --pwa-card-bg: rgba(255, 255, 255, 0.95);
    --pwa-card-border: rgba(15, 159, 138, 0.12);
    --pwa-inner-card-bg: #f8fafc;
    --pwa-inner-border: rgba(226, 232, 240, 0.8);
    --pwa-text-main: #0f172a;
    --pwa-text-sub: #475569;
    --pwa-text-muted: #64748b;
    --pwa-shadow-sm: 0 4px 12px rgba(15, 159, 138, 0.06);
    --pwa-shadow-md: 0 10px 30px -6px rgba(15, 159, 138, 0.12), 0 2px 8px rgba(0, 0, 0, 0.03);
    --pwa-radius-lg: 24px;
    --pwa-radius-md: 16px;
    --pwa-radius-sm: 10px;
}

[data-theme="dark"] .pwa-install-page,
.dark-layout .pwa-install-page {
    --pwa-card-bg: rgba(26, 34, 48, 0.88);
    --pwa-card-border: rgba(15, 159, 138, 0.22);
    --pwa-inner-card-bg: rgba(15, 23, 42, 0.6);
    --pwa-inner-border: rgba(51, 65, 85, 0.6);
    --pwa-text-main: #f8fafc;
    --pwa-text-sub: #cbd5e1;
    --pwa-text-muted: #94a3b8;
    --pwa-shadow-md: 0 14px 34px -8px rgba(0, 0, 0, 0.45);
}

.pwa-install-page {
    position: relative;
    padding-top: 1rem;
    padding-bottom: 4rem;
    overflow-x: hidden;
    font-family: inherit;
    color: var(--pwa-text-main);
    box-sizing: border-box;
}

/* Ambient Subtle Glows (Contained to prevent horizontal scrolling) */
.pwa-ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
}
.pwa-ambient-glow--1 {
    top: 2%;
    right: 5%;
    width: min(320px, 45vw);
    height: min(320px, 45vw);
    background: radial-gradient(circle, var(--pwa-primary-glow), transparent 70%);
}
.pwa-ambient-glow--2 {
    top: 40%;
    left: 5%;
    width: min(300px, 40vw);
    height: min(300px, 40vw);
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15), transparent 70%);
}

.pwa-container {
    max-width: 900px !important;
    width: 100%;
    margin-inline: auto;
    padding-inline: 1.25rem;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Hero Section - Clean & Minimal
   ═══════════════════════════════════════════════════════════════════════════ */
.pwa-hero-card {
    background: var(--pwa-card-bg);
    border: 1px solid var(--pwa-card-border);
    border-radius: var(--pwa-radius-lg);
    box-shadow: var(--pwa-shadow-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 2.25rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.pwa-hero-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, var(--pwa-primary), #10b981);
}

.pwa-app-icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    position: relative;
}

.pwa-app-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 8px 20px -3px var(--pwa-primary-glow);
    border: 2px solid #ffffff;
    background: #ffffff;
    transition: transform 0.25s ease;
}

.pwa-app-icon-wrap:hover .pwa-app-icon {
    transform: scale(1.04);
}

.pwa-app-icon-badge {
    position: absolute;
    bottom: -4px;
    left: -4px;
    background: #10b981;
    color: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.pwa-hero-title {
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
    color: var(--pwa-text-main);
    line-height: 1.35;
}

.pwa-hero-subtitle {
    max-width: 540px;
    margin: 0 auto 1.25rem;
    font-size: 0.95rem;
    color: var(--pwa-text-sub);
    line-height: 1.6;
}

/* Smart Device Badge */
.pwa-device-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
    background: var(--pwa-primary-light);
    color: var(--pwa-primary);
    border: 1px solid rgba(15, 159, 138, 0.2);
    margin-bottom: 1.5rem;
    transition: all 0.25s ease;
}

.pwa-device-pill.is-installed {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.3);
}

.pwa-device-pill.is-ready {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.35);
}

/* CTA Buttons */
.pwa-cta-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.btn-pwa-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #0F9F8A 0%, #0d8574 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.75rem 1.85rem;
    min-height: 48px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 6px 20px -3px var(--pwa-primary-glow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none !important;
}

.btn-pwa-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -2px var(--pwa-primary-glow);
    background: linear-gradient(135deg, #12ad97 0%, #0F9F8A 100%);
}

.btn-pwa-primary:active {
    transform: translateY(0);
}

.btn-pwa-primary.disabled,
.btn-pwa-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-pwa-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--pwa-text-sub);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.75rem 1.4rem;
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid var(--pwa-inner-border);
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.btn-pwa-secondary:hover {
    background: var(--pwa-inner-card-bg);
    color: var(--pwa-primary);
    border-color: rgba(15, 159, 138, 0.3);
}

/* Compact Highlight Chips */
.pwa-highlights-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.6rem 0.85rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--pwa-inner-border);
}

.pwa-highlight-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    background: var(--pwa-inner-card-bg);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--pwa-text-sub);
    border: 1px solid var(--pwa-inner-border);
}

.pwa-highlight-chip i {
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Platform Installation Guide
   ═══════════════════════════════════════════════════════════════════════════ */
.pwa-guide-section {
    margin-bottom: 2.25rem;
}

.pwa-section-title-wrap {
    text-align: center;
    margin-bottom: 1.25rem;
}

.pwa-section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--pwa-text-main);
    margin-bottom: 0.35rem;
}

.pwa-section-desc {
    font-size: 0.9rem;
    color: var(--pwa-text-muted);
    margin-bottom: 0;
}

/* Pill Tabs Switcher */
.pwa-tabs-nav-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.pwa-tabs-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--pwa-card-bg);
    border: 1px solid var(--pwa-card-border);
    padding: 0.35rem;
    border-radius: 14px;
    box-shadow: var(--pwa-shadow-sm);
    max-width: 100%;
}

.pwa-tab-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--pwa-text-muted);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pwa-tab-item:hover {
    color: var(--pwa-primary);
}

.pwa-tab-item.active {
    background: var(--pwa-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--pwa-primary-glow);
}

.pwa-tab-pane {
    display: none;
    animation: pwaFadeIn 0.25s ease forwards;
}

.pwa-tab-pane.active {
    display: block;
}

@keyframes pwaFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Steps Grid (CSS Grid: Fluid & Responsive) */
.pwa-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.pwa-step-card {
    background: var(--pwa-card-bg);
    border: 1px solid var(--pwa-card-border);
    border-radius: var(--pwa-radius-md);
    padding: 1.35rem 1.25rem;
    box-shadow: var(--pwa-shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pwa-step-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 159, 138, 0.35);
    box-shadow: 0 8px 24px -4px var(--pwa-primary-glow);
}

.pwa-step-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.pwa-step-num {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--pwa-primary), #10b981);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 3px 8px var(--pwa-primary-glow);
}

.pwa-step-icon {
    font-size: 1.25rem;
    color: var(--pwa-text-muted);
}

.pwa-step-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--pwa-text-main);
}

.pwa-step-text {
    font-size: 0.88rem;
    color: var(--pwa-text-sub);
    line-height: 1.6;
    margin-bottom: 0;
}

.pwa-step-text strong {
    color: var(--pwa-primary);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Benefits Section - 4-item Minimal Grid
   ═══════════════════════════════════════════════════════════════════════════ */
.pwa-benefits-section {
    margin-bottom: 2.25rem;
}

.pwa-benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
}

.pwa-benefit-card {
    background: var(--pwa-card-bg);
    border: 1px solid var(--pwa-card-border);
    border-radius: var(--pwa-radius-md);
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--pwa-shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.pwa-benefit-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 159, 138, 0.3);
}

.pwa-benefit-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--pwa-primary-light);
    color: var(--pwa-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.pwa-benefit-content h4 {
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--pwa-text-main);
}

.pwa-benefit-content p {
    font-size: 0.84rem;
    color: var(--pwa-text-sub);
    line-height: 1.5;
    margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FAQ Section - Minimal Accordion
   ═══════════════════════════════════════════════════════════════════════════ */
.pwa-faq-section {
    margin-bottom: 1.5rem;
}

.pwa-faq-list {
    max-width: 740px;
    margin: 0 auto;
}

.pwa-faq-item {
    background: var(--pwa-card-bg);
    border: 1px solid var(--pwa-card-border);
    border-radius: 12px;
    margin-bottom: 0.65rem;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.pwa-faq-item:hover,
.pwa-faq-item.open {
    border-color: rgba(15, 159, 138, 0.35);
}

.pwa-faq-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.95rem 1.25rem;
    background: transparent;
    border: none;
    text-align: right;
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--pwa-text-main);
    cursor: pointer;
    transition: color 0.2s ease;
}

.pwa-faq-trigger:hover {
    color: var(--pwa-primary);
}

.pwa-faq-trigger i.chevron-icon {
    font-size: 0.82rem;
    transition: transform 0.25s ease;
    color: var(--pwa-text-muted);
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.pwa-faq-item.open .pwa-faq-trigger i.chevron-icon {
    transform: rotate(180deg);
    color: var(--pwa-primary);
}

.pwa-faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1.25rem;
}

.pwa-faq-item.open .pwa-faq-content {
    max-height: 200px;
    padding-bottom: 1rem;
}

.pwa-faq-content p {
    font-size: 0.88rem;
    color: var(--pwa-text-sub);
    line-height: 1.65;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Meticulous Responsive Breakpoints (Tablet & Mobile)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Tablet (Portrait & Landscape: 601px - 900px) */
@media (max-width: 900px) {
    .pwa-container {
        padding-inline: 1rem;
    }
    .pwa-hero-card {
        padding: 2rem 1.5rem;
    }
    .pwa-hero-title {
        font-size: 1.5rem;
    }
    .pwa-steps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    .pwa-step-card {
        padding: 1.15rem 1rem;
    }
    .pwa-step-title {
        font-size: 0.98rem;
    }
    .pwa-step-text {
        font-size: 0.84rem;
    }
}

/* Mobile & Phablet (<= 640px) */
@media (max-width: 640px) {
    .pwa-install-page {
        padding-top: 0.5rem;
        padding-bottom: 3rem;
    }
    .pwa-hero-card {
        padding: 1.75rem 1rem 1.35rem;
        border-radius: 18px;
        margin-bottom: 1.5rem;
    }
    .pwa-app-icon-wrap {
        width: 70px;
        height: 70px;
        margin-bottom: 0.85rem;
    }
    .pwa-hero-title {
        font-size: 1.35rem;
    }
    .pwa-hero-subtitle {
        font-size: 0.88rem;
        margin-bottom: 1rem;
    }
    .pwa-device-pill {
        width: 100%;
        justify-content: center;
        font-size: 0.8rem;
        padding: 0.35rem 0.75rem;
        margin-bottom: 1.25rem;
    }
    .pwa-cta-group {
        flex-direction: column;
        width: 100%;
        gap: 0.6rem;
        margin-bottom: 1.25rem;
    }
    .btn-pwa-primary,
    .btn-pwa-secondary {
        width: 100%;
        justify-content: center;
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }
    .pwa-highlights-row {
        gap: 0.4rem;
        padding-top: 1rem;
    }
    .pwa-highlight-chip {
        font-size: 0.76rem;
        padding: 0.3rem 0.6rem;
    }

    /* Tabs Nav on Mobile */
    .pwa-tabs-nav-container {
        width: 100%;
    }
    .pwa-tabs-nav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.25rem;
        padding: 0.25rem;
        border-radius: 12px;
    }
    .pwa-tab-item {
        padding: 0.55rem 0.3rem;
        font-size: 0.78rem;
        gap: 0.3rem;
        border-radius: 8px;
    }
    .pwa-tab-item i {
        font-size: 0.85rem;
    }

    /* Steps Grid on Mobile: Vertical Stack with clean touch-friendly layout */
    .pwa-steps-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .pwa-step-card {
        padding: 1.15rem 1.15rem;
        border-radius: 14px;
    }
    .pwa-step-indicator {
        margin-bottom: 0.5rem;
    }
    .pwa-step-num {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    .pwa-step-title {
        font-size: 0.98rem;
    }
    .pwa-step-text {
        font-size: 0.85rem;
    }

    /* Benefits on Mobile: 1 Column */
    .pwa-benefits-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }
    .pwa-benefit-card {
        padding: 0.95rem 1rem;
        border-radius: 12px;
    }
    .pwa-benefit-icon {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
        border-radius: 10px;
    }
    .pwa-benefit-content h4 {
        font-size: 0.92rem;
    }
    .pwa-benefit-content p {
        font-size: 0.8rem;
    }

    /* FAQ on Mobile */
    .pwa-faq-trigger {
        padding: 0.85rem 1rem;
        font-size: 0.88rem;
    }
    .pwa-faq-content {
        padding: 0 1rem;
    }
    .pwa-faq-item.open .pwa-faq-content {
        padding-bottom: 0.85rem;
    }
    .pwa-faq-content p {
        font-size: 0.82rem;
    }
}
