/* bottom-info-bar.css */
/* 合併 PWA 安裝提示 + 分潤說明。
   App 模式只顯示分潤提醒；一般瀏覽器顯示安裝提醒 + 分潤提醒。
   保留 id="pwaInstallTip" / pwaInstallBtn / pwaInstallDismissBtn，搭配新版 pwa-install.js。 */

.bottom-info-bar {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 99990;

    max-width: 720px;
    margin: 0 auto;
    padding: 10px 12px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    border-radius: 18px;
    border: 1px solid #c7d2fe;
    background: rgba(238, 242, 255, 0.98);
    color: #312e81;

    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;

    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(10px);
}

.bottom-info-bar.affiliate-only {
    border-color: #e5e7eb;
    background: rgba(255, 255, 255, 0.98);
    color: #374151;
}

.bottom-info-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bottom-info-bar .pwa-install-text {
    min-width: 0;
    color: #312e81;
    font-size: 13px;
    font-weight: 900;
}

.bottom-info-bar.affiliate-only .pwa-install-text {
    display: none;
}

.bottom-affiliate-note {
    color: #6b7280;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.55;
}

.bottom-affiliate-note summary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    list-style: none;
    color: #6b7280;
    font-weight: 850;
}

.bottom-affiliate-note summary::-webkit-details-marker {
    display: none;
}

.bottom-affiliate-note summary::after {
    content: "了解";
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #374151;
    font-size: 11px;
    font-weight: 900;
}

.bottom-info-bar.affiliate-only .bottom-affiliate-note summary::after {
    background: #f3f4f6;
}

.bottom-affiliate-note[open] summary::after {
    content: "收合";
}

.bottom-affiliate-note-body {
    margin-top: 6px;
    max-width: 520px;
    color: #4b5563;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.65;
}

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

.bottom-info-actions button,
.bottom-info-bar button {
    border: 0;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.bottom-info-bar .pwa-install-btn {
    background: #111827;
    color: #ffffff;
}

.bottom-info-bar .pwa-dismiss-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
}

.bottom-info-bar.affiliate-only .pwa-dismiss-btn {
    background: #f3f4f6;
    color: #374151;
}

@media (max-width: 768px) {
    .bottom-info-bar {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 9px 10px;
        border-radius: 16px;
        gap: 8px;
    }

    .bottom-info-main {
        gap: 3px;
    }

    .bottom-info-bar .pwa-install-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 12px;
    }

    .bottom-affiliate-note {
        font-size: 11px;
    }

    .bottom-affiliate-note-body {
        max-width: calc(100vw - 120px);
        font-size: 11px;
    }

    .bottom-info-actions {
        gap: 6px;
    }

    .bottom-info-actions button,
    .bottom-info-bar button {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 390px) {
    .bottom-info-bar {
        align-items: flex-start;
    }

    .bottom-info-bar .pwa-install-text {
        max-width: calc(100vw - 132px);
    }

    .bottom-affiliate-note-body {
        max-width: calc(100vw - 132px);
    }
}
