/* Minimal PWA notification styling for Omega Asia.
   Keep this file scoped to PWA-owned elements only. Avoid broad ERP
   interface overrides because they can distort the mobile layout. */
:root {
    --web-pwa-safe-top: env(safe-area-inset-top, 0px);
    --web-pwa-safe-right: env(safe-area-inset-right, 0px);
    --web-pwa-safe-bottom: env(safe-area-inset-bottom, 0px);
    --web-pwa-safe-left: env(safe-area-inset-left, 0px);
    --web-pwa-primary: #2e69b5;
    --web-pwa-primary-dark: #1f4f8f;
    --web-pwa-surface: #ffffff;
    --web-pwa-border: rgba(22, 34, 51, 0.14);
    --web-pwa-shadow: 0 16px 44px rgba(10, 31, 68, 0.22);
}

.o_web_pwa_push_systray > a.o_web_pwa_push_toggle {
    min-width: 40px;
    text-align: center;
}

.o_web_pwa_push_systray > a.o_web_pwa_push_toggle.o_web_pwa_push_active {
    color: #ffffff;
}

.o_web_pwa_push_prompt {
    position: fixed;
    left: max(12px, var(--web-pwa-safe-left));
    right: max(12px, var(--web-pwa-safe-right));
    bottom: max(12px, var(--web-pwa-safe-bottom));
    z-index: 1080;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--web-pwa-border);
    border-radius: 16px;
    background: var(--web-pwa-surface);
    box-shadow: var(--web-pwa-shadow);
    color: #172b4d;
    box-sizing: border-box;
}

.o_web_pwa_push_prompt_icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--web-pwa-primary), var(--web-pwa-primary-dark));
}

.o_web_pwa_push_prompt_body {
    min-width: 0;
    flex: 1 1 auto;
}

.o_web_pwa_push_prompt_title {
    font-size: 14px;
    line-height: 1.25;
    font-weight: 700;
    margin-bottom: 3px;
}

.o_web_pwa_push_prompt_text {
    font-size: 12px;
    line-height: 1.35;
    color: #4b5f76;
}

.o_web_pwa_push_prompt_actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.o_web_pwa_push_prompt_primary,
.o_web_pwa_push_prompt_close {
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.o_web_pwa_push_prompt_primary {
    min-height: 34px;
    padding: 0 13px;
    background: linear-gradient(135deg, var(--web-pwa-primary), var(--web-pwa-primary-dark));
    color: #ffffff;
}

.o_web_pwa_push_prompt_primary:disabled {
    cursor: wait;
    opacity: 0.65;
}

.o_web_pwa_push_prompt_close {
    width: 34px;
    height: 34px;
    background: #f3f6fa;
    color: #607086;
    font-size: 18px;
    line-height: 1;
}

@media (min-width: 768px) {
    .o_web_pwa_push_prompt {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .o_web_pwa_push_prompt {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        width: auto;
        max-height: min(42vh, 260px);
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    .o_web_pwa_push_prompt_title,
    .o_web_pwa_push_prompt_text {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 390px) {
    .o_web_pwa_push_prompt {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        align-items: flex-start;
    }

    .o_web_pwa_push_prompt_icon {
        display: none;
    }

    .o_web_pwa_push_prompt_actions {
        width: 100%;
        justify-content: stretch;
    }

    .o_web_pwa_push_prompt_primary {
        flex: 1 1 auto;
        min-width: 0;
    }
}
