/* ================================
   PWA Install Banner Styles
   ================================ */

/* Banner container */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-white, #ffffff);
    border-top: 1px solid var(--color-gray-200, #e5e5e5);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 9998;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

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

.pwa-install-banner.hidden {
    display: none;
}

/* Content section */
.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.pwa-install-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #A981BB 0%, #8B6BA3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-install-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pwa-install-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.pwa-install-text strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-gray-900, #1a1a1a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-install-text span {
    font-size: 13px;
    color: var(--color-gray-500, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Actions section */
.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-install-btn {
    background: linear-gradient(135deg, #A981BB 0%, #8B6BA3 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 24px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.pwa-install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(169, 129, 187, 0.4);
}

.pwa-install-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(169, 129, 187, 0.3);
}

.pwa-install-dismiss {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--color-gray-400, #9ca3af);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.pwa-install-dismiss:hover {
    background: var(--color-gray-100, #f3f4f6);
    color: var(--color-gray-600, #4b5563);
}

/* ================================
   PWA Instructions Modal
   ================================ */

/* Instructions container */
.pwa-instructions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 0;
    text-align: left;
}

/* Step item */
.pwa-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--color-gray-700, #374151);
    line-height: 1.4;
}

/* Step number badge */
.pwa-step-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #A981BB 0%, #8B6BA3 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Step content with icon */
.pwa-step-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

/* Icon in step */
.pwa-icon {
    flex-shrink: 0;
}

/* Warning box for unsupported browsers */
.pwa-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 12px;
    margin: 12px 0;
}

.pwa-warning-icon {
    flex-shrink: 0;
}

.pwa-warning p {
    margin: 0;
    font-size: 14px;
    color: var(--color-gray-700, #374151);
    line-height: 1.5;
}

/* Alternative text */
.pwa-alternative-text {
    font-size: 14px;
    color: var(--color-gray-600, #4b5563);
    text-align: center;
    margin: 8px 0 0 0;
    font-weight: 500;
}

/* Button variants */
.rival-modal-button-primary {
    background: linear-gradient(135deg, #A981BB 0%, #8B6BA3 100%);
    color: white;
    margin-bottom: 8px;
}

.rival-modal-button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(169, 129, 187, 0.4);
}

.rival-modal-button-secondary {
    background: transparent;
    color: var(--color-gray-600, #4b5563);
    border: 1px solid var(--color-gray-300, #d1d5db);
}

.rival-modal-button-secondary:hover {
    background: var(--color-gray-100, #f3f4f6);
}

/* Legacy iOS styles (for compatibility) */
.pwa-ios-instructions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 0;
    text-align: left;
}

.pwa-ios-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--color-gray-700, #374151);
    line-height: 1.4;
}

.pwa-ios-step-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #A981BB 0%, #8B6BA3 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.pwa-ios-step svg {
    flex-shrink: 0;
    margin-left: auto;
}

/* ================================
   Responsive
   ================================ */

@media (max-width: 480px) {
    .pwa-install-banner {
        flex-direction: column;
        padding: 16px;
        gap: 16px;
    }

    .pwa-install-content {
        width: 100%;
    }

    .pwa-install-actions {
        width: 100%;
        justify-content: space-between;
    }

    .pwa-install-btn {
        flex: 1;
        text-align: center;
    }
}

/* Safe area for iPhone X+ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .pwa-install-banner {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    @media (max-width: 480px) {
        .pwa-install-banner {
            padding-bottom: calc(16px + env(safe-area-inset-bottom));
        }
    }
}
