/**
 * ASB PWA Engine - the /app install page (templates/pwa-install-page.php).
 *
 * Static rules only. The five values an administrator can change arrive as
 * custom properties on :root, added with wp_add_inline_style():
 *   --asbpwae-ip-bg / --asbpwae-ip-text / --asbpwae-ip-btn-bg /
 *   --asbpwae-ip-btn-text / --asbpwae-ip-btn-radius
 * The fallbacks below are the plugin defaults.
 */
html, body { margin: 0; padding: 0; background-color: var(--asbpwae-ip-bg, #FFFFFF); }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; color: var(--asbpwae-ip-text, #333333); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.pwa-install-container { max-width: 600px; margin: 40px auto; padding: 40px; text-align: center; }
.pwa-install-container h1, .pwa-install-container h3, .pwa-install-container p { color: inherit; }
.pwa-install-container a { color: var(--asbpwae-ip-btn-bg, #000000); }
.pwa-app-icon { width: 120px; height: 120px; border-radius: 20px; margin: 20px auto; display: block; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.pwa-install-button {
    background: var(--asbpwae-ip-btn-bg, #000000) !important;
    color: var(--asbpwae-ip-btn-text, #FFFFFF) !important;
    border-radius: var(--asbpwae-ip-btn-radius, 8px);
    border: none; padding: 12px 24px; font-size: 16px; font-weight: 600; cursor: pointer; margin: 20px 0; display: inline-block; text-decoration: none !important; transition: filter 0.2s ease;
}
.pwa-install-button:hover {
    filter: brightness(90%);
    color: var(--asbpwae-ip-btn-text, #FFFFFF) !important;
}
.pwa-install-button:visited {
    color: var(--asbpwae-ip-btn-text, #FFFFFF) !important;
}
.pwa-device-section { margin: 30px 0; padding: 20px; background: rgba(0,0,0,0.05); border-radius: 10px; }
.pwa-device-section h3 { margin-top: 0; margin-bottom: 8px; }
.pwa-device-section p { margin-top: 0; opacity: 0.8; }
.hidden { display: none; }
#asbpwae-install-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 999999; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; display: flex; align-items: center; justify-content: center; }
#asbpwae-install-modal.visible { opacity: 1; visibility: visible; }
.asbpwae-modal-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); }
.asbpwae-modal-content { position: relative; background: white; border-radius: 12px; padding: 20px; width: min(90vw, 380px); max-height: 85vh; transform: scale(0.9); transition: transform 0.3s ease; display: flex; flex-direction: column; box-sizing: border-box; overflow: hidden; }
#asbpwae-install-modal.visible .asbpwae-modal-content { transform: scale(1); }
#asbpwae-modal-close-btn { position: absolute; top: 8px; right: 8px; font-size: 24px; background: transparent; border: none; color: #999; cursor: pointer; z-index: 20; padding: 8px; line-height: 1; border-radius: 50%; transition: all 0.2s ease; }
#asbpwae-modal-close-btn:hover { background: #f0f0f0; color: #666; }
.asbpwae-modal-content h3 { margin: 0 0 15px 0; flex-shrink: 0; font-size: 18px; padding-right: 30px; text-align: center; font-weight: 600; color: #333; }
.asbpwae-modal-slider-container { flex: 1 1 auto; min-height: 0; position: relative; display: flex; align-items: center; margin-bottom: 15px; }
.asbpwae-modal-slider-wrapper { position: relative; overflow: hidden; width: 100%; height: 100%; border-radius: 8px; }
.asbpwae-modal-slider { display: flex; transition: transform 0.3s ease-in-out; height: 100%; width: 100%; }
.asbpwae-modal-slide { flex: 0 0 100%; box-sizing: border-box; padding: 0 10px; display: flex; flex-direction: column; height: 100%; justify-content: flex-start; align-items: center; }
.asbpwae-modal-slide-img-wrapper { flex: 1 1 auto; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; max-height: calc(100% - 60px); }
.asbpwae-modal-slide img { max-width: 95%; max-height: 95%; width: auto; height: auto; object-fit: contain; border-radius: 8px; box-shadow: 0 3px 15px rgba(0,0,0,0.2); }
.asbpwae-modal-slide p { flex-shrink: 0; font-size: 14px; line-height: 1.4; margin: 0; text-align: center; color: #444; padding: 0 5px; max-height: 70px; overflow-y: auto; }
.asbpwae-modal-slide.no-image { justify-content: center; text-align: center; }
.asbpwae-modal-slide.no-image p { max-height: 100%; }
.asbpwae-slider-nav { position: absolute; top: 50%; transform: translateY(-50%); background: var(--asb-pwa-nav-bg-color, rgba(0,0,0,0.6)); color: var(--asb-pwa-nav-color, white); border: none; border-radius: var(--asb-pwa-nav-border-radius, 50%); width: 32px; height: 32px; font-size: 16px; cursor: pointer; z-index: 15; display: flex; align-items: center; justify-content: center; line-height: 1; padding: 0; transition: all 0.2s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.asbpwae-slider-nav:hover { background: var(--asb-pwa-nav-bg-color, rgba(0,0,0,0.8)); transform: translateY(-50%) scale(1.1); }
.asbpwae-slider-nav.prev { left: -16px; }
.asbpwae-slider-nav.next { right: -16px; }
.asbpwae-modal-dots { flex-shrink: 0; text-align: center; margin: 0; padding: 10px 0 0 0; }
.asbpwae-modal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #ddd; margin: 0 6px; cursor: pointer; transition: all 0.3s ease; border: 2px solid transparent; }
.asbpwae-modal-dot.active { background: var(--asbpwae-ip-btn-bg, #000000); transform: scale(1.2); }
.asbpwae-modal-dot:hover { background: #999; }

/* v2.5.0: PWA merits ("Why install?") section */
.pwa-merits {
    margin: 30px 0 10px 0;
    padding: 24px 22px;
    background: rgba(0,0,0,0.04);
    border-radius: 14px;
    text-align: left;
}
.pwa-merits-title {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    color: inherit;
}
.pwa-merits-image {
    display: block;
    margin: 0 auto 18px auto;
    max-width: 100%;
    max-height: 200px;
    height: auto;
    border-radius: 10px;
}
.pwa-merits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pwa-merits-list li {
    position: relative;
    padding: 8px 0 8px 32px;
    font-size: 14px;
    line-height: 1.55;
    color: inherit;
}
.pwa-merits-list li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 14px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--asbpwae-ip-btn-bg, #000000);
    opacity: 0.85;
    box-shadow: inset 0 0 0 3px var(--asbpwae-ip-bg, #FFFFFF);
}
.pwa-merits-list li strong { font-weight: 600; }
.pwa-merits-custom { font-size: 14px; line-height: 1.6; }
.pwa-merits-custom p { margin: 0 0 10px 0; }
