/**
 * Frontend Stylesheet for Noti Header WordPress Plugin
 * Styled exactly after the premium knu-notify-stack structure
 */

:root {
    --noti-card-bg: #0f0f0f;
    --noti-header-bg: #1a1a1a;
    --noti-row-bg: #141414;
    --noti-row-hover: #161616;
    --noti-border-color: #222;
    --noti-header-border: #333;
    --noti-row-border: #1a1a1a;
    --noti-text-primary: #ccc;
    --noti-text-hover: #fff;
    --noti-text-secondary: #888;
    --noti-arrow-color: #444;
    --noti-arrow-hover: #e73c7e;
}

/* Card Container - Compact Centered design for both desktop and mobile */
.noti-header-card {
    max-width: 550px;
    margin: 15px auto;
    background: var(--noti-card-bg) !important;
    border: 1px solid var(--noti-border-color) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-sizing: border-box;
    width: auto;
}

/* Auto-inject hide until loaded and placed */
.noti-auto-inject-hidden {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: -9999px;
    left: -9999px;
}

/* Professional Header */
.noti-header-card .noti-card-header {
    background: var(--noti-header-bg) !important;
    padding: 10px 15px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    border-bottom: 1px solid var(--noti-header-border) !important;
}

.noti-header-card .noti-card-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.noti-header-card .noti-card-title {
    color: var(--noti-text-secondary) !important;
    font-size: 14px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: normal !important;
}

.noti-header-card .noti-card-bell {
    display: inline-block;
    vertical-align: middle;
    animation: noti-bell-wiggle 4s infinite ease-in-out;
}

/* Bell wiggle micro-animation */
@keyframes noti-bell-wiggle {
    0%, 100% { transform: rotate(0); }
    4% { transform: rotate(15deg); }
    8% { transform: rotate(-13deg); }
    12% { transform: rotate(10deg); }
    16% { transform: rotate(-8deg); }
    20% { transform: rotate(5deg); }
    24% { transform: rotate(-3deg); }
    28% { transform: rotate(0); }
}

/* Card Body */
.noti-header-card .noti-card-body {
    display: flex;
    flex-direction: column;
}

/* Row Structure (Grid) mapping perfectly to DOM order */
.noti-header-card .noti-row {
    display: grid !important;
    grid-template-columns: 30px 1fr 68px 4px !important; /* LTR order: arrow (30px), text (1fr), badge (68px), indicator (4px) */
    align-items: center !important;
    text-decoration: none !important;
    border-bottom: 1px solid var(--noti-row-border) !important;
    background-color: var(--noti-row-bg) !important;
    transition: background 0.2s ease !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    position: relative;
    min-height: 48px;
}

.noti-header-card .noti-row:last-child {
    border-bottom: none !important;
}

.noti-header-card .noti-row-link {
    cursor: pointer;
}

.noti-header-card .noti-row:hover {
    background: var(--noti-row-hover) !important;
}

/* Indicator Strip */
.noti-header-card .noti-indicator {
    height: 100% !important;
    width: 4px !important;
    display: block !important;
}

/* Badge (Meta) Styling */
.noti-header-card .noti-badge-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.noti-header-card .noti-badge {
    font-size: 9px !important;
    font-weight: bold !important;
    color: #555 !important;
    text-align: center !important;
    font-family: sans-serif !important;
    text-transform: uppercase !important;
    line-height: 1.2 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

/* Main Text Content (Urdu - RTL) */
.noti-header-card .noti-text-container {
    padding: 10px 15px !important;
    direction: rtl !important;
    text-align: right !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.noti-header-card .noti-text {
    color: var(--noti-text-primary) !important;
    font-family: "pdms-jauhar" !important; /* Only pdms-jauhar font class applied */
    font-size: 16px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    line-height: 1.8 !important; /* High Nastaleeq bounds preservation */
    width: 100%;
}

/* Left side indicator arrow */
.noti-header-card .noti-arrow {
    font-size: 12px !important;
    color: var(--noti-arrow-color) !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    transition: transform 0.2s ease, color 0.2s ease !important;
}

/* Interaction Hover effects */
.noti-header-card .noti-row:hover .noti-text {
    color: var(--noti-text-hover) !important;
}

.noti-header-card .noti-row-link:hover .noti-arrow {
    color: var(--noti-arrow-hover) !important;
    transform: translateX(-3px) !important; /* Points elegantly left in hover direction */
}

/* Responsiveness & Mobile Spacing (Margin outside on left-right) */
@media (max-width: 767px) {
    .noti-header-card {
        margin: 15px 12px !important;
        max-width: calc(100% - 24px) !important;
        border-radius: 10px !important;
    }
}

/* Highlighted premium notification styling */
.noti-header-card .noti-row-highlighted {
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.01) !important;
}

.noti-header-card .noti-row-highlighted .noti-indicator {
    width: 5px !important;
    animation: noti-pulse-indicator 2.2s infinite ease-in-out;
}

.noti-header-card .noti-row-highlighted .noti-text {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.15) !important;
}

/* Pulse animation for the vertical strip */
@keyframes noti-pulse-indicator {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 8px currentColor;
    }
    50% {
        opacity: 0.65;
        box-shadow: 0 0 2px currentColor;
    }
}
