/* Alerts - Universal Modern Design */

/* Base Alert Styles */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    margin-bottom: 20px;
    background: #ffffff;
    border-radius: 8px;
    border-left: 4px solid;
    box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.04), 0px 8px 40px rgba(0, 0, 0, 0.08);
    font-family: metropolisregular, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 2;
}

/* Alert after button */
button + .alert {
    margin-top: 20px;
}

/* Alert icon */
.alert > i,
.alert-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
}

/* Alert content wrapper */
.alert > div,
.alert-content {
    flex: 1;
}

.alert h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #1f2937;
}

/* H2 as first child acts like title, not icon */
.alert > h2:first-child {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 0;
}

/* H2 inside wrapper div */
.alert > div > h2 {
    display: block;
}

.alert > div > strong {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #1f2937;
}

.alert > div > p > strong {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #1f2937;
}

.alert p {
    margin: 0;
    color: #4b5563;
}

.alert a {
    color: inherit;
    text-decoration: underline;
    font-weight: 500;
}

.alert a:hover {
    text-decoration: none;
}

/* Alert Variants */
.alert-info {
    border-left-color: #3b82f6;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, #ffffff 100%);
}

.alert-info > i,
.alert-info .alert-icon {
    color: #3b82f6;
}

.alert-success {
    border-left-color: #67a552;
    background: linear-gradient(90deg, rgba(103, 165, 82, 0.05) 0%, #ffffff 100%);
}

.alert-success > i,
.alert-success .alert-icon {
    color: #67a552;
}

.alert-warning,
.alert-warn {
    border-left-color: #f59e0b;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, #ffffff 100%);
}

.alert-warning > i,
.alert-warning .alert-icon,
.alert-warn > i,
.alert-warn .alert-icon {
    color: #f59e0b;
}

.alert-error {
    border-left-color: #ef4444;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.05) 0%, #ffffff 100%);
}

.alert-error > i,
.alert-error .alert-icon {
    color: #ef4444;
}

.alert-gray {
    border-left-color: #9ca3af;
    background: linear-gradient(90deg, rgba(156, 163, 175, 0.05) 0%, #ffffff 100%);
}

.alert-gray > i,
.alert-gray .alert-icon {
    color: #6b7280;
}

.alert-dark {
    border-left-color: #374151;
    background: linear-gradient(90deg, rgba(55, 65, 81, 0.05) 0%, #ffffff 100%);
}

.alert-dark > i,
.alert-dark .alert-icon {
    color: #374151;
}

.alert-inverse {
    border-left-color: #1f2937;
    background: #1f2937;
    color: #ffffff;
}

.alert-inverse > i,
.alert-inverse .alert-icon {
    color: #ffffff;
}

.alert-inverse h2,
.alert-inverse strong,
.alert-inverse p {
    color: #ffffff;
}

.alert-inverse a {
    color: #67a552;
}

.alert-inverse a:hover {
    color: #5a8f47;
}

.alert-important {
    border-left-color: #f76d3c;
    border-left-width: 6px;
    background: linear-gradient(90deg, rgba(247, 109, 60, 0.1) 0%, #ffffff 100%);
    box-shadow: 0px 4px 16px rgba(247, 109, 60, 0.15);
}

.alert-important > i,
.alert-important .alert-icon {
    color: #f76d3c;
    font-size: 26px;
}

.alert-important h2,
.alert-important strong {
    color: #e55a28;
}

.alert-important a {
    color: #f76d3c;
    font-weight: 600;
}

.alert-important a:hover {
    color: #e55a28;
}

.alert-critical {
    border-left-color: #dc2626;
    border-left-width: 6px;
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.12) 0%, #ffffff 100%);
    box-shadow: 0px 4px 20px rgba(220, 38, 38, 0.2);
    border: 2px solid rgba(220, 38, 38, 0.2);
    border-left: 6px solid #dc2626;
    font-weight: 700;
}

.alert-critical > i,
.alert-critical .alert-icon {
    color: #dc2626;
    font-size: 28px;
}

.alert-critical h2,
.alert-critical strong {
    color: #b91c1c;
}

.alert-critical a {
    color: #dc2626;
    font-weight: 600;
}

.alert-critical a:hover {
    color: #b91c1c;
}

/* Alert Block Modifier */
.alert-block {
    display: block;
}

.alert-block > i,
.alert-block .alert-icon {
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

/* Text Center Modifier */
.alert.textcenter {
    text-align: center;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

/* Blink Animation */
.alert.blink {
    animation: alertBlink 1s ease-in-out infinite;
}

@keyframes alertBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Alert Message (alternative styling) */
.alert-message,
.block-message {
    display: block;
    padding: 16px 20px;
    margin-bottom: 16px;
    border-radius: 6px;
    font-size: 14px;
}

/* Dismissible Alerts */
.alert.alertmaydie {
    position: relative;
    padding-right: 50px;
}

.alert.alertmaydie:after {
    content: '\00d7';
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    font-weight: bold;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.alert.alertmaydie:hover:after {
    opacity: 1;
}

/* Responsive */
@media (max-width: 640px) {
    .alert {
        padding: 16px;
        gap: 12px;
    }

    .alert > i,
    .alert-icon {
        width: 20px;
        height: 20px;
        font-size: 20px;
    }

    .alert strong,
    .alert h2 {
        font-size: 15px;
    }

    .alert p, .alert strong, .alert > div > p > strong {
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .alert {
        box-shadow: none;
        border: 1px solid;
    }

    .alert.blink {
        animation: none;
    }
}

/* ========================================
   BADGES & LABELS
   ======================================== */

/* Base Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: 48px;
}

.badge:hover {
    transform: scale(1.05);
    text-decoration: none;
}

.badge--primary {
    background: rgba(103, 165, 82, 0.1);
    color: #67a552;
}

.badge--primary:hover {
    background: rgba(103, 165, 82, 0.2);
    color: #5a8f47;
}

.badge--warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge--warning:hover {
    background: rgba(245, 158, 11, 0.2);
    color: #b45309;
}

.badge--info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.badge--info:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #2563eb;
}

.badge--success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge--success:hover {
    background: rgba(16, 185, 129, 0.2);
    color: #059669;
}

.badge--error,
.badge--danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge--error:hover,
.badge--danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

/* Status Labels & Badges */
.label,
.status-badge {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    background: transparent;
    border: 2px solid;
    line-height: 1.4;
}

/* Invoice Status Colors */
.label.unpaid,
.label.overdue,
.status-badge.unpaid,
.status-badge.overdue {
    border-color: #ef4444;
    color: #dc2626;
    background: rgba(239, 68, 68, 0.05);
}

.label.paid,
.status-badge.paid {
    border-color: #67a552;
    color: #5a8f47;
    background: rgba(103, 165, 82, 0.05);
}

.label.cancelled,
.status-badge.cancelled {
    border-color: #9ca3af;
    color: #6b7280;
    background: rgba(107, 114, 128, 0.05);
}

.label.terminated,
.status-badge.terminated {
    border-color: #dc2626;
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.05);
}

.label.fraud,
.status-badge.fraud {
    border-color: #991b1b;
    color: #7f1d1d;
    background: rgba(153, 27, 27, 0.05);
}

.label.refunded,
.status-badge.refunded {
    border-color: #0891b2;
    color: #0e7490;
    background: rgba(8, 145, 178, 0.05);
}

.label.payment-pending,
.status-badge.payment-pending {
    border-color: #f59e0b;
    color: #d97706;
    background: rgba(245, 158, 11, 0.05);
}

.label.collections,
.status-badge.collections {
    border-color: #dc2626;
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.05);
}

/* Service Status Colors */
.label.active,
.status-badge.active {
    border-color: #67a552;
    color: #5a8f47;
    background: rgba(103, 165, 82, 0.05);
}

.label.suspended,
.status-badge.suspended {
    border-color: #f59e0b;
    color: #d97706;
    background: rgba(245, 158, 11, 0.05);
}

.label.pending,
.status-badge.pending {
    border-color: #3b82f6;
    color: #2563eb;
    background: rgba(59, 130, 246, 0.05);
}

/* Ticket Status Colors - Each with unique color for easy differentiation */
.label.open,
.label.status-open,
.status-badge.open {
    border-color: #3b82f6;
    color: #2563eb;
    background: rgba(59, 130, 246, 0.05);
}

.label.answered,
.label.status-answered,
.status-badge.answered {
    border-color: #f59e0b;
    color: #d97706;
    background: rgba(245, 158, 11, 0.05);
}

.label.customer-reply,
.label.status-customer-reply {
    border-color: #f76d3c;
    color: #ea580c;
    background: rgba(247, 109, 60, 0.05);
}

.label.awaiting-customer-response,
.label.status-awaiting-customer-response,
.status-badge.awaiting-customer-response {
    border-color: #8b5cf6;
    color: #7c3aed;
    background: rgba(139, 92, 246, 0.05);
}

.label.on-hold,
.label.status-on-hold,
.status-badge.on-hold {
    border-color: #ef4444;
    color: #dc2626;
    background: rgba(239, 68, 68, 0.05);
}

.label.in-progress,
.label.status-in-progress,
.status-badge.in-progress {
    border-color: #67a552;
    color: #5a8f47;
    background: rgba(103, 165, 82, 0.05);
}

.label.closed,
.label.status-closed,
.status-badge.closed {
    border-color: #9ca3af;
    color: #6b7280;
    background: rgba(107, 114, 128, 0.05);
}

.label.response-acknowledged,
.label.status-response-acknowledged,
.status-badge.response-acknowledged {
    border-color: #10b981;
    color: #059669;
    background: rgba(16, 185, 129, 0.05);
}

.label.escalated,
.label.status-escalated,
.status-badge.escalated {
    border-color: #dc2626;
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.05);
}

.label.affiliate-payout,
.label.status-affiliate-payout,
.status-badge.affiliate-payout {
    border-color: #14b8a6;
    color: #0d9488;
    background: rgba(20, 184, 166, 0.05);
}

/* Step Badge (for numbered steps) */
.stepbadge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #67a552;
    color: #ffffff;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
    margin-right: 12px;
}

.step {
    display: flex;
    align-items: center;
    padding: 12px 0;
    font-size: 15px;
}

/* Network Status Badges */
.networkissuesopen {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.networkissuesclosed {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.networkissuesscheduled {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 640px) {
    .badge,
    .label,
    .status-badge {
        font-size: 11px;
        padding: 4px 8px;
    }

    .stepbadge {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

/* ========================================
   ALERT CONTENT ELEMENTS
   ======================================== */

/* Lists inside alerts */
.alert ul {
    margin: 12px 0;
    padding-left: 20px;
    list-style: none;
}

.alert ul li {
    padding-left: 0;
    position: relative;
}

.alert ul li:before {
    content: '•';
    position: absolute;
    left: -15px;
    font-weight: bold;
    color: inherit;
}

.alert ol {
    margin: 12px 0;
    padding-left: 24px;
}

.alert ol li {
    margin: 6px 0;
}

/* Links inside alerts */
.alert a[style*="color:black"],
.alert a[style*="color:white"] {
    color: inherit !important;
}

/* ========================================
   ALERT UTILITIES
   ======================================== */

.alert.textcenter,
.alert.text-center {
    text-align: center;
}

.alert strong,
.alert p strong,
.alert div strong {
    font-weight: 600;
}

/* Alert with emphasized content */
.alert-emphasized {
    font-weight: 600;
    font-size: 15px;
}

.alert-emphasized p {
    font-weight: 600;
}
