/**
 * VideoHub notification engine frontend styles.
 *
 * @package Polanger_VideoHub
 * @since   1.9.2
 */

.pvh-notifications-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border: 1px solid var(--pvh-border, #d8dee8);
    border-radius: 999px;
    background: var(--pvh-bg, #fff);
    color: var(--pvh-text, #101828);
    cursor: pointer;
    padding: 0;
    text-decoration: none !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body .pvh-notifications-trigger,
body button.pvh-notifications-trigger,
body a.pvh-notifications-trigger {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--pvh-border, #d8dee8) !important;
    border-radius: 999px !important;
    background: var(--pvh-bg, #fff) !important;
    color: var(--pvh-text, #101828) !important;
    font: inherit !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.pvh-notifications-trigger:hover,
.pvh-notifications-trigger:focus {
    background: var(--pvh-bg-secondary, #f5f7fb);
    border-color: var(--pvh-primary, #2563eb);
    color: var(--pvh-primary, #2563eb);
    outline: none;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.16);
    transform: translateY(-1px);
}

body .pvh-notifications-trigger:hover,
body .pvh-notifications-trigger:focus {
    background: var(--pvh-bg-secondary, #f5f7fb) !important;
    border-color: var(--pvh-primary, #2563eb) !important;
    color: var(--pvh-primary, #2563eb) !important;
    outline: none !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.16) !important;
}

body button.pvh-notifications-trigger:hover,
body button.pvh-notifications-trigger:focus,
body a.pvh-notifications-trigger:hover,
body a.pvh-notifications-trigger:focus {
    background-image: none !important;
    text-decoration: none !important;
}

.pvh-notifications-trigger svg {
    width: 20px;
    height: 20px;
}

body .pvh-notifications-trigger svg,
body .pvh-notifications-panel svg {
    display: block !important;
    flex: 0 0 auto !important;
    fill: none !important;
    stroke: currentColor !important;
}

.pvh-notifications-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef233c;
    color: #fff;
    border: 2px solid #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 14px;
    text-align: center;
    box-shadow: 0 8px 18px rgba(239, 35, 60, 0.3);
}

body .pvh-notifications-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 5px !important;
    border: 2px solid #fff !important;
    border-radius: 999px !important;
    background: #ef233c !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 14px !important;
    text-decoration: none !important;
}

.pvh-mobile-notifications .pvh-notifications-trigger {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    box-shadow: none;
}

body .pvh-mobile-notifications .pvh-notifications-trigger {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.pvh-mobile-notifications .pvh-notifications-trigger:hover,
.pvh-mobile-notifications .pvh-notifications-trigger:focus {
    background: var(--pvh-bg-hover, #f0f0f0);
    box-shadow: none;
    transform: none;
}

.pvh-notifications-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(2px);
}

.pvh-notifications-panel {
    position: fixed;
    top: 86px;
    right: 24px;
    z-index: 100001;
    width: min(420px, calc(100vw - 32px));
    max-height: min(680px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    color: #101828;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

body .pvh-notifications-panel,
body .pvh-notifications-panel *,
body .pvh-notifications-backdrop {
    box-sizing: border-box !important;
}

body .pvh-notifications-panel {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    color: #101828 !important;
    text-decoration: none !important;
}

body .pvh-notifications-panel[hidden],
body .pvh-notifications-backdrop[hidden] {
    display: none !important;
}

.pvh-notifications-panel[hidden],
.pvh-notifications-backdrop[hidden] {
    display: none !important;
}

.pvh-notifications-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 20px 14px;
    border-bottom: 1px solid #eef2f7;
}

.pvh-notifications-panel__header span,
.pvh-notifications-page__header span {
    display: block;
    margin-bottom: 4px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pvh-notifications-panel__header h3,
.pvh-notifications-page__header h2 {
    margin: 0;
    color: #101828;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.15;
}

.pvh-notifications-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #475467;
    cursor: pointer;
}

body .pvh-notifications-close,
body .pvh-notifications-link-btn,
body .pvh-notification-item__delete {
    appearance: none !important;
    -webkit-appearance: none !important;
    box-sizing: border-box !important;
    font: inherit !important;
    text-decoration: none !important;
}

body button.pvh-notifications-close,
body .pvh-notifications-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    padding: 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 999px !important;
    background: #fff !important;
    background-image: none !important;
    color: #475467 !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

body button.pvh-notifications-close:hover,
body button.pvh-notifications-close:focus,
body .pvh-notifications-close:hover,
body .pvh-notifications-close:focus {
    border-color: #bfdbfe !important;
    background: #f8fafc !important;
    background-image: none !important;
    color: #2563eb !important;
    outline: none !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.14) !important;
}

.pvh-notifications-close .dashicons {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    font-size: 18px !important;
    line-height: 18px !important;
    color: currentColor !important;
}

.pvh-notifications-panel__body {
    min-height: 180px;
    overflow-y: auto;
    padding: 10px;
}

.pvh-notifications-panel__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid #eef2f7;
}

.pvh-notifications-link-btn {
    border: none;
    background: transparent;
    color: #2563eb;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 4px;
}

body .pvh-notifications-link-btn,
body button.pvh-notifications-link-btn,
body a.pvh-notifications-link-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 8px 6px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    background-image: none !important;
    color: #2563eb !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
}

.pvh-notifications-link-btn.is-danger {
    color: #dc2626;
}

body .pvh-notifications-link-btn.is-danger,
body button.pvh-notifications-link-btn.is-danger {
    color: #dc2626 !important;
}

.pvh-notifications-link-btn:hover,
.pvh-notifications-link-btn:focus {
    color: #1d4ed8;
    text-decoration: none !important;
}

body .pvh-notifications-link-btn:hover,
body .pvh-notifications-link-btn:focus,
body button.pvh-notifications-link-btn:hover,
body button.pvh-notifications-link-btn:focus,
body a.pvh-notifications-link-btn:hover,
body a.pvh-notifications-link-btn:focus {
    border: 0 !important;
    background: #eff6ff !important;
    background-image: none !important;
    color: #1d4ed8 !important;
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

body .pvh-notifications-link-btn:disabled,
body .pvh-notifications-link-btn.is-loading,
body button.pvh-notifications-link-btn:disabled,
body button.pvh-notifications-link-btn.is-loading {
    cursor: progress !important;
    opacity: 0.62 !important;
    pointer-events: none !important;
    background: #eff6ff !important;
    background-image: none !important;
    color: #1d4ed8 !important;
    box-shadow: none !important;
}

.pvh-notifications-link-btn.is-danger:hover,
.pvh-notifications-link-btn.is-danger:focus {
    color: #b91c1c;
}

body .pvh-notifications-link-btn.is-danger:hover,
body .pvh-notifications-link-btn.is-danger:focus,
body button.pvh-notifications-link-btn.is-danger:hover,
body button.pvh-notifications-link-btn.is-danger:focus {
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

.pvh-notifications-state,
.pvh-notifications-empty {
    margin: 0;
    padding: 34px 18px;
    color: #667085;
    text-align: center;
    font-size: 14px;
}

.pvh-notifications-list {
    display: grid;
    gap: 8px;
}

.pvh-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 18px;
    color: inherit;
    text-decoration: none !important;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

body .pvh-notification-item,
body .pvh-notification-item:hover,
body .pvh-notification-item:focus {
    text-decoration: none !important;
}

.pvh-notification-item:hover,
.pvh-notification-item:focus {
    background: #f8fbff;
    border-color: #dbeafe;
    color: inherit;
    outline: none;
    transform: translateY(-1px);
}

.pvh-notification-item__link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
    color: inherit !important;
    text-decoration: none !important;
}

body .pvh-notification-item__link,
body .pvh-notification-item__link:hover,
body .pvh-notification-item__link:focus {
    color: inherit !important;
    text-decoration: none !important;
    background: transparent !important;
}

.pvh-notification-item.is-unread {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.06));
    border-color: rgba(37, 99, 235, 0.14);
}

.pvh-notification-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 14px;
    background: #eff6ff;
    color: #2563eb;
}

.pvh-notification-item__content {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.pvh-notification-item__content strong {
    color: #101828;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
}

.pvh-notification-item__content span {
    color: #475467;
    font-size: 13px;
    line-height: 1.4;
}

.pvh-notification-item__content em {
    color: #98a2b3;
    font-size: 12px;
    font-style: normal;
}

.pvh-notification-item__delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    margin: 3px 0 0;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
    color: #98a2b3;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

body button.pvh-notification-item__delete,
body .pvh-notification-item__delete {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 30px !important;
    margin: 3px 0 0 !important;
    padding: 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 999px !important;
    background: #fff !important;
    background-image: none !important;
    color: #98a2b3 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

.pvh-notification-item__delete span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
    color: currentColor !important;
}

.pvh-notification-item__delete:hover,
.pvh-notification-item__delete:focus {
    border-color: rgba(239, 68, 68, 0.28);
    background: #fef2f2;
    color: #dc2626;
    outline: none;
    transform: translateY(-1px);
}

body button.pvh-notification-item__delete:hover,
body button.pvh-notification-item__delete:focus,
body .pvh-notification-item__delete:hover,
body .pvh-notification-item__delete:focus {
    border-color: rgba(239, 68, 68, 0.28) !important;
    background: #fef2f2 !important;
    background-image: none !important;
    color: #dc2626 !important;
    outline: none !important;
    box-shadow: none !important;
}

.pvh-notifications-page {
    max-width: 860px;
    margin: 0 auto 32px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    background: #fff;
}

.pvh-notifications-page__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.pvh-notifications-page__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.pvh-notifications-page__footer {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

@media screen and (max-width: 768px) {
    .pvh-notifications-panel {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: min(76vh, 680px);
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -18px 60px rgba(15, 23, 42, 0.28);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .pvh-notifications-panel__header {
        padding: 18px 18px 12px;
    }

    .pvh-notifications-panel__body {
        padding: 8px;
    }

    .pvh-notifications-page__header {
        display: grid;
    }

    .pvh-notifications-page__actions {
        justify-content: flex-start;
    }
}
