/**
 * NBC Tools Polish & Animation Library
 * Professional animations, effects, and component styles
 */

/* ==========================================
   DESIGN TOKENS
   ========================================== */

:root {
    /* Brand Colors - Newburgh Brewing */
    --nbc-purple: #702082;
    --nbc-purple-dark: #5A1A6A;
    --nbc-purple-light: #8B3A9F;
    --nbc-coral: #ee7470;
    --nbc-coral-dark: #D45A56;
    --nbc-coral-light: #f5a5a2;
    --nbc-mint: #98D4C4;
    --nbc-cream: #FDFBF9;
    --nbc-cream-dark: #F5F0EB;
    --nbc-dark: #2D2926;
    --nbc-gray: #6B6460;

    /* Semantic Colors */
    --nbc-success: #22c55e;
    --nbc-warning: #fbbf24;
    --nbc-error: #ef4444;
    --nbc-info: #3b82f6;

    /* Timing */
    --transition-fast: 150ms;
    --transition-normal: 250ms;
    --transition-slow: 400ms;

    /* Easing */
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-spring: cubic-bezier(0.68, -0.3, 0.265, 1.3);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}


/* ==========================================
   KEYFRAME ANIMATIONS
   ========================================== */

/* Floating/Ambient */
@keyframes nbc-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes nbc-float-subtle {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Pulse Effects */
@keyframes nbc-pulse-ring {
    0% { transform: scale(0.85); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

@keyframes nbc-pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Loading */
@keyframes nbc-spin {
    to { transform: rotate(360deg); }
}

@keyframes nbc-bounce-dot {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes nbc-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Entrances - DRAMATIC */
@keyframes nbc-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes nbc-slide-up {
    from { opacity: 0; transform: translateY(60px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes nbc-slide-down {
    from { opacity: 0; transform: translateY(-60px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes nbc-slide-left {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes nbc-slide-right {
    from { opacity: 0; transform: translateX(-60px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes nbc-scale-in {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes nbc-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Dramatic entrance with bounce */
@keyframes nbc-bounce-in {
    0% { opacity: 0; transform: scale(0.3) translateY(50px); }
    50% { opacity: 1; transform: scale(1.05) translateY(-10px); }
    70% { transform: scale(0.95) translateY(5px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Dramatic slide with overshoot */
@keyframes nbc-slide-up-bounce {
    0% { opacity: 0; transform: translateY(80px); }
    60% { opacity: 1; transform: translateY(-15px); }
    80% { transform: translateY(8px); }
    100% { transform: translateY(0); }
}

/* Toast */
@keyframes nbc-toast-in {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes nbc-toast-out {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* Progress */
@keyframes nbc-progress-fill {
    from { width: 0; }
}

@keyframes nbc-progress-indeterminate {
    0% { left: -40%; }
    100% { left: 100%; }
}

/* Border glow */
@keyframes nbc-border-glow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Badge bounce */
@keyframes nbc-badge-bounce {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.05); }
}


/* ==========================================
   ANIMATION UTILITY CLASSES
   ========================================== */

/* Float */
.nbc-float { animation: nbc-float 3s ease-in-out infinite; }
.nbc-float-delayed { animation: nbc-float 4s ease-in-out infinite 0.5s; }
.nbc-float-slow { animation: nbc-float 5s ease-in-out infinite 1s; }
.nbc-float-subtle { animation: nbc-float-subtle 3s ease-in-out infinite; }

/* Pulse */
.nbc-pulse-ring { animation: nbc-pulse-ring 1.5s ease-out infinite; }
.nbc-pulse-soft { animation: nbc-pulse-soft 2s ease-in-out infinite; }

/* Spin */
.nbc-spin { animation: nbc-spin 1s linear infinite; }
.nbc-spin-slow { animation: nbc-spin 2s linear infinite; }

/* Bounce dots - apply to container, children get staggered */
.nbc-bounce-dots > *:nth-child(1) { animation: nbc-bounce-dot 0.6s ease-in-out infinite; }
.nbc-bounce-dots > *:nth-child(2) { animation: nbc-bounce-dot 0.6s ease-in-out infinite 0.15s; }
.nbc-bounce-dots > *:nth-child(3) { animation: nbc-bounce-dot 0.6s ease-in-out infinite 0.3s; }

/* Entrance animations - DRAMATIC */
.nbc-fade-in { animation: nbc-fade-in 0.6s var(--ease-out) forwards; }
.nbc-slide-up { animation: nbc-slide-up 0.7s var(--ease-out) forwards; }
.nbc-slide-down { animation: nbc-slide-down 0.7s var(--ease-out) forwards; }
.nbc-slide-left { animation: nbc-slide-left 0.7s var(--ease-out) forwards; }
.nbc-slide-right { animation: nbc-slide-right 0.7s var(--ease-out) forwards; }
.nbc-scale-in { animation: nbc-scale-in 0.6s var(--ease-bounce) forwards; }
.nbc-pop { animation: nbc-pop 0.5s var(--ease-bounce); }
.nbc-bounce-in { animation: nbc-bounce-in 0.8s var(--ease-out) forwards; }
.nbc-slide-up-bounce { animation: nbc-slide-up-bounce 0.8s var(--ease-out) forwards; }

/* Stagger delays - apply nbc-stagger to parent, nbc-stagger-item to children */
/* Uses animation-fill-mode: both so elements are visible even if animation doesn't fire */
.nbc-stagger > .nbc-stagger-item {
    animation: nbc-stagger-fade 0.6s var(--ease-out) both;
}
@keyframes nbc-stagger-fade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.nbc-stagger > .nbc-stagger-item:nth-child(1) { animation-delay: 0.05s; }
.nbc-stagger > .nbc-stagger-item:nth-child(2) { animation-delay: 0.1s; }
.nbc-stagger > .nbc-stagger-item:nth-child(3) { animation-delay: 0.15s; }
.nbc-stagger > .nbc-stagger-item:nth-child(4) { animation-delay: 0.2s; }
.nbc-stagger > .nbc-stagger-item:nth-child(5) { animation-delay: 0.25s; }
.nbc-stagger > .nbc-stagger-item:nth-child(6) { animation-delay: 0.3s; }
.nbc-stagger > .nbc-stagger-item:nth-child(7) { animation-delay: 0.35s; }
.nbc-stagger > .nbc-stagger-item:nth-child(8) { animation-delay: 0.4s; }
.nbc-stagger > .nbc-stagger-item:nth-child(9) { animation-delay: 0.45s; }
.nbc-stagger > .nbc-stagger-item:nth-child(10) { animation-delay: 0.5s; }

/* Standalone stagger-item (without parent) should be visible */
.nbc-stagger-item:not(.nbc-stagger > *) { opacity: 1; }


/* ==========================================
   GLASSMORPHISM
   ========================================== */

.nbc-glass {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.nbc-glass-dark {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nbc-glass-light {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Light mode glass - for cream backgrounds */
.nbc-glass-cream {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(112, 32, 130, 0.1);
    box-shadow: 0 8px 32px rgba(45, 41, 38, 0.08);
}

.nbc-glass-purple {
    background: rgba(112, 32, 130, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(112, 32, 130, 0.15);
}


/* ==========================================
   GLOWS
   ========================================== */

.nbc-glow-purple { box-shadow: 0 0 30px rgba(112, 32, 130, 0.5), 0 0 60px rgba(112, 32, 130, 0.25), 0 0 100px rgba(112, 32, 130, 0.1); }
.nbc-glow-coral { box-shadow: 0 0 30px rgba(238, 116, 112, 0.5), 0 0 60px rgba(238, 116, 112, 0.25), 0 0 100px rgba(238, 116, 112, 0.1); }
.nbc-glow-mint { box-shadow: 0 0 30px rgba(152, 212, 196, 0.6), 0 0 60px rgba(152, 212, 196, 0.3); }
.nbc-glow-success { box-shadow: 0 0 30px rgba(34, 197, 94, 0.5), 0 0 60px rgba(34, 197, 94, 0.2); }
.nbc-glow-warning { box-shadow: 0 0 30px rgba(251, 191, 36, 0.5), 0 0 60px rgba(251, 191, 36, 0.2); }
.nbc-glow-error { box-shadow: 0 0 30px rgba(239, 68, 68, 0.5), 0 0 60px rgba(239, 68, 68, 0.2); }

/* Animated glow - constantly pulsing */
.nbc-glow-animated {
    animation: nbc-glow-pulse 2s ease-in-out infinite;
}

/* Rainbow border animation */
@keyframes nbc-rainbow-border {
    0% { border-color: #702082; box-shadow: 0 0 20px rgba(112, 32, 130, 0.5); }
    33% { border-color: #ee7470; box-shadow: 0 0 20px rgba(238, 116, 112, 0.5); }
    66% { border-color: #98D4C4; box-shadow: 0 0 20px rgba(152, 212, 196, 0.5); }
    100% { border-color: #702082; box-shadow: 0 0 20px rgba(112, 32, 130, 0.5); }
}

.nbc-rainbow-border {
    border: 3px solid #702082;
    animation: nbc-rainbow-border 3s ease-in-out infinite;
}


/* ==========================================
   TEXT GRADIENT
   ========================================== */

.nbc-text-gradient {
    background: linear-gradient(135deg, #702082 0%, #ee7470 50%, #702082 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nbc-text-gradient-coral {
    background: linear-gradient(135deg, #ee7470 0%, #f5a5a2 50%, #ee7470 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ==========================================
   HOVER EFFECTS
   ========================================== */

/* Lift on hover - DRAMATIC */
.nbc-hover-lift {
    transition: transform 0.4s var(--ease-spring),
                box-shadow 0.4s var(--ease-out);
}
.nbc-hover-lift:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 0 0 30px rgba(112, 32, 130, 0.15);
}

/* Scale on hover - DRAMATIC */
.nbc-hover-scale {
    transition: transform 0.4s var(--ease-spring);
}
.nbc-hover-scale:hover {
    transform: scale(1.08);
}

/* Glow on hover - DRAMATIC */
.nbc-hover-glow {
    transition: box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}
.nbc-hover-glow:hover {
    box-shadow: 0 0 40px rgba(112, 32, 130, 0.5), 0 0 80px rgba(112, 32, 130, 0.2), 0 20px 40px rgba(0,0,0,0.2);
}

.nbc-hover-glow-coral {
    transition: box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}
.nbc-hover-glow-coral:hover {
    box-shadow: 0 0 40px rgba(238, 116, 112, 0.5), 0 0 80px rgba(238, 116, 112, 0.2), 0 20px 40px rgba(0,0,0,0.2);
}

/* 3D Tilt effect - DRAMATIC */
.nbc-tilt {
    transition: transform 0.4s var(--ease-out),
                box-shadow 0.4s var(--ease-out);
    transform-style: preserve-3d;
}
.nbc-tilt:hover {
    transform: perspective(800px) rotateX(4deg) rotateY(-4deg) scale(1.05);
    box-shadow: 20px 30px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(112, 32, 130, 0.2);
}

/* List item slide - DRAMATIC */
.nbc-hover-slide {
    transition: transform 0.3s var(--ease-spring),
                background-color 0.3s var(--ease-out);
}
.nbc-hover-slide:hover {
    transform: translateX(12px);
    background-color: rgba(255, 255, 255, 0.1);
}

/* NEW: Dramatic glow pulse on hover */
.nbc-hover-pulse {
    transition: all 0.3s var(--ease-out);
}
.nbc-hover-pulse:hover {
    animation: nbc-glow-pulse 1.5s ease-in-out infinite;
}

@keyframes nbc-glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(112, 32, 130, 0.4); }
    50% { box-shadow: 0 0 50px rgba(112, 32, 130, 0.7), 0 0 80px rgba(238, 116, 112, 0.3); }
}


/* ==========================================
   BUTTONS
   ========================================== */

/* Primary button */
.nbc-btn-primary {
    background: var(--nbc-purple);
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nbc-btn-primary:hover {
    background: var(--nbc-purple-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(112, 32, 130, 0.4);
}
.nbc-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(112, 32, 130, 0.3);
}
.nbc-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Coral button variant */
.nbc-btn-coral {
    background: var(--nbc-coral);
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nbc-btn-coral:hover {
    background: var(--nbc-coral-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(238, 116, 112, 0.4);
}
.nbc-btn-coral:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(238, 116, 112, 0.3);
}

/* Secondary button */
.nbc-btn-secondary {
    background: transparent;
    color: white;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all var(--transition-normal) var(--ease-out);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nbc-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Ghost button */
.nbc-btn-ghost {
    background: transparent;
    color: var(--nbc-purple);
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 12px;
    border: 2px solid var(--nbc-purple);
    cursor: pointer;
    transition: all var(--transition-normal) var(--ease-out);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nbc-btn-ghost:hover {
    background: var(--nbc-purple);
    color: white;
}

/* Animated border button */
.nbc-btn-animated-border {
    background: linear-gradient(90deg, #702082, #ee7470, #98D4C4, #ee7470, #702082);
    background-size: 300% 300%;
    animation: nbc-border-glow 3s ease infinite;
    padding: 2px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
}
.nbc-btn-animated-border > span {
    display: block;
    background: var(--nbc-dark);
    padding: 12px 24px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    transition: background var(--transition-normal);
}
.nbc-btn-animated-border:hover > span {
    background: var(--nbc-purple-dark);
}

/* Ripple effect (add to any button) */
.nbc-ripple {
    position: relative;
    overflow: hidden;
}
.nbc-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}
.nbc-ripple:active::after {
    transform: scale(0);
    opacity: 0.3;
    transition: 0s;
}

/* Icon button */
.nbc-btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast) var(--ease-out);
}
.nbc-btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}


/* ==========================================
   FORM INPUTS
   ========================================== */

.nbc-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    width: 100%;
    transition: all var(--transition-normal) var(--ease-out);
}
.nbc-input:focus {
    outline: none;
    border-color: var(--nbc-purple);
    box-shadow: 0 0 0 3px rgba(112, 32, 130, 0.2);
    background: rgba(255, 255, 255, 0.08);
}
.nbc-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.nbc-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Input with icon (wrap input in .nbc-input-icon-wrapper) */
.nbc-input-icon-wrapper {
    position: relative;
}
.nbc-input-icon-wrapper .nbc-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}
.nbc-input-icon-wrapper .nbc-input {
    padding-left: 40px;
}

/* Select */
.nbc-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    width: 100%;
    cursor: pointer;
    transition: all var(--transition-normal) var(--ease-out);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.nbc-select:focus {
    outline: none;
    border-color: var(--nbc-purple);
    box-shadow: 0 0 0 3px rgba(112, 32, 130, 0.2);
}
.nbc-select option {
    background: var(--nbc-dark);
    color: white;
}


/* ==========================================
   TOGGLE SWITCH
   ========================================== */

.nbc-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    cursor: pointer;
    display: inline-block;
}
.nbc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.nbc-toggle-track {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 13px;
    transition: background var(--transition-normal) var(--ease-out);
}
.nbc-toggle input:checked + .nbc-toggle-track {
    background: var(--nbc-coral);
}
.nbc-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-normal) var(--ease-spring);
}
.nbc-toggle input:checked ~ .nbc-toggle-thumb {
    transform: translateX(22px);
}


/* ==========================================
   CHECKBOX
   ========================================== */

.nbc-checkbox {
    position: relative;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: inline-block;
}
.nbc-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.nbc-checkbox-box {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    transition: all var(--transition-normal) var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
}
.nbc-checkbox input:checked + .nbc-checkbox-box {
    background: var(--nbc-coral);
    border-color: var(--nbc-coral);
}
.nbc-checkbox-icon {
    width: 12px;
    height: 12px;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition-normal) var(--ease-spring);
}
.nbc-checkbox input:checked + .nbc-checkbox-box .nbc-checkbox-icon {
    opacity: 1;
    transform: scale(1);
}


/* ==========================================
   PROGRESS BAR
   ========================================== */

.nbc-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}
.nbc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--nbc-purple), var(--nbc-coral));
    border-radius: 4px;
    transition: width var(--transition-slow) var(--ease-out);
}
.nbc-progress-fill.animated {
    animation: nbc-progress-fill 1s var(--ease-out) forwards;
}

/* Indeterminate */
.nbc-progress-indeterminate .nbc-progress-fill {
    width: 40%;
    position: relative;
    animation: nbc-progress-indeterminate 1.5s ease-in-out infinite;
}


/* ==========================================
   STATUS INDICATORS
   ========================================== */

.nbc-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}
.nbc-status-dot.online { background: var(--nbc-success); }
.nbc-status-dot.warning { background: var(--nbc-warning); }
.nbc-status-dot.offline { background: var(--nbc-error); }
.nbc-status-dot.idle { background: rgba(255, 255, 255, 0.4); }

/* Pulsing variant */
.nbc-status-dot.pulse::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: nbc-pulse-ring 1.5s ease-out infinite;
}


/* ==========================================
   BADGES
   ========================================== */

.nbc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    line-height: 1.4;
}
.nbc-badge-purple { background: rgba(112, 32, 130, 0.15); color: var(--nbc-purple); }
.nbc-badge-coral { background: rgba(238, 116, 112, 0.2); color: var(--nbc-coral-dark); }
.nbc-badge-mint { background: rgba(152, 212, 196, 0.3); color: #0d6b56; }
.nbc-badge-green { background: var(--nbc-success); color: white; }
.nbc-badge-red { background: var(--nbc-error); color: white; }
.nbc-badge-yellow { background: var(--nbc-warning); color: #1a1a1a; }
.nbc-badge-blue { background: var(--nbc-info); color: white; }

/* Notification count badge */
.nbc-badge-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    border-radius: 9px;
}
.nbc-badge-count.bounce {
    animation: nbc-badge-bounce 0.5s var(--ease-out);
}


/* ==========================================
   SKELETON LOADING
   ========================================== */

.nbc-skeleton {
    background: rgba(255, 255, 255, 0.08);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: nbc-shimmer 1.5s infinite;
    border-radius: 8px;
}

/* Common skeleton shapes */
.nbc-skeleton-text { height: 16px; }
.nbc-skeleton-title { height: 24px; width: 60%; }
.nbc-skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }
.nbc-skeleton-button { height: 44px; width: 120px; border-radius: 12px; }
.nbc-skeleton-card { height: 120px; border-radius: 16px; }


/* ==========================================
   CARDS
   ========================================== */

.nbc-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
}

.nbc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.nbc-card-title {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
}


/* ==========================================
   TOOLTIPS
   ========================================== */

.nbc-tooltip-wrapper {
    position: relative;
}
.nbc-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast) var(--ease-out);
    pointer-events: none;
    z-index: 100;
}
.nbc-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}
.nbc-tooltip-wrapper:hover .nbc-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}


/* ==========================================
   TOAST CONTAINER
   ========================================== */

.nbc-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nbc-toast {
    background: rgba(45, 41, 38, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    animation: nbc-toast-in 0.3s var(--ease-out) forwards;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.nbc-toast.hiding {
    animation: nbc-toast-out 0.3s var(--ease-out) forwards;
}
.nbc-toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.nbc-toast-message {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    color: white;
}
.nbc-toast-close {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    flex-shrink: 0;
    transition: color var(--transition-fast);
}
.nbc-toast-close:hover {
    color: white;
}

/* Toast variants */
.nbc-toast.success { border-color: rgba(34, 197, 94, 0.3); }
.nbc-toast.success .nbc-toast-icon { color: var(--nbc-success); }

.nbc-toast.error { border-color: rgba(239, 68, 68, 0.3); }
.nbc-toast.error .nbc-toast-icon { color: var(--nbc-error); }

.nbc-toast.warning { border-color: rgba(251, 191, 36, 0.3); }
.nbc-toast.warning .nbc-toast-icon { color: var(--nbc-warning); }

.nbc-toast.info { border-color: rgba(59, 130, 246, 0.3); }
.nbc-toast.info .nbc-toast-icon { color: var(--nbc-info); }


/* ==========================================
   MODAL
   ========================================== */

.nbc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal) var(--ease-out);
    z-index: 900;
}
.nbc-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.nbc-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: rgba(112, 32, 130, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal) var(--ease-out);
    z-index: 901;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}
.nbc-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.nbc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.nbc-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
}
.nbc-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.nbc-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}


/* ==========================================
   EMPTY STATE
   ========================================== */

.nbc-empty-state {
    text-align: center;
    padding: 48px 24px;
}
.nbc-empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    animation: nbc-float 3s ease-in-out infinite;
}
.nbc-empty-state-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}
.nbc-empty-state-description {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    max-width: 300px;
    margin: 0 auto;
}


/* ==========================================
   CUSTOM SCROLLBAR
   ========================================== */

.nbc-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.nbc-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}
.nbc-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}
.nbc-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}


/* ==========================================
   TAB INDICATOR
   ========================================== */

.nbc-tabs {
    position: relative;
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
}
.nbc-tab {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: color var(--transition-normal);
}
.nbc-tab.active {
    color: white;
}
.nbc-tab-indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    background: var(--nbc-purple);
    border-radius: 8px;
    transition: all var(--transition-normal) var(--ease-spring);
    z-index: 0;
}


/* ==========================================
   TOAST MOBILE FIXES
   ========================================== */

@media (max-width: 768px) {
    .nbc-toast-container {
        bottom: 16px;
        right: 12px;
        left: 12px;
    }
    .nbc-toast {
        min-width: 0;
        max-width: 100%;
    }
}


/* ==========================================
   PULL-TO-REFRESH
   ========================================== */

.nbc-ptr {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
    transform: translateY(-100%);
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    opacity: 0;
    background: #702082;
    color: white;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.nbc-ptr.pulling {
    transition: none;
}

.nbc-ptr.visible {
    opacity: 1;
}

.nbc-ptr.refreshing {
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.3s ease-out;
}

.nbc-ptr-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    transition: transform 0.1s linear;
}

.nbc-ptr.refreshing .nbc-ptr-spinner {
    animation: nbc-spin 0.6s linear infinite;
}

@keyframes nbc-spin {
    to { transform: rotate(360deg); }
}


/* ==========================================
   REDUCED MOTION PREFERENCE
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .nbc-float, .nbc-float-delayed, .nbc-float-slow, .nbc-float-subtle,
    .nbc-pulse-ring, .nbc-pulse-soft,
    .nbc-spin, .nbc-spin-slow,
    .nbc-glow-animated,
    .nbc-rainbow-border {
        animation: none !important;
    }

    .nbc-hover-lift:hover { transform: none; }
    .nbc-hover-scale:hover { transform: none; }
    .nbc-tilt:hover { transform: none; }
    .nbc-hover-slide:hover { transform: none; }

    .nbc-skeleton {
        animation: none !important;
        background: rgba(255, 255, 255, 0.08);
    }
}
