/*!
 * PC LAB Popup Campaigns - Frontend Styles
 * Copyright (C) 2026 PC LAB
 * License: GPL-2.0-or-later
 * Trademark notice: PC LAB branding and identifiers remain proprietary to PC LAB.
 */

.pclab-toast-notification {
    position: fixed;
    z-index: 99999;
    width: min(360px, calc(100vw - 32px));
    background: var(--pclab-bg, #14191f);
    color: var(--pclab-text, #ffffff);
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
    padding: 18px 18px 16px;
    font-family: inherit;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .28s ease, transform .28s ease;
}
.pclab-toast-notification.is-visible { opacity: 1; transform: translateY(0); }
.pclab-toast-bottom-right { right: 16px; bottom: 16px; }
.pclab-toast-bottom-left { left: 16px; bottom: 16px; }
.pclab-toast-layout-banner {
    width: min(760px, calc(100vw - 32px));
    padding: 18px 22px;
    border-radius: 20px;
    display: grid;
    grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}
.pclab-toast-layout-banner .pclab-toast-image-wrap {
    display: block;
    margin: 0;
}
.pclab-toast-layout-banner .pclab-toast-title {
    font-size: calc(var(--pclab-title-size, 16px) + 2px);
    margin-right: 48px;
}
.pclab-toast-layout-banner .pclab-toast-message {
    max-width: none;
}
.pclab-toast-layout-banner .pclab-toast-footer {
    align-items: center;
}
.pclab-toast-layout-banner .pclab-toast-image {
    min-height: 140px;
    border-radius: 16px;
}
.pclab-toast-layout-banner .pclab-toast-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.pclab-toast-layout-split {
    width: min(560px, calc(100vw - 32px));
    padding: 16px;
    border-radius: 22px;
    display: grid;
    grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}
.pclab-toast-layout-split .pclab-toast-close {
    top: 10px;
    right: 10px;
}
.pclab-toast-layout-split .pclab-toast-image-wrap {
    margin: 0;
    height: 100%;
}
.pclab-toast-layout-split .pclab-toast-image {
    height: 100%;
    min-height: 100%;
    border-radius: 16px;
}
.pclab-toast-layout-split .pclab-toast-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.pclab-toast-layout-card .pclab-toast-body,
.pclab-toast-layout-banner .pclab-toast-body {
    display: block;
    min-width: 0;
}
.pclab-toast-layout-split .pclab-toast-title {
    margin-top: 2px;
}
.pclab-toast-layout-split .pclab-toast-footer {
    margin-top: 8px;
}
.pclab-toast-title { font-size: var(--pclab-title-size, 16px); font-weight: 700; margin: 0 28px 8px 0; }
.pclab-toast-message { font-size: var(--pclab-message-size, 14px); margin: 0 0 14px; }
.pclab-toast-button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 10px; background: var(--pclab-btn-bg, #ffffff); color: var(--pclab-btn-text, #14191f); text-decoration: none; font-size: var(--pclab-button-size, 14px); font-weight: 600; }
.pclab-toast-button:hover,.pclab-toast-button:focus { opacity: 0.92; color: var(--pclab-btn-text, #14191f); text-decoration: none; }
.pclab-toast-interest { margin: 12px 0 4px; padding: 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 12px; background: rgba(255,255,255,.08); }
.pclab-toast-interest-label { font-size: 13px; font-weight: 700; margin: 0 0 10px; }
.pclab-toast-interest-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pclab-toast-interest-actions button { appearance: none; border: 1px solid rgba(255,255,255,.34); border-radius: 999px; background: rgba(255,255,255,.12); color: inherit; cursor: pointer; font: inherit; font-weight: 700; padding: 7px 14px; }
.pclab-toast-interest-actions button:hover,.pclab-toast-interest-actions button:focus { background: rgba(255,255,255,.2); }
.pclab-toast-interest-actions button:disabled { cursor: default; opacity: .65; }
.pclab-toast-interest-status { min-height: 18px; margin-top: 8px; font-size: 12px; opacity: .86; }
.pclab-toast-close { appearance: none; position: absolute; right: 10px; top: 8px; border: 0; background: transparent; color: var(--pclab-text, #ffffff); font-size: 24px; line-height: 1; padding: 4px; cursor: pointer; opacity: 0.8; }
.pclab-toast-close:hover,.pclab-toast-close:focus { opacity: 1; }
@media (max-width: 480px) {
    .pclab-toast-bottom-right,.pclab-toast-bottom-left { left: 12px; right: 12px; bottom: 12px; width: auto; }
    .pclab-toast-layout-banner,
    .pclab-toast-layout-split {
        width: auto;
    }
    .pclab-toast-layout-banner,
    .pclab-toast-layout-split {
        grid-template-columns: 1fr;
    }
}

.pclab-toast-image-wrap { margin: 0 0 12px; position: relative; overflow: hidden; border-radius: 12px; }
.pclab-toast-image { display: block; width: 100%; aspect-ratio: 1 / 1; height: auto; max-height: none; object-fit: cover; border-radius: 12px; }

.pclab-toast-title { display:flex; align-items:center; gap:10px; }
.pclab-toast-title-text { display:inline-block; }
.pclab-toast-when { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 14px; padding:10px 12px; border-radius:10px; background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.12); }
.pclab-toast-when-label { font-weight:700; }
.pclab-toast-when-date { opacity:0.95; text-align:right; }

.pclab-toast-push {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
}
.pclab-toast-push-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.pclab-toast-push-copy {
    min-width: 0;
    flex: 1 1 auto;
}
.pclab-toast-push-label {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}
.pclab-toast-push-helper {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.45;
    color: var(--pclab-text, #ffffff);
    opacity: 0.78;
}
.pclab-toast-push-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--pclab-text, #ffffff);
    cursor: pointer;
    padding: 0;
}
.pclab-toast-push-toggle-track {
    position: relative;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255,255,255,0.28);
    transition: background .2s ease;
}
.pclab-toast-push-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform .2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}
.pclab-toast-push-toggle-text {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.pclab-toast-push-toggle[data-state="subscribed"] .pclab-toast-push-toggle-track {
    background: rgba(90, 214, 132, 0.9);
}
.pclab-toast-push-toggle[data-state="subscribed"] .pclab-toast-push-toggle-thumb {
    transform: translateX(18px);
}
.pclab-toast-push-toggle[data-state="working"] {
    opacity: 0.75;
}
.pclab-toast-push-status {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.45;
    min-height: 18px;
}
.pclab-toast-push-status.is-error {
    color: #ffd7d7;
}
@media (max-width: 480px) {
    .pclab-toast-push-row {
        gap: 10px;
    }
    .pclab-toast-push-label {
        font-size: 12px;
    }
}

.pclab-toast-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}
.pclab-toast-upcoming {
    margin-left: auto;
    text-align: right;
    min-width: 0;
}
.pclab-toast-upcoming-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 6px;
}
.pclab-toast-upcoming-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}
.pclab-toast-upcoming-box {
    min-width: 44px;
    padding: 6px 6px 5px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.05;
}
.pclab-toast-upcoming-day {
    font-size: 12px;
    font-weight: 700;
}
.pclab-toast-upcoming-month {
    font-size: 11px;
    opacity: 0.9;
    margin-top: 3px;
}
@media (max-width: 480px) {
    .pclab-toast-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .pclab-toast-upcoming {
        margin-left: 0;
        text-align: left;
    }
    .pclab-toast-upcoming-list {
        justify-content: flex-start;
    }
}


.pclab-toast-upcoming-item {
    position: relative;
    display: inline-flex;
}
.pclab-toast-upcoming-preview {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: 220px;
    max-width: min(220px, 70vw);
    padding: 10px 12px;
    border-radius: 12px;
    background: #ffffff;
    color: #14191f;
    box-shadow: 0 12px 28px rgba(0,0,0,0.22);
    border: 1px solid rgba(20,25,31,0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    pointer-events: none;
    text-align: left;
    z-index: 8;
}
.pclab-toast-upcoming-preview::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 100%;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-right: 1px solid rgba(20,25,31,0.08);
    border-bottom: 1px solid rgba(20,25,31,0.08);
    transform: rotate(45deg);
}
.pclab-toast-upcoming-item:hover .pclab-toast-upcoming-preview,
.pclab-toast-upcoming-item:focus-within .pclab-toast-upcoming-preview {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.pclab-toast-upcoming-preview-title {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
}
.pclab-toast-upcoming-preview-date {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 4px;
}
.pclab-toast-upcoming-preview-message {
    font-size: 11px;
    line-height: 1.4;
    opacity: 0.9;
}
@media (max-width: 480px) {
    .pclab-toast-upcoming-preview {
        left: 0;
        right: auto;
        width: min(220px, calc(100vw - 64px));
    }
    .pclab-toast-upcoming-preview::after {
        left: 14px;
        right: auto;
    }
}


/* More visible close button */
.pclab-toast-close {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #050505;
    border: 1px solid rgba(255, 255, 255, 0.72);
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    text-shadow: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.36);
    transition: background .18s ease, transform .18s ease, border-color .18s ease, opacity .18s ease;
    opacity: 1;
}
.pclab-toast-close:hover,
.pclab-toast-close:focus {
    background: #000000;
    border-color: #ffffff;
    transform: scale(1.04);
    opacity: 1;
}
.pclab-toast-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.32), 0 8px 18px rgba(0, 0, 0, 0.36);
}


/* Notification image ratio options */
.pclab-toast-image {
    position: relative;
    overflow: hidden;
}
.pclab-toast-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pclab-toast-image-ratio-1-1 {
    aspect-ratio: 1 / 1;
}
.pclab-toast-image-ratio-3-4 {
    aspect-ratio: 3 / 4;
}
.pclab-toast-image-ratio-4-3 {
    aspect-ratio: 4 / 3;
}
.pclab-toast-image-ratio-16-9 {
    aspect-ratio: 16 / 9;
}
.pclab-toast-video-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #05070b;
    margin: 0 0 12px;
}
.pclab-toast-video {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    border-radius: inherit;
}


/* Ensure close button stays above the image and remains clickable */
.pclab-toast-notification {
    position: fixed;
}
.pclab-toast-image {
    position: relative;
    z-index: 1;
}
.pclab-toast-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 30;
    pointer-events: auto;
}
.pclab-toast-image-wrap > .pclab-toast-close,
.pclab-toast-video-wrap > .pclab-toast-close {
    top: 8px;
    right: 8px;
}
.pclab-toast-video-mute {
    appearance: none;
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 25;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.78);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}
.pclab-toast-video-mute:hover,
.pclab-toast-video-mute:focus {
    background: #000000;
    border-color: #ffffff;
}
.pclab-toast-video-mute:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.32), 0 8px 18px rgba(0, 0, 0, 0.28);
}
.pclab-toast-social-embed {
    width: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: auto;
}
.pclab-toast-social-embed iframe,
.pclab-toast-social-embed blockquote,
.pclab-toast-social-embed .twitter-tweet,
.pclab-toast-social-embed .instagram-media,
.pclab-toast-social-embed .fb-post,
.pclab-toast-social-embed .fb-video {
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
}
