/* ═══════════════════════════════════════════════════════════
   NP2 Shared UI Components — Styles
   Toast, Modal, DataTable, FormBuilder
   ═══════════════════════════════════════════════════════════ */

/* ─── Toast ─────────────────────────────────────────────── */

.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: 420px;
}

.toast-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-item.toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.toast-item.toast-exit {
    opacity: 0;
    transform: translateX(100%);
}

.toast-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.toast-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.toast-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.toast-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

.toast-icon { flex-shrink: 0; display: flex; }
.toast-message { flex: 1; }
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.5;
    color: inherit;
    padding: 0 2px;
}
.toast-close:hover { opacity: 1; }


/* ─── Modal ─────────────────────────────────────────────── */

.np2-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
}

.np2-modal-overlay.np2-modal-visible {
    opacity: 1;
    visibility: visible;
}

.np2-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    min-width: 380px;
    max-width: 1100px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(-10px);
    transition: transform 0.2s ease;
}

/* On narrow viewports, clamp to 95% so the modal never overflows. The
   shared modal probably already has this — defensive. */
@media (max-width: 1180px) {
    .np2-modal {
        max-width: 95vw;
    }
}

.np2-modal.np2-modal-enter {
    transform: scale(1) translateY(0);
}

.np2-modal.np2-modal-exit {
    transform: scale(0.95) translateY(-10px);
}

.np2-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.np2-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.np2-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
    border-radius: 4px;
}
.np2-modal-close:hover { background: #f3f4f6; }

.np2-modal-body {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1;
}

.np2-modal-message {
    margin: 0;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
}

.np2-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px 20px;
}

.btn-danger {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}
.btn-danger:hover {
    background: #b91c1c !important;
}

/* ─── Password Change Modal ─────────────────────────────── */

.pw-change-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pw-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pw-field label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pw-field input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
}

.pw-field input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pw-field-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15) !important;
}

.pw-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 8px 12px;
    color: #991b1b;
    font-size: 13px;
}


/* ─── DataTable ─────────────────────────────────────────── */

.dt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
}

.dt-search {
    flex: 1;
    max-width: 320px;
}

.dt-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.15s;
}
.dt-search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dt-info {
    font-size: 12px;
    color: #6b7280;
}

.dt-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.dt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dt-table thead {
    background: #f9fafb;
}

.dt-table th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    user-select: none;
    white-space: nowrap;
}

.dt-sortable { cursor: pointer; }
.dt-sortable:hover { color: #2563eb; }
.dt-sort-asc::after { content: ' ↑'; color: #2563eb; }
.dt-sort-desc::after { content: ' ↓'; color: #2563eb; }

.dt-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.dt-table tbody tr:hover {
    background: #f9fafb;
}

.dt-clickable {
    cursor: pointer;
}

.dt-empty {
    text-align: center;
    color: #9ca3af;
    padding: 32px 14px !important;
    font-style: italic;
}

.dt-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
    padding: 8px 0;
}
/* ─── Top pager spacing ─────────────────────────────────────────────── */
/*
 * The top pager sits between the toolbar and the table. Match the
 * toolbar's bottom margin so the spacing feels intentional.
 */
.dt-pagination.dt-pagination-top {
    margin-bottom: 8px;
}
 
/* The bottom pager keeps the existing default spacing (margin-top
   inherited from .dt-pagination's general styling). */
 
   
.dt-page-btn {
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    color: #374151;
    transition: all 0.15s;
}
.dt-page-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}
.dt-page-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.dt-page-info {
    font-size: 12px;
    color: #6b7280;
}


/* ═══════════════════════════════════════════════════════════════════════
   DataTable — server-side mode additions
   Append to /css/shared-components.css alongside the existing .dt-* rules.
   ═══════════════════════════════════════════════════════════════════════ */
 
/* Loading indicator next to the result count */
.dt-info .dt-loading {
    display: inline-block;
    color: #6b7280;
    font-style: italic;
    margin-right: 6px;
}
 
/* Subtle dim during fetch to signal "this data is stale" */
.dt-table-wrap.dt-fetching {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 80ms ease;
}
 
/* Disabled pagination buttons during fetch */
.dt-pagination .dt-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}




/* ─── FormBuilder ───────────────────────────────────────── */

.fb-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 16px 0;
    color: #991b1b;
    font-size: 13px;
}

.fb-error div {
    padding: 2px 0;
}

.fb-field-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15) !important;
}

/* Form components (used by both FormBuilder and hand-coded forms) */

.form-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-top: 16px;
}

.form-section {
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}
.form-section:last-of-type { border-bottom: none; }

.form-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group-toggle {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-hint {
    font-size: 11px;
    color: #9ca3af;
}

.form-row-inline {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 20px;
    margin-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}
.btn-back:hover { background: #f3f4f6; color: #374151; }

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Permission Grid (Roles Editor) ───────────────────── */

.perm-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.perm-module {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.perm-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s;
}

.perm-module-header:hover {
    background: #f3f4f6;
}

.perm-module-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.perm-chevron {
    transition: transform 0.2s;
    color: #9ca3af;
    flex-shrink: 0;
}

.perm-expanded .perm-chevron {
    transform: rotate(180deg);
}

.perm-module-icon {
    display: flex;
    color: #6b7280;
}

.perm-module-label {
    font-size: 14px;
}

.perm-module-count {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #9ca3af;
}

.perm-module-count.count-full {
    background: #dcfce7;
    color: #15803d;
}

.perm-module-count.count-partial {
    background: #fef3c7;
    color: #92400e;
}

.perm-module-items {
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: max-height 0.25s ease;
    overflow: hidden;
}

.perm-module-items.perm-collapsed {
    max-height: 0 !important;
    padding: 0;
}

.perm-subcategory {
    margin: 0;
    border-bottom: 1px solid #f3f4f6;
}

.perm-subcategory:last-child {
    border-bottom: none;
}

.perm-sub-alt {
    background: #fafbfc;
}

.perm-sub-header {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    background: inherit;
    border-bottom: 1px solid #f3f4f6;
    font-size: 12px;
}

.perm-sub-label {
    flex: 1;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.toggle-sub {
    font-size: 11px;
}

.perm-sub-items {
    padding: 8px 14px 8px 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}

.perm-sub-nosub {
    padding: 10px 14px;
}

.perm-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    padding: 3px 0;
}

.perm-item input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.toggle-all, .toggle-sub {
    margin-left: auto;
}

/* Role Cards */

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.role-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    transition: box-shadow 0.15s;
}

.role-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.role-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.role-card-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.role-card-desc {
    margin: 4px 0 0;
    font-size: 12px;
    color: #6b7280;
}

.role-card-perms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.role-perm-group {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 6px;
    font-size: 11px;
    color: #6b7280;
}

.role-perm-icon {
    display: flex;
    width: 14px;
    height: 14px;
}

.role-perm-icon svg {
    width: 14px;
    height: 14px;
}

.role-perm-count {
    font-weight: 600;
    color: #9ca3af;
}

.role-perm-count.count-full {
    color: #059669;
}

/* ─── Audit Log Filters ────────────────────────────────── */

.audit-filters {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.audit-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.audit-filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.audit-filter-group input[type="date"],
.audit-filter-group select {
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
}

.audit-filter-group input[type="date"]:focus,
.audit-filter-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.audit-details {
    font-size: 11px;
    color: #6b7280;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.loading {
    padding: 32px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

/* ─── Universal List Action Buttons ─────────────────────── */

.np2-action-buttons {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.np2-action-btn {
    width: 36px;
    height: 32px;
    border: 1.5px solid #93c5fd;
    border-radius: 6px;
    background: #eff6ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    transition: all 0.15s;
}

.np2-action-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.np2-action-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* Danger variant for delete/deactivate actions */
.np2-action-btn-danger,
.np2-action-btn.btn-delete {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #dc2626;
}

.np2-action-btn-danger:hover,
.np2-action-btn.btn-delete:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

/* Standalone action button (for detail pages, headers, etc.) */
.np2-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1.5px solid #93c5fd;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.np2-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.np2-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.np2-btn-danger {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #dc2626;
}

.np2-btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

/* Aliases for backward compat */
.cic-action-buttons { display: flex; gap: 6px; justify-content: flex-end; }
.cic-action-btn { width: 36px; height: 32px; border: 1.5px solid #93c5fd; border-radius: 6px; background: #eff6ff; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #2563eb; transition: all 0.15s; }
.cic-action-btn svg { width: 16px; height: 16px; stroke-width: 2.5; }
.cic-action-btn:hover { background: #2563eb; border-color: #2563eb; color: white; }

/* ─── Settings Tabs ────────────────────────────────────── */

.settings-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 0;
    overflow-x: auto;
    padding-bottom: 0;
}

.settings-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1.5px solid #e5e7eb;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: #f9fafb;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    margin-bottom: -2px;
    transition: all 0.15s;
}

.settings-tab:hover {
    color: #374151;
    background: #f3f4f6;
}

.settings-tab.active {
    color: #2563eb;
    background: white;
    border-color: #93c5fd;
    border-bottom: 2px solid white;
}

.settings-tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke-width: 2.5;
}

.settings-panel {
    margin-top: 0;
}

/* ─── Audit Detail Popup ────────────────────────────────── */

.audit-details-preview {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background 0.1s;
}

.audit-details-preview:hover {
    background: #eff6ff;
    color: #2563eb;
}

.audit-detail-textarea {
    width: 100%;
    min-height: 200px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    color: #111827;
    resize: vertical;
}

.settings-panel .form-card {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 8px 0;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-field label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.settings-field input,
.settings-field select,
.settings-field textarea {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
}

.settings-field input:focus,
.settings-field select:focus,
.settings-field textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.settings-field-toggle {
    grid-column: 1 / -1;
    padding: 8px 0;
}

.settings-field-full {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .settings-form-grid {
        grid-template-columns: 1fr;
    }
    .settings-tabs {
        gap: 0;
    }
    .settings-tab {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ─── Newspaper Spinner ────────────────────────────────── */

.np2-spinner-overlay {
    position: fixed;
    inset: 0;
    z-index: 8000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.np2-spinner-backdrop {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(3px);
}

.np2-spinner-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.np2-spinner-visible {
    opacity: 1;
}

.np2-spinner-fading {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.np2-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.np2-spinner-icon {
    transform: scale(0);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Phase 1: Expand in with springy overshoot */
.np2-spinner-expand {
    transform: scale(1);
}

/* Phase 2: Smooth Z-axis spin (facing the user) */
.np2-spinner-spin {
    transform: scale(1);
    animation: np2-spin 2.8s linear infinite;
}

/* Phase 3: Shrink out with a last spin */
.np2-spinner-shrink {
    animation: np2-shrink 0.5s cubic-bezier(0.6, -0.28, 0.74, 0.05) forwards;
}

@keyframes np2-spin {
    0%   { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1) rotate(360deg); }
}

@keyframes np2-shrink {
    0%   { transform: scale(1) rotate(0deg); }
    100% { transform: scale(0) rotate(180deg); }
}

.np2-spinner-message {
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    text-align: center;
    animation: np2-pulse 2s ease-in-out infinite;
}

@keyframes np2-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Payment-icon helper styling
   Append to /css/shared-components.css
   ═══════════════════════════════════════════════════════════════════════ */
 
.pi-icon {
    font-size: 1.4em;          /* ~140% of surrounding text — visible but not silly */
    margin-right: 4px;
    vertical-align: -2px;       /* visually align with text baseline */
    display: inline-block;
}
 
.pi-label {
    /* Default styling — let the surrounding context decide */
}
 
/* Inside a small badge, dial the icon down slightly so it doesn't
   blow out the badge height. */
.cic-badge .pi-icon {
    font-size: 1.25em;
}
 
/* Dropdown options can't host HTML, so renderPlain is used instead.
   No special styling needed there — the emoji ships as text.
   But we do want the select itself to use a font that renders emoji well. */
select.pi-select option {
    font-family: -apple-system, "Segoe UI Emoji", "Apple Color Emoji",
                 "Noto Color Emoji", system-ui, sans-serif;
}
 