/**
 * Light & Composition - PWA Stylesheet
 * Version: 1.0.0
 * 
 * In-flow install prompt cards and chat-safe layout rules.
 */

.lc-pwa-install-card {
    display: block; /* Displayed in browser view; hidden in standalone PWA or when dismissed */
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 18px 22px;
    margin: 0 0 28px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    color: #ffffff;
    position: relative;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lc-pwa-install-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.lc-pwa-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.lc-pwa-card-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 260px;
}

.lc-pwa-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.lc-pwa-card-icon img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: block;
}

.lc-pwa-card-content {
    flex: 1;
}

.lc-pwa-card-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #f59e0b;
    margin-bottom: 2px;
}

.lc-pwa-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 3px 0;
    line-height: 1.25;
}

.lc-pwa-card-desc {
    font-size: 13px;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.4;
}

.lc-pwa-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.lc-pwa-btn-install {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #d4af37;
    color: #0f172a;
    font-size: 13.5px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
}

.lc-pwa-btn-install:hover {
    background: #e5c158;
    color: #0f172a;
    transform: translateY(-1px);
    text-decoration: none;
}

.lc-pwa-btn-dismiss {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 12.5px;
    font-weight: 600;
    padding: 9px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.lc-pwa-btn-dismiss:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

/* ── Site-Wide PWA Install Banner (Chat Safe Zone: fixed bottom-left) ── */
.lc-install-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    max-width: 380px;
    z-index: 99990; /* safe from bottom-right chat */
    background: #0f172a;
    color: #f8fafc;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: lcBannerSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.lc-install-banner[hidden] {
    display: none !important;
}

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

.lc-install-banner__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lc-install-banner__text {
    flex: 1;
    min-width: 0;
}

.lc-install-banner__text strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
}

.lc-install-banner__text p {
    margin: 2px 0 0;
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.35;
}

.lc-install-banner__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.lc-install-banner__install {
    background: #0284c7;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
}

.lc-install-banner__install:hover {
    background: #0369a1;
}

.lc-install-banner__dismiss {
    background: transparent;
    color: #94a3b8;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
}

.lc-install-banner__dismiss:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* ── Adaptive PWA Modal (Apple, Chrome & Android) ── */
.lc-pwa-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 16px;
    animation: lcModalFadeIn 0.2s ease-out;
}

.lc-pwa-modal-backdrop[hidden] {
    display: none !important;
}

@keyframes lcModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lc-pwa-modal-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 540px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    color: #1e293b;
    box-sizing: border-box;
}

.lc-pwa-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.lc-pwa-modal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lc-pwa-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lc-pwa-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.25;
}

.lc-pwa-modal-sub {
    font-size: 12px;
    color: #64748b;
    display: block;
    margin-top: 2px;
}

.lc-pwa-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.lc-pwa-modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.lc-pwa-platform-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.lc-pwa-platform-tab {
    flex: 1;
    padding: 7px 10px;
    background: transparent;
    border: none;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
    transition: all 0.15s ease;
}

.lc-pwa-platform-tab:hover {
    color: #0f172a;
}

.lc-pwa-platform-tab.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.lc-pwa-steps-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
}

.lc-pwa-platform-guide[hidden] {
    display: none !important;
}

.lc-pwa-step-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lc-pwa-step-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
}

.lc-pwa-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0f172a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Menu diagram for Mac Safari */
.lc-pwa-menu-diagram {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-bottom: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 11.5px;
}

.lc-pwa-menu-bar-top {
    background: #f1f5f9;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
}

.lc-pwa-menu-item.is-active {
    font-weight: 700;
    color: #0f172a;
}

.lc-pwa-menu-dropdown {
    padding: 6px 0;
}

.lc-pwa-dd-row {
    padding: 5px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #64748b;
}

.lc-pwa-dd-row.is-target {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
}

.lc-pwa-dd-badge {
    font-size: 11px;
    color: #2563eb;
    font-weight: 700;
}

/* Chrome Omnibox Diagram */
.lc-pwa-chrome-diagram {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 14px;
}

.lc-pwa-chrome-omnibox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f5f9;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
}

.lc-pwa-chrome-url {
    color: #475569;
    font-family: monospace;
}

.lc-pwa-chrome-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #0071e3;
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Native Box */
.lc-pwa-native-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 12px 14px;
}

.lc-pwa-native-box[hidden] {
    display: none !important;
}

.lc-pwa-native-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #16a34a;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.lc-pwa-native-btn:hover {
    background: #15803d;
}

/* Instant Unlock Box */
.lc-pwa-instant-unlock {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.lc-pwa-instant-unlock-tag {
    font-size: 11px;
    font-weight: 700;
    color: #0284c7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.lc-pwa-instant-unlock p {
    margin: 0;
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.35;
}

.lc-pwa-instant-unlock-btn {
    background: transparent;
    color: #0284c7;
    border: 1px solid #bae6fd;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.lc-pwa-instant-unlock-btn:hover {
    background: #f0f9ff;
    border-color: #0284c7;
}

.lc-pwa-modal-footer {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11px;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
}

.lc-pwa-perk {
    font-weight: 600;
    color: #166534;
}

@media (max-width: 640px) {
    .lc-pwa-install-card {
        padding: 16px;
        margin-bottom: 20px;
    }
    .lc-pwa-card-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .lc-pwa-card-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .lc-pwa-btn-install {
        flex: 1;
        justify-content: center;
    }
    .lc-install-banner {
        left: 12px;
        right: 12px;
        bottom: 80px; /* clear bottom navigation */
        max-width: none;
    }
    .lc-pwa-platform-tabs {
        flex-wrap: wrap;
    }
}
