/* PWA Install Banner & iOS Modal Styles */
.pwa-install-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    width: calc(100% - 32px);
    max-width: 480px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 14px 16px;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.pwa-install-banner.pwa-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.pwa-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.pwa-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
    flex-shrink: 0;
}

.pwa-banner-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pwa-banner-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-subtitle {
    font-size: 12px;
    color: #64748b;
    margin: 2px 0 0 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.pwa-install-btn {
    background: linear-gradient(135deg, #3874ff 0%, #1e56d6 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 8px rgba(56, 116, 255, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.pwa-install-btn:active {
    transform: scale(0.96);
    box-shadow: 0 1px 4px rgba(56, 116, 255, 0.3);
}

.pwa-dismiss-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.15s ease, background 0.15s ease;
    line-height: 1;
}

.pwa-dismiss-btn:hover {
    color: #475569;
    background: #f1f5f9;
}

/* iOS Safari Bottom Guide Modal */
.pwa-ios-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.pwa-ios-modal.pwa-ios-open {
    opacity: 1;
    pointer-events: auto;
}

.pwa-ios-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 500px;
    border-radius: 24px 24px 0 0;
    padding: 24px 20px 28px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.pwa-ios-modal.pwa-ios-open .pwa-ios-modal-content {
    transform: translateY(0);
}

.pwa-ios-handle {
    width: 40px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
    margin: 0 auto 16px;
}

.pwa-ios-header {
    text-align: center;
    margin-bottom: 20px;
}

.pwa-ios-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.pwa-ios-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.pwa-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.pwa-ios-step {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
}

.pwa-ios-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #3874ff;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-ios-step-text {
    font-size: 13.5px;
    color: #334155;
    line-height: 1.4;
    margin: 0;
    flex: 1;
}

.pwa-ios-step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #0f172a;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 600;
    margin: 0 2px;
}

.pwa-ios-close-btn {
    width: 100%;
    background: #f1f5f9;
    color: #334155;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.pwa-ios-close-btn:hover {
    background: #e2e8f0;
}

/* Dark mode compatibility if theme switched */
[data-bs-theme="dark"] .pwa-install-banner,
.dark .pwa-install-banner {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .pwa-banner-title,
.dark .pwa-banner-title {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .pwa-banner-subtitle,
.dark .pwa-banner-subtitle {
    color: #94a3b8;
}

[data-bs-theme="dark"] .pwa-ios-modal-content,
.dark .pwa-ios-modal-content {
    background: #1e293b;
}

[data-bs-theme="dark"] .pwa-ios-title,
.dark .pwa-ios-title {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .pwa-ios-subtitle,
.dark .pwa-ios-subtitle {
    color: #94a3b8;
}

[data-bs-theme="dark"] .pwa-ios-step,
.dark .pwa-ios-step {
    background: #0f172a;
    border-color: #334155;
}

[data-bs-theme="dark"] .pwa-ios-step-text,
.dark .pwa-ios-step-text {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .pwa-ios-step-icon,
.dark .pwa-ios-step-icon {
    background: #334155;
    color: #f8fafc;
}

[data-bs-theme="dark"] .pwa-ios-close-btn,
.dark .pwa-ios-close-btn {
    background: #334155;
    color: #f8fafc;
}

/* Hide on Desktop / PC screens */
@media (min-width: 992px) {
    .pwa-install-banner,
    .pwa-ios-modal {
        display: none !important;
    }
}

