/**
 * Transtoyou Tooltips
 * Clean, modern tooltip design
 */

/* ========================================
   Root Variables
   ======================================== */

:root {
    /* Light theme (default) */
    --tty-tooltip-bg: #ffffff;
    --tty-tooltip-text: #121212;
    --tty-tooltip-border: rgba(0, 95, 95, 0.08);
    --tty-tooltip-shadow: 0 2px 8px rgba(0, 0, 0, 0.04),
                         0 1px 2px rgba(0, 0, 0, 0.02);
    --tty-tooltip-arrow-size: 6px;
}
/* Dark theme */
[data-theme="dark"] {
    --tty-tooltip-bg: #1a1a1a;
    --tty-tooltip-text: #f0f0f0;
    --tty-tooltip-border: rgba(255, 255, 255, 0.06);
    --tty-tooltip-shadow: 0 2px 12px rgba(0, 0, 0, 0.2),
                         0 1px 3px rgba(0, 0, 0, 0.1);
}
/* ========================================
   Base Tooltip Reset
   ======================================== */

.tippy-box {
    background: none !important;
    color: inherit !important;
    max-width: 320px;
}

/* ========================================
   Default Tooltip Style
   ======================================== */

.tippy-box[data-theme~="tty-default"] .tippy-content,
.tippy-box[data-theme~="tty-info"] .tippy-content,
.tippy-box[data-theme~="tty-primary"] .tippy-content,
.tippy-box[data-theme~="tty-success"] .tippy-content,
.tippy-box[data-theme~="tty-warning"] .tippy-content,
.tippy-box[data-theme~="tty-error"] .tippy-content {
    background: var(--tty-tooltip-bg) !important;
    color: var(--tty-tooltip-text) !important;
    border: 1px solid var(--tty-tooltip-border) !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    font-family: 'Figtree', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    box-shadow: var(--tty-tooltip-shadow) !important;
    position: relative !important;
}

/* Fix voor de box zelf */
.tippy-box[data-theme~="tty-default"],
.tippy-box[data-theme~="tty-info"],
.tippy-box[data-theme~="tty-primary"],
.tippy-box[data-theme~="tty-success"],
.tippy-box[data-theme~="tty-warning"],
.tippy-box[data-theme~="tty-error"] {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}


/* Force alle content in tooltips naar dezelfde styling */
.tippy-box[data-theme~="tty-default"] .tippy-content *,
.tippy-box[data-theme~="tty-info"] .tippy-content *,
.tippy-box[data-theme~="tty-primary"] .tippy-content *,
.tippy-box[data-theme~="tty-success"] .tippy-content *,
.tippy-box[data-theme~="tty-warning"] .tippy-content *,
.tippy-box[data-theme~="tty-error"] .tippy-content * {
    font-family: 'Figtree', sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
    color: inherit !important;
}

/* Specifiek voor strong/bold text */
.tippy-box[data-theme~="tty-default"] .tippy-content strong,
.tippy-box[data-theme~="tty-info"] .tippy-content strong,
.tippy-box[data-theme~="tty-primary"] .tippy-content strong,
.tippy-box[data-theme~="tty-success"] .tippy-content strong,
.tippy-box[data-theme~="tty-warning"] .tippy-content strong,
.tippy-box[data-theme~="tty-error"] .tippy-content strong {
    font-weight: 600 !important;
}

/* Fix list styling */
.tippy-box .tippy-content ul,
.tippy-box .tippy-content ol {
    margin: 8px 0 !important;
    padding-left: 20px !important;
}

.tippy-box .tippy-content li {
    margin-bottom: 6px !important;
    line-height: 1.5 !important;
}

.tippy-box .tippy-content p {
    margin: 8px 0 !important;
}

/* Eerste en laatste p/ul geen margin */
.tippy-box .tippy-content > p:first-child,
.tippy-box .tippy-content > ul:first-child {
    margin-top: 0 !important;
}

.tippy-box .tippy-content > p:last-child,
.tippy-box .tippy-content > ul:last-child {
    margin-bottom: 0 !important;
}



/* ========================================
   Custom Arrow Design
   ======================================== */

/* Hide default Tippy arrow */
.tippy-arrow {
    width: 14px;
    height: 14px;
    overflow: hidden;
}

.tippy-arrow::before {
    display: none !important;
}

/* Create custom arrow */
.tippy-arrow::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--tty-tooltip-bg);
    border: 1px solid var(--tty-tooltip-border);
    transform: rotate(45deg);
    border-radius: 2px;
}

/* Position arrows for each placement */
.tippy-box[data-placement^="top"] .tippy-arrow {
    bottom: -5px;
}

.tippy-box[data-placement^="top"] .tippy-arrow::after {
    top: 0px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    border-top: none;
    border-left: none;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.02);;
}

.tippy-box[data-placement^="bottom"] .tippy-arrow {
    top: -5px;
}

.tippy-box[data-placement^="bottom"] .tippy-arrow::after {
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    border-bottom: none;
    border-right: none;
    box-shadow: -1px -1px 2px rgba(0, 0, 0, 0.02);
}

.tippy-box[data-placement^="left"] .tippy-arrow {
    right: -5px;
}

.tippy-box[data-placement^="left"] .tippy-arrow::after {
    left: -5px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    border-left: none;
    border-bottom: none;
    box-shadow: 1px -1px 2px rgba(0, 0, 0, 0.02);
}

.tippy-box[data-placement^="right"] .tippy-arrow {
    left: -5px;
}

.tippy-box[data-placement^="right"] .tippy-arrow::after {
    right: -5px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    border-right: none;
    border-top: none;
    box-shadow: -1px 1px 2px rgba(0, 0, 0, 0.02);
}

/* ========================================
   Theme Variations
   ======================================== */

/* Primary Theme (Teal) */
.tippy-box[data-theme~="tty-primary"] .tippy-content {
    background: var(--tty-primary);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 3px 12px rgba(0, 95, 95, 0.15),
                0 1px 3px rgba(0, 95, 95, 0.08);
}

.tippy-box[data-theme~="tty-primary"] .tippy-content ul,
.tippy-box[data-theme~="tty-primary"] .tippy-content li {
    font-size: 14px;
}

.tippy-box[data-theme~="tty-primary"] .tippy-arrow::after {
    background: var(--tty-primary);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Info Theme (Soft Blue) */
.tippy-box[data-theme~="tty-info"] .tippy-content {
    background: #f0f8ff;
    color: #0066cc;
    border: 1px solid rgba(0, 102, 204, 0.12);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.05),
                0 1px 2px rgba(0, 102, 204, 0.02);
}

.tippy-box[data-theme~="tty-info"] .tippy-content ul,
.tippy-box[data-theme~="tty-info"] .tippy-content li {
    font-size: 14px;
}

.tippy-box[data-theme~="tty-info"] .tippy-arrow::after {
    background: #f0f8ff;
    border-color: rgba(0, 102, 204, 0.15);
}

[data-theme="dark"] .tippy-box[data-theme~="tty-info"] .tippy-content {
    background: rgba(0, 102, 204, 0.15);
    color: #66b3ff;
    border-color: rgba(102, 179, 255, 0.2);
}

[data-theme="dark"] .tippy-box[data-theme~="tty-info"] .tippy-content ul,
[data-theme="dark"] .tippy-box[data-theme~="tty-info"] .tippy-content li {
    font-size: 14px;
}

[data-theme="dark"] .tippy-box[data-theme~="tty-info"] .tippy-arrow::after {
    background: rgba(0, 102, 204, 0.15);
    border-color: rgba(102, 179, 255, 0.2);
}

/* Success Theme (Green) */
.tippy-box[data-theme~="tty-success"] .tippy-content {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.15);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.05),
                0 1px 2px rgba(34, 197, 94, 0.02);
}

.tippy-box[data-theme~="tty-success"] .tippy-content ul,
.tippy-box[data-theme~="tty-success"] .tippy-content li {
    font-size: 14px;
}

.tippy-box[data-theme~="tty-success"] .tippy-arrow::after {
    background: #f0fdf4;
    border-color: rgba(34, 197, 94, 0.2);
}

[data-theme="dark"] .tippy-box[data-theme~="tty-success"] .tippy-content {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border-color: rgba(134, 239, 172, 0.2);
}

[data-theme="dark"] .tippy-box[data-theme~="tty-success"] .tippy-content ul,
[data-theme="dark"] .tippy-box[data-theme~="tty-success"] .tippy-content li {
    font-size: 14px;
}

[data-theme="dark"] .tippy-box[data-theme~="tty-success"] .tippy-arrow::after {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(134, 239, 172, 0.2);
}

/* Warning Theme (Orange) */
.tippy-box[data-theme~="tty-warning"] .tippy-content {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid rgba(251, 146, 60, 0.15);
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.05),
                0 1px 2px rgba(251, 146, 60, 0.02);
}

.tippy-box[data-theme~="tty-warning"] .tippy-content ul,
.tippy-box[data-theme~="tty-warning"] .tippy-content li {
    font-size: 14px;
}

.tippy-box[data-theme~="tty-warning"] .tippy-arrow::after {
    background: #fffbeb;
    border-color: rgba(251, 146, 60, 0.2);
}

[data-theme="dark"] .tippy-box[data-theme~="tty-warning"] .tippy-content {
    background: rgba(251, 146, 60, 0.15);
    color: #fdba74;
    border-color: rgba(253, 186, 116, 0.2);
}

[data-theme="dark"] .tippy-box[data-theme~="tty-warning"] .tippy-content ul,
[data-theme="dark"] .tippy-box[data-theme~="tty-warning"] .tippy-content li {
    font-size: 14px;
}

[data-theme="dark"] .tippy-box[data-theme~="tty-warning"] .tippy-arrow::after {
    background: rgba(251, 146, 60, 0.15);
    border-color: rgba(253, 186, 116, 0.2);
}

/* Error Theme (Red) */
.tippy-box[data-theme~="tty-error"] .tippy-content {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.15);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.05),
                0 1px 2px rgba(239, 68, 68, 0.02);
}

.tippy-box[data-theme~="tty-error"] .tippy-content ul,
.tippy-box[data-theme~="tty-error"] .tippy-content li {
    font-size: 14px;
}

.tippy-box[data-theme~="tty-error"] .tippy-arrow::after {
    background: #fef2f2;
    border-color: rgba(239, 68, 68, 0.2);
}

[data-theme="dark"] .tippy-box[data-theme~="tty-error"] .tippy-content {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(252, 165, 165, 0.2);
}

[data-theme="dark"] .tippy-box[data-theme~="tty-error"] .tippy-content ul,
[data-theme="dark"] .tippy-box[data-theme~="tty-error"] .tippy-content li {
    font-size: 14px;
}

[data-theme="dark"] .tippy-box[data-theme~="tty-error"] .tippy-arrow::after {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(252, 165, 165, 0.2);
}

/* ========================================
   Size Modifiers
   ======================================== */

/* Small */
.tippy-box[data-theme~="tty-small"] .tippy-content {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 8px;
}

.tippy-box[data-theme~="tty-small"] .tippy-content ul,
.tippy-box[data-theme~="tty-small"] .tippy-content li {
    font-size: 12px !important;
}

/* Large */
.tippy-box[data-theme~="tty-large"] .tippy-content {
    padding: 14px 18px;
    font-size: 15px;
    border-radius: 12px;
    max-width: 400px;
}

.tippy-box[data-theme~="tty-large"] .tippy-content ul,
.tippy-box[data-theme~="tty-large"] .tippy-content li {
    font-size: 15px !important;
}

/* ========================================
   Special Purpose Tooltips
   ======================================== */

/* Product Indicators */
.tippy-box[data-theme~="tty-indicator"] .tippy-content {
    text-align: center;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
}

.tippy-box[data-theme~="tty-indicator"] .tippy-content ul,
.tippy-box[data-theme~="tty-indicator"] .tippy-content li {
    font-size: 13px;
}

/* Interactive Tooltips */
.tippy-box[data-interactive="true"] .tippy-content {
    cursor: default;
    user-select: text;
}

.tippy-box[data-interactive="true"]:hover .tippy-content {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06),
                0 1px 3px rgba(0, 0, 0, 0.03);
}

/* ========================================
   Animations
   ======================================== */

/* Smooth entrance */
.tippy-box[data-state="visible"] {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tippy-box[data-state="hidden"] {
    transition: all 0.15s cubic-bezier(0.4, 0, 1, 1);
    opacity: 0;
}

/* Scale animation */
.tippy-box[data-animation="scale"][data-state="hidden"] {
    transform: scale(0.96);
    opacity: 0;
}

.tippy-box[data-animation="scale"][data-state="visible"] {
    transform: scale(1);
    opacity: 1;
}

/* Fade animation */
.tippy-box[data-animation="fade"][data-state="hidden"] {
    opacity: 0;
}

.tippy-box[data-animation="fade"][data-state="visible"] {
    opacity: 1;
}

/* Shift animation based on placement */
.tippy-box[data-animation="shift"][data-placement^="top"][data-state="hidden"] {
    transform: translateY(4px);
    opacity: 0;
}

.tippy-box[data-animation="shift"][data-placement^="bottom"][data-state="hidden"] {
    transform: translateY(-4px);
    opacity: 0;
}

.tippy-box[data-animation="shift"][data-placement^="left"][data-state="hidden"] {
    transform: translateX(4px);
    opacity: 0;
}

.tippy-box[data-animation="shift"][data-placement^="right"][data-state="hidden"] {
    transform: translateX(-4px);
    opacity: 0;
}

.tippy-box[data-animation="shift"][data-state="visible"] {
    transform: translate(0);
    opacity: 1;
}

/* ========================================
   Content Styling
   ======================================== */

/* Rich content */
.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tooltip-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--tty-tooltip-text);
    margin-bottom: 4px;
}

.tooltip-description {
    line-height: 1.5;
    opacity: 0.85;
}

/* Lists in tooltips */
.tooltip-list {
    margin: 4px 0 0 0;
    padding-left: 16px;
    font-size: 13px;
}

.tooltip-list li {
    margin-bottom: 4px;
    font-size: 13px;
}

/* Force ul/li font sizes in all tooltip content */
.tippy-content ul {
    font-size: inherit !important;
}

.tippy-content li {
    font-size: inherit !important;
}

/* Links in tooltips */
.tippy-content a {
    color: var(--tty-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tippy-content a:hover {
    text-decoration: none;
}

/* Code in tooltips */
.tippy-content code {
    background: rgba(0, 0, 0, 0.05);
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: monospace;
}

[data-theme="dark"] .tippy-content code {
    background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   Trigger Elements
   ======================================== */

/* Tooltip triggers */
[data-tooltip] {
    cursor: help;
}

/* Info icons */
.info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: var(--tty-text-secondary);
    cursor: help;
    transition: color 0.2s ease;
}

.info-tooltip:hover {
    color: var(--tty-primary);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 640px) {
    .tippy-box {
        max-width: calc(100vw - 32px);
    }
    
    .tippy-content {
        font-size: 13px;
        padding: 8px 12px;
    }

    .tippy-content ul,
    .tippy-content li {
        font-size: 13px !important;
    }
}

/* ========================================
   Accessibility
   ======================================== */

/* Focus states */
[data-tooltip]:focus-visible {
    outline: 2px solid var(--tty-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .tippy-box {
        transition: none !important;
        animation: none !important;
    }
}

/* High contrast */
@media (prefers-contrast: high) {
    .tippy-content {
        border-width: 2px;
    }
}

/* ========================================
   Z-index Management
   ======================================== */

.tippy-box {
    z-index: 9999;
}

/* ========================================
   Performance Optimizations
   ======================================== */

/* Use hardware acceleration */
.tippy-box {
    will-change: transform, opacity;
}

/* Disable expensive effects on low-end devices */
@media (max-width: 640px), (hover: none) {
    .tippy-content {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    }
}