/* ============================================================================
 * pwa-install.css — Batch 4.7
 *
 * Styles for the install banner and iOS instructions modal.
 * Imported by any page that uses pwa-install.js.
 * ============================================================================ */

/* ============================================================
 * Install banner (bottom of screen, slides up)
 * ============================================================ */

.pwa-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));

    background: linear-gradient(135deg,
        rgba(10, 22, 40, 0.97) 0%,
        rgba(15, 32, 58, 0.97) 100%);
    border-top: 1px solid rgba(251, 191, 36, 0.20);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    display: flex;
    align-items: center;
    gap: 12px;

    transform: translateY(110%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
}

.pwa-banner--visible {
    transform: translateY(0);
}

.pwa-banner__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pwa-banner__icon img {
    width: 100%;
    height: 100%;
    display: block;
}

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

.pwa-banner__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 2px;
}

.pwa-banner__subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pwa-banner__install {
    flex-shrink: 0;
    padding: 10px 18px;
    background: linear-gradient(135deg,
        rgba(251, 191, 36, 1) 0%,
        rgba(245, 158, 11, 1) 100%);
    color: #1a1408;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
    white-space: nowrap;
}

.pwa-banner__install:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

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

.pwa-banner__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.4rem;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.12s, background 0.12s;
    padding: 0;
}

.pwa-banner__close:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
}

/* Tablet+ refinement */
@media (min-width: 720px) {
    .pwa-banner {
        left: auto;
        right: 24px;
        bottom: 24px;
        max-width: 420px;
        border-radius: 16px;
        border: 1px solid rgba(251, 191, 36, 0.25);
        padding: 14px 16px;
        transform: translateY(calc(100% + 32px));
    }
    .pwa-banner--visible {
        transform: translateY(0);
    }
}

/* ============================================================
 * iOS instructions modal
 * ============================================================ */

.pwa-ios-modal {
    position: fixed;
    inset: 0;
    z-index: 9100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.24s ease;
}

.pwa-ios-modal--visible {
    opacity: 1;
}

.pwa-ios-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.pwa-ios-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, #0f203a 0%, #0a1628 100%);
    border-radius: 24px 24px 0 0;
    border-top: 1px solid rgba(251, 191, 36, 0.20);
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.6);

    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-ios-modal--visible .pwa-ios-modal__dialog {
    transform: translateY(0);
}

@media (min-width: 600px) {
    .pwa-ios-modal {
        align-items: center;
    }
    .pwa-ios-modal__dialog {
        border-radius: 24px;
        margin: 0 16px;
    }
}

.pwa-ios-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    font-family: inherit;
    padding: 0;
    transition: background 0.12s, color 0.12s;
}

.pwa-ios-modal__close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.pwa-ios-modal__icon {
    text-align: center;
    margin-bottom: 16px;
}

.pwa-ios-modal__icon img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.pwa-ios-modal__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin: 0 0 8px;
    line-height: 1.3;
}

.pwa-ios-modal__intro {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.925rem;
    margin: 0 0 20px;
}

.pwa-ios-modal__steps {
    list-style: none;
    counter-reset: pwa-step;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pwa-ios-modal__steps li {
    counter-increment: pwa-step;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    position: relative;
}

.pwa-ios-modal__steps li::before {
    content: counter(pwa-step);
    position: absolute;
    top: -8px;
    left: -8px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, rgba(251,191,36,1), rgba(245,158,11,1));
    color: #1a1408;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(251, 191, 36, 0.3);
}

.pwa-ios-modal__step-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(125, 211, 252, 0.12);
    color: rgba(125, 211, 252, 1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.pwa-ios-modal__steps li span:last-child {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.925rem;
    line-height: 1.4;
}

.pwa-ios-modal__note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    margin: 0 0 20px;
    line-height: 1.4;
}

.pwa-ios-modal__got-it {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg,
        rgba(251, 191, 36, 1) 0%,
        rgba(245, 158, 11, 1) 100%);
    color: #1a1408;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
}

.pwa-ios-modal__got-it:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.4);
}

.pwa-ios-modal__got-it:active {
    transform: translateY(0);
}
