/**
 * App Detection and Install Prompt Styles
 * Responsive design for device-specific install prompts
 */

/* Permanent footer install link */
.edirectz-install-link[hidden] {
    display: none;
}

.edirectz-install-link {
    color: var(--primary-color, #4f46e5);
    font-weight: 600;
}

.edirectz-install-link:hover {
    color: var(--primary-hover, #4338ca);
}

/* Install Prompt Container */
.edirectz-install-prompt {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    box-shadow: 0 -4px 20px rgba(79, 70, 229, 0.3);
    z-index: 10000;
    transform: translateY(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.edirectz-install-prompt.dismissing {
    transform: translateY(100%);
    opacity: 0;
}

/* Install Prompt Content */
.install-prompt-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Install Prompt Icon */
.install-prompt-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.install-prompt-icon svg {
    width: 28px;
    height: 28px;
}

/* Install Prompt Text */
.install-prompt-text {
    flex: 1;
    min-width: 0;
}

.install-prompt-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.install-prompt-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Install Prompt Actions */
.install-prompt-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.install-prompt-dismiss {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.install-prompt-dismiss:hover {
    background: rgba(255, 255, 255, 0.2);
}

.install-prompt-dismiss svg {
    width: 18px;
    height: 18px;
}

.install-prompt-install {
    padding: 0.625rem 1.25rem;
    background: white;
    color: #4f46e5;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.install-prompt-install:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.install-prompt-install:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .install-prompt-content {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }

    .install-prompt-icon {
        width: 40px;
        height: 40px;
    }

    .install-prompt-icon svg {
        width: 24px;
        height: 24px;
    }

    .install-prompt-title {
        font-size: 0.9375rem;
    }

    .install-prompt-description {
        font-size: 0.8125rem;
    }

    .install-prompt-dismiss {
        width: 32px;
        height: 32px;
    }

    .install-prompt-dismiss svg {
        width: 16px;
        height: 16px;
    }

    .install-prompt-install {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .install-prompt-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .install-prompt-text {
        width: 100%;
    }

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

    .install-prompt-install {
        flex: 1;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .edirectz-install-prompt {
    background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
}

/* Animation States */
.edirectz-install-prompt[data-device="android"] .install-prompt-icon {
    background: rgba(255, 255, 255, 0.2);
}

.edirectz-install-prompt[data-device="ios"] .install-prompt-icon {
    background: rgba(255, 255, 255, 0.2);
}

.edirectz-install-prompt[data-device="desktop"] .install-prompt-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* Focus States for Accessibility */
.install-prompt-dismiss:focus-visible,
.install-prompt-install:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .edirectz-install-prompt {
        animation: none;
        transition: none;
    }

    .install-prompt-install:hover {
        transform: none;
    }
}