/* ==========================================================================
   Crowd Diaries — Premium Brand Themed Popup Dialogs & Notifications
   ========================================================================== */

/* Universal Dialog Backdrop */
.crowd-dialog-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 19, 41, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.24s ease;
}

.crowd-dialog-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Dialog Card */
.crowd-dialog-card {
    background: #ffffff;
    border-radius: 22px;
    max-width: 460px;
    width: 100%;
    padding: 34px 28px 26px 28px;
    box-shadow: 0 30px 65px -12px rgba(11, 19, 41, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.05);
    text-align: center;
    transform: scale(0.92) translateY(14px);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    box-sizing: border-box;
}

.crowd-dialog-backdrop.active .crowd-dialog-card {
    transform: scale(1) translateY(0);
}

/* Gradient Accent Strip at Top */
.crowd-dialog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ff542e 0%, #ff8a65 40%, #6366f1 70%, #a855f7 100%);
    transition: background 0.25s ease;
}

.crowd-dialog-card.type-ai::before {
    background: linear-gradient(90deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
}

.crowd-dialog-card.type-success::before {
    background: linear-gradient(90deg, #10b981 0%, #06b6d4 100%);
}

.crowd-dialog-card.type-warning::before {
    background: linear-gradient(90deg, #f59e0b 0%, #eab308 100%);
}

.crowd-dialog-card.type-danger::before,
.crowd-dialog-card.type-error::before,
.crowd-dialog-card.type-logout::before {
    background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
}

/* Close Icon Button (Top Right) */
.crowd-dialog-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #94a3b8;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.crowd-dialog-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Floating Icon Badge */
.crowd-dialog-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    margin: 0 auto 18px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #ffffff;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.crowd-dialog-backdrop.active .crowd-dialog-icon {
    transform: scale(1.05);
}

/* Icon Variants */
.crowd-dialog-icon.ai {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.42);
}

.crowd-dialog-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.4);
}

.crowd-dialog-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.4);
}

.crowd-dialog-icon.danger,
.crowd-dialog-icon.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.4);
}

.crowd-dialog-icon.info {
    background: linear-gradient(135deg, #ff542e 0%, #ff8a65 100%);
    box-shadow: 0 12px 28px rgba(255, 84, 46, 0.4);
}

/* Typography */
.crowd-dialog-title {
    font-family: 'Outfit', -apple-system, sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: #0b1329;
    margin: 0 0 10px 0;
    letter-spacing: -0.02em;
}

.crowd-dialog-message {
    font-size: 0.94rem;
    line-height: 1.6;
    color: #475569;
    margin: 0 0 24px 0;
    word-break: break-word;
    white-space: pre-line;
}

/* Action Buttons Container */
.crowd-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.crowd-dialog-btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.94rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    box-sizing: border-box;
}

.crowd-dialog-btn.full-width {
    width: 100%;
}

.crowd-dialog-btn.primary {
    background: linear-gradient(135deg, #ff542e 0%, #e03e18 100%);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(255, 84, 46, 0.35);
}

.crowd-dialog-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(255, 84, 46, 0.45);
}

.crowd-dialog-btn.ai {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

.crowd-dialog-btn.ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.45);
}

.crowd-dialog-btn.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
}

.crowd-dialog-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.45);
}

.crowd-dialog-btn.cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1.5px solid #cbd5e1;
    flex: 1;
}

.crowd-dialog-btn.cancel:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.crowd-dialog-btn.confirm-action {
    flex: 1;
}

/* Floating Toast Notifications (Auto-dismissing) */
.crowd-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    pointer-events: none;
}

.crowd-toast {
    pointer-events: auto;
    background: #ffffff;
    color: #0b1329;
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 14px 34px rgba(11, 19, 41, 0.22), 0 0 0 1px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    transform: translateX(120%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    border-left: 4px solid #ff542e;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.crowd-toast.active {
    transform: translateX(0);
}

.crowd-toast.toast-ai {
    border-left-color: #6366f1;
}

.crowd-toast.toast-success {
    border-left-color: #10b981;
}

.crowd-toast.toast-warning {
    border-left-color: #f59e0b;
}

.crowd-toast.toast-danger {
    border-left-color: #ef4444;
}

.crowd-toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.crowd-toast-body {
    flex: 1;
    line-height: 1.4;
}
