/* =====================================================
   NOTIFICATION DETAIL POPUP DIALOG
   NotificationDetailDialog.css
   ===================================================== */

/* ── Design Tokens ─────────────────────────────────── */
:root {
    --ndp-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --ndp-color: #667eea;
    --ndp-purple: #764ba2;
    --ndp-shadow-sm: 0 2px 6px rgba(102, 126, 234, 0.2);
    --ndp-shadow-md: 0 3px 12px rgba(102, 126, 234, 0.4);
    --ndp-border: 1px solid #e4e1f4;
    --ndp-radius: 8px;
    --ndp-ease: all 0.2s ease;
    --ndp-h-btn: 40px;
}

/* =====================================================
   DIALOG SHELL
   ===================================================== */

.notif-popup-dialog {
    width: 90vw;
    max-width: 1100px;
    min-width: 680px;
    max-height: 88vh;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* =====================================================
   TOOLBAR
   ===================================================== */

.notif-popup-toolbar {
    background: var(--ndp-gradient) !important;
    min-height: 68px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18) !important;
}

.notif-popup-toolbar .md-toolbar-tools.notif-popup-toolbar-tools {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 20px !important;
    min-height: 68px !important;
    gap: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.notif-popup-toolbar-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.notif-popup-toolbar-icon-wrap.icon-wrap-info {
    background: rgba(33, 150, 243, 0.3);
    border-color: rgba(33, 150, 243, 0.4);
}

.notif-popup-toolbar-icon-wrap.icon-wrap-notice {
    background: rgba(255, 152, 0, 0.3);
    border-color: rgba(255, 152, 0, 0.4);
}

.notif-popup-toolbar-icon-wrap.icon-wrap-error {
    background: rgba(244, 67, 54, 0.3);
    border-color: rgba(244, 67, 54, 0.4);
}

.notif-popup-toolbar-icon-wrap.icon-wrap-fatal {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.3);
}

.notif-popup-toolbar-icon {
    color: white !important;
    font-size: 24px !important;
    width: 24px !important;
    height: 24px !important;
}

.notif-popup-toolbar-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    flex: 1;
    text-align: left;
}

.notif-popup-toolbar-title {
    font-size: 17px;
    font-weight: 600;
    color: white;
    margin: 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    width: 100%;
}

.notif-popup-toolbar-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
    text-align: left;
}

.notif-popup-toolbar-dot {
    color: rgba(255, 255, 255, 0.45);
    font-size: 14px;
}

.notif-popup-close-btn {
    color: rgba(255, 255, 255, 0.85) !important;
    margin: 0 0 0 auto !important;
    flex-shrink: 0;
}

.notif-popup-close-btn:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.12) !important;
}

/* =====================================================
   DIALOG CONTENT — TWO-COLUMN LAYOUT
   ===================================================== */

.notif-popup-body {
    display: flex !important;
    flex-direction: row !important;
    flex: 1 !important;
    overflow: hidden !important;
    padding: 0 !important;
    min-height: 0 !important;
}

/* ── SIDEBAR ─────────────────────────────────────────── */

.notif-popup-sidebar {
    width: 240px;
    min-width: 240px;
    background: #f5f4fb;
    border-right: var(--ndp-border);
    padding: 20px 18px !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    overflow-y: auto;
    flex-shrink: 0;
    box-sizing: border-box;
}

.notif-popup-sidebar::-webkit-scrollbar {
    width: 4px;
}

.notif-popup-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.notif-popup-sidebar::-webkit-scrollbar-thumb {
    background: #c5bfe8;
    border-radius: 2px;
}

.notif-popup-sidebar-section {
    width: 100%;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.notif-popup-id-section {
    margin-top: auto;
    padding-top: 16px;
}

.notif-popup-sidebar-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9c8fc5;
    margin-bottom: 7px;
    text-align: left;
}

.notif-popup-sidebar-divider {
    width: 100%;
    height: 1px;
    background: #ddd9f0;
    margin: 4px 0 16px;
}

.notif-popup-sidebar-value {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    color: #424242;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    word-break: break-word;
    width: 100%;
    text-align: left;
}

.notif-popup-sidebar-value md-icon {
    font-size: 15px !important;
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    color: #9c8fc5 !important;
    flex-shrink: 0;
    margin: 0 !important;
}

.notif-popup-sidebar-mono {
    font-family: 'Monaco', monospace;
    font-size: 12px;
    color: #5c5c5c;
    align-items: flex-start;
}

.notif-popup-sidebar-mono md-icon {
    margin-top: 1px !important;
}

.notif-popup-delivery-msg {
    font-size: 11px;
    color: #757575;
    line-height: 1.5;
    word-break: break-word;
    text-align: left;
}

.notif-popup-id-chip {
    display: inline-block;
    background: #e8e4f8;
    color: #5e35b1;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'Monaco', monospace;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid #cfc8f0;
}

/* Status/Severity pills */
.notif-popup-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.notif-popup-status-pill md-icon {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
    color: inherit !important;
}

.sev-info {
    background: #e3f2fd;
    color: #1565c0;
}

.sev-notice {
    background: #fff3e0;
    color: #e65100;
}

.sev-error {
    background: #ffebee;
    color: #c62828;
}

.sev-fatal {
    background: #212121;
    color: #ef9a9a;
}

.st-queued {
    background: #fff8e1;
    color: #f57f17;
}

.st-sent {
    background: #e8f5e9;
    color: #2e7d32;
}

.st-failed {
    background: #ffebee;
    color: #c62828;
}

.st-aborted {
    background: #f5f5f5;
    color: #616161;
}

.st-dispatching {
    background: #e1f5fe;
    color: #0277bd;
}

.delivery-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.delivery-failed {
    background: #ffebee;
    color: #c62828;
}

.delivery-failed-exception {
    background: #fce4ec;
    color: #880e4f;
}

/* ── MAIN CONTENT ──────────────────────────────────── */

.notif-popup-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 28px 28px 20px;
    background: #ffffff;
    overflow-y: auto;
    min-width: 0;
    text-align: left;
    box-sizing: border-box;
}

.notif-popup-main::-webkit-scrollbar {
    width: 6px;
}

.notif-popup-main::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.notif-popup-main::-webkit-scrollbar-thumb {
    background: #c5bfe8;
    border-radius: 3px;
}

.notif-popup-main::-webkit-scrollbar-thumb:hover {
    background: #9e90d8;
}

.notif-popup-subject-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0ecfc;
    width: 100%;
    text-align: left;
}

.notif-popup-subject-icon {
    font-size: 22px !important;
    width: 22px !important;
    height: 22px !important;
    color: var(--ndp-purple) !important;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-popup-subject-text {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.35;
    word-break: break-word;
    text-align: left;
    flex: 1;
}

.notif-popup-message-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    font-size: 10px;
    color: #9c8fc5;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    text-align: left;
    width: 100%;
    /* ── añadir esto ── */
    flex-shrink: 0;
    box-sizing: border-box;
}

.notif-popup-message-label md-icon {
    font-size: 15px !important;
    width: 15px !important;
    height: 15px !important;
    color: #9c8fc5 !important;
    /* ── asegurar que no crezca ── */
    flex: 0 0 15px !important;
    margin: 0 !important;
}

.notif-popup-message-label span {
    flex: 0 1 auto;
    /* ← no dejar que el span crezca y empuje */
    text-align: left;
}

.notif-popup-message-body {
    flex: 1;
    width: 100%;
    background: #faf9ff;
    border: 1px solid #e8e4f5;
    border-left: 3px solid var(--ndp-purple);
    border-radius: 0 8px 8px 0;
    padding: 20px 22px;
    line-height: 1.72;
    color: #333;
    font-size: 14px;
    overflow-y: auto;
    min-height: 200px;
    max-height: calc(88vh - 320px);
    word-break: break-word;
    box-sizing: border-box;
    text-align: left;
}

.notif-popup-message-body::-webkit-scrollbar {
    width: 5px;
}

.notif-popup-message-body::-webkit-scrollbar-track {
    background: #f0ecfc;
    border-radius: 3px;
}

.notif-popup-message-body::-webkit-scrollbar-thumb {
    background: #c5bfe8;
    border-radius: 3px;
}

.notif-popup-message-body::-webkit-scrollbar-thumb:hover {
    background: #9e90d8;
}

.notif-popup-message-body * {
    max-width: 100%;
}

.notif-popup-message-body p {
    margin: 0 0 14px 0;
}

.notif-popup-message-body p:last-child {
    margin-bottom: 0;
}

.notif-popup-message-body a {
    color: var(--ndp-color);
    text-decoration: underline;
}

.notif-popup-message-body strong {
    color: #1a1a2e;
}

.notif-popup-message-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 12px 0;
}

.notif-popup-message-body table th,
.notif-popup-message-body table td {
    padding: 8px 12px;
    border: 1px solid #e4e1f4;
    text-align: left;
}

.notif-popup-message-body table th {
    background: #f0ecfc;
    color: #5e35b1;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* =====================================================
   ACTIONS
   ===================================================== */

.notif-popup-actions {
    padding: 12px 24px !important;
    background: #f5f4fb !important;
    border-top: var(--ndp-border) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 56px !important;
}

.notif-popup-actions-hint {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #b0a8d4;
    font-style: italic;
}

.notif-popup-actions-hint md-icon {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
    color: #b0a8d4 !important;
}

.notif-popup-btn-close {
    background: var(--ndp-gradient) !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
    border-radius: 20px !important;
    padding: 0 20px !important;
    height: var(--ndp-h-btn) !important;
    min-width: 100px !important;
    text-transform: uppercase !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: var(--ndp-shadow-sm) !important;
    transition: var(--ndp-ease) !important;
    margin: 0 !important;
}

.notif-popup-btn-close md-icon {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
    color: white !important;
}

.notif-popup-btn-close:hover {
    box-shadow: var(--ndp-shadow-md) !important;
    transform: translateY(-1px) !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 760px) {
    .notif-popup-dialog {
        min-width: unset;
        width: 100vw;
        max-height: 100vh;
        border-radius: 0 !important;
    }

    .notif-popup-body {
        flex-direction: column !important;
    }

    .notif-popup-sidebar {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: var(--ndp-border);
        padding: 16px !important;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        align-items: flex-start;
    }

    .notif-popup-sidebar-section {
        margin-bottom: 0;
        min-width: 120px;
    }
}

/* Hint icon dentro del status pill */
.notif-pill-hint-icon {
  font-size: 13px !important;
  width: 13px !important;
  height: 13px !important;
  color: inherit !important;
  opacity: 0.7;
  margin-left: 3px !important;
  flex-shrink: 0;
  cursor: help;
}

/* Cursor pointer en pills FAILED/ABORTED con tooltip */
.notif-pill-has-hint {
  cursor: help;
}