/* --- ALERT VARIABLES --- */
:root {
    --success-color: #10c45c;
    --success-bg: #eafbf1;
    
    --error-color: #e63946;
    --error-bg: #fdedef;
    
    --warning-color: #f39c12;
    --warning-bg: #fef5e7;
    
    --info-color: #4361ee;
    --info-bg: #ecf0fd;
}

/* --- 1. STATIC ALERTS STYLE --- */
.custom-alert {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    border-left: 5px solid #ccc; /* Default */
    position: relative;
    transition: 0.3s;
}

/* Icons */
.alert-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    display: flex;
    align-items: center;
    height: 100%;
    margin-top: 2px;
}

/* Content */
.alert-content h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

.alert-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Close Button */
.close-alert {
    position: absolute;
    top: 15px; right: 15px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
}
.close-alert:hover { color: #333; }

/* --- COLOR VARIANTS --- */

/* Success */
.custom-alert.alert-success { border-left-color: var(--success-color); }
.custom-alert.alert-success .alert-icon { color: var(--success-color); }

/* Error */
.custom-alert.alert-error { border-left-color: var(--error-color); }
.custom-alert.alert-error .alert-icon { color: var(--error-color); }

/* Warning */
.custom-alert.alert-warning { border-left-color: var(--warning-color); }
.custom-alert.alert-warning .alert-icon { color: var(--warning-color); }

/* Info */
.custom-alert.alert-info { border-left-color: var(--info-color); }
.custom-alert.alert-info .alert-icon { color: var(--info-color); }


/* --- 2. TOAST NOTIFICATIONS (Floating) --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toast-box {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 300px;
    border-left: 5px solid #ccc;
    animation: slideIn 0.5s ease forwards;
    opacity: 0;
    transform: translateX(100%);
}

@keyframes slideIn {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
    to { opacity: 0; transform: translateX(100%); }
}

/* Toast Text Styling is same as Alert */
.toast-box h4 { font-size: 0.95rem; margin: 0; font-weight: 600; color: #333; }
.toast-box i { font-size: 1.2rem; margin-right: 15px; }

/* Toast Variants */
.toast-success { border-left-color: var(--success-color); }
.toast-success i { color: var(--success-color); }

.toast-error { border-left-color: var(--error-color); }
.toast-error i { color: var(--error-color); }

.toast-warning { border-left-color: var(--warning-color); }
.toast-warning i { color: var(--warning-color); }

.toast-info { border-left-color: var(--info-color); }
.toast-info i { color: var(--info-color); }

/* --- EXISTING ALERTS & TOASTS (Keep existing code) --- */
/* (Aapka purana Alert aur Toast code yahan hona chahiye) */

/* ... (Existing Alert Code) ... */

/* =========================================
   NEW COMPONENTS: BADGES
   ========================================= */

.badge {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px; /* Default square-ish */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
}

/* 1. Soft Badges (Light BG, Dark Text) - Very Modern */
.badge-soft-primary { background: #e3f2fd; color: #2196f3; }
.badge-soft-success { background: #eafbf1; color: #10c45c; }
.badge-soft-warning { background: #fff8e1; color: #f39c12; }
.badge-soft-danger  { background: #fdedef; color: #e63946; }
.badge-soft-info    { background: #ecf0fd; color: #4361ee; }

/* 2. Solid Badges */
.badge-solid-primary { background: var(--primary); color: white; }
.badge-solid-success { background: #10c45c; color: white; }
.badge-solid-warning { background: #f39c12; color: white; }
.badge-solid-danger  { background: #e63946; color: white; }

/* 3. Outline Badges */
.badge-outline-primary { border: 1px solid var(--primary); color: var(--primary); background: transparent; }
.badge-outline-success { border: 1px solid #10c45c; color: #10c45c; background: transparent; }

/* 4. Shapes */
.badge-pill { border-radius: 50px; } /* Rounded Pill */

/* 5. Status Dots */
.badge-dot-container {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.9rem; font-weight: 500; color: #555;
    background: #f9f9f9; padding: 5px 12px; border-radius: 50px; border: 1px solid #eee;
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-success { background: #10c45c; box-shadow: 0 0 0 2px rgba(16, 196, 92, 0.2); }
.dot-warning { background: #f39c12; box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.2); }
.dot-danger  { background: #e63946; box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.2); }


/* =========================================
   NEW COMPONENTS: PROGRESS INDICATORS
   ========================================= */

/* Linear Bar */
.progress-track {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.fill-primary { background: var(--secondary); } /* Green */
.fill-success { background: #2196f3; } /* Blue */

/* Striped Animation */
.progress-striped {
    background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% { background-position: 1rem 0; }
    100% { background-position: 0 0; }
}

/* Circular Spinner */
.spinner {
    width: 30px; height: 30px;
    border: 3px solid #eee;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-primary { border-top-color: var(--primary); }
.spinner-success { border-top-color: var(--secondary); }
.spinner-sm { width: 20px; height: 20px; border-width: 2px; }

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* =========================================
   NEW COMPONENTS: TOOLTIPS (CSS Only)
   ========================================= */

/* Base Styles */
[data-tooltip] {
    position: relative;
    cursor: pointer;
}

/* Tooltip Body */
[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    background: #333;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    z-index: 100;
    pointer-events: none; /* Mouse won't stick on tooltip */
}

/* Tooltip Arrow */
[data-tooltip]::after {
    content: '';
    position: absolute;
    border: 5px solid transparent;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    z-index: 100;
}

/* Hover State */
[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* --- POSITIONS --- */

/* Top (Default) */
[data-position="top"]::before { bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-8px); }
[data-position="top"]::after  { bottom: 100%; left: 50%; transform: translateX(-50%); border-top-color: #333; }

/* Bottom */
[data-position="bottom"]::before { top: 100%; left: 50%; transform: translateX(-50%) translateY(8px); }
[data-position="bottom"]::after  { top: 100%; left: 50%; transform: translateX(-50%); border-bottom-color: #333; }

/* Left */
[data-position="left"]::before { top: 50%; right: 100%; transform: translateY(-50%) translateX(-8px); }
[data-position="left"]::after  { top: 50%; right: 100%; transform: translateY(-50%); border-left-color: #333; }

/* Right */
[data-position="right"]::before { top: 50%; left: 100%; transform: translateY(-50%) translateX(8px); }
[data-position="right"]::after  { top: 50%; left: 100%; transform: translateY(-50%); border-right-color: #333; }