/* Smart App Banner Variables */
:root {
    --sab-bg-color: rgba(0, 82, 212, 0.95);
    /* Deep Blue with opacity */
    --sab-text-color: #ffffff;
    --sab-accent-color: #FFD700;
    /* Gold */
    --sab-height: 80px;
    --sab-z-index: 2147483647;
}

/* Banner Container (Android) */
#smart-app-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--sab-height);
    background: var(--sab-bg-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: var(--sab-z-index);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
    font-family: 'Rubik', sans-serif;
    box-sizing: border-box;
}

#smart-app-banner.hidden {
    transform: translateY(-100%);
}

#smart-app-banner .sab-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
    padding: 0 10px 0 0;
    line-height: 1;
}

#smart-app-banner .sab-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
    overflow: hidden;
}

#smart-app-banner .sab-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-right: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

#smart-app-banner .sab-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#smart-app-banner .sab-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--sab-text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#smart-app-banner .sab-author {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#smart-app-banner .sab-action {
    background: var(--sab-accent-color);
    color: #000;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    margin-left: 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* iOS PWA Prompt (Modal) */
#ios-pwa-prompt {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px 20px 40px;
    background: rgba(255, 255, 255, 0.98);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: var(--sab-z-index);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    color: #333;
}

#ios-pwa-prompt.visible {
    transform: translateY(0);
}

#ios-pwa-prompt .pwa-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

#ios-pwa-prompt .pwa-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    margin-right: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#ios-pwa-prompt .pwa-title {
    font-size: 18px;
    font-weight: 600;
    text-align: left;
}

#ios-pwa-prompt .pwa-subtitle {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

#ios-pwa-prompt .pwa-instructions {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 25px;
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

#ios-pwa-prompt .pwa-step {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

#ios-pwa-prompt .pwa-step-icon {
    font-size: 24px;
    margin-right: 12px;
    color: #007AFF;
    /* iOS Blue */
}

#ios-pwa-prompt .pwa-close {
    display: block;
    width: 100%;
    padding: 12px;
    background: #f2f2f7;
    color: #007AFF;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
}

/* Adjust Body if Banner is Present */
body.has-smart-banner {
    padding-top: var(--sab-height);
}