/**
 * EİAU News Booster Custom Styles
 * Modern, clean, fluid layouts and glowing animated tags.
 */

:root {
    --eiau-theme-color: #1e3a8a;
    --eiau-theme-glow: #1e3a8a33;
    --eiau-text-dark: #0f172a;
    --eiau-text-light: #f8fafc;
    --eiau-red: #dc2626;
    --eiau-red-glow: rgba(220, 38, 38, 0.4);
    --eiau-green: #10b981;
    --eiau-green-glow: rgba(16, 185, 129, 0.4);
    --eiau-yellow: #f59e0b;
    --eiau-yellow-glow: rgba(245, 158, 11, 0.4);
    --eiau-purple: #8b5cf6;
    --eiau-purple-glow: rgba(139, 92, 246, 0.4);
}

/* --- IMAGE WATERMARK STYLE & ANIMATIONS --- */
.eiau-watermark-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.eiau-image-watermark {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    user-select: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.95);
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}

/* Watermark Animations */
.eiau-watermark-anim-pulse {
    animation: eiau-wm-pulse 2.5s infinite ease-in-out;
}
@keyframes eiau-wm-pulse {
    0% { opacity: 0.6; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1.04); }
    100% { opacity: 0.6; transform: scale(0.98); }
}

.eiau-watermark-anim-float {
    animation: eiau-wm-float 3s infinite ease-in-out;
}
@keyframes eiau-wm-float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

.eiau-watermark-anim-slide {
    animation: eiau-wm-slide 4s infinite ease-in-out;
}
@keyframes eiau-wm-slide {
    0% { transform: translateX(-3px); }
    50% { transform: translateX(3px); }
    100% { transform: translateX(-3px); }
}

.eiau-watermark-anim-glow {
    animation: eiau-wm-glow 2s infinite ease-in-out;
}
@keyframes eiau-wm-glow {
    0% { box-shadow: 0 0 4px rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.15); }
    50% { box-shadow: 0 0 16px var(--eiau-theme-color); border-color: var(--eiau-theme-color); }
    100% { box-shadow: 0 0 4px rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.15); }
}

/* Floating Settings Panel Wrapper */
#eiau-booster-panel {
    position: fixed;
    z-index: 999999;
    font-family: 'Inter', -apple-system, sans-serif;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Panel Positioning */
.eiau-panel-pos-bottom-right { bottom: 24px; right: 24px; }
.eiau-panel-pos-bottom-left { bottom: 24px; left: 24px; }
.eiau-panel-pos-top-right { top: 24px; right: 24px; }
.eiau-panel-pos-top-left { top: 24px; left: 24px; }

/* Toggle Button Styling */
#eiau-booster-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--eiau-theme-color);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px var(--eiau-theme-glow);
    position: relative;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

#eiau-booster-toggle:hover {
    transform: scale(1.08) rotate(30deg);
}

#eiau-booster-toggle svg {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
}

/* Badge Pulse Indicator */
.eiau-badge-pulse {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background-color: var(--eiau-red);
    border-radius: 50%;
    border: 2px solid #ffffff;
    animation: eiau-indicator-ping 1.5s infinite;
}

@keyframes eiau-indicator-ping {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* Content Drawer Panel */
#eiau-booster-content {
    position: absolute;
    bottom: 70px;
    width: 290px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom right;
}

/* Position Adjustments for active drawer */
.eiau-panel-pos-bottom-right #eiau-booster-content { right: 0; bottom: 70px; transform-origin: bottom right; }
.eiau-panel-pos-bottom-left #eiau-booster-content { left: 0; bottom: 70px; transform-origin: bottom left; }
.eiau-panel-pos-top-right #eiau-booster-content { right: 0; top: 70px; transform-origin: top right; }
.eiau-panel-pos-top-left #eiau-booster-content { left: 0; top: 70px; transform-origin: top left; }

/* Closed State Animations */
#eiau-booster-panel.closed #eiau-booster-content {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.85) translateY(15px);
}

/* Header inside Panel */
.eiau-header {
    background-color: #f8fafc;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}

.eiau-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--eiau-theme-color);
}

#eiau-panel-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}

#eiau-panel-close:hover {
    color: var(--eiau-text-dark);
}

/* Option Groups */
.eiau-option-group {
    padding: 16px 18px;
    border-bottom: 1px solid #f8fafc;
}

.eiau-option-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 8px;
}

/* Swatches for theme colors */
.eiau-color-grid {
    display: flex;
    gap: 8px;
}

.eiau-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.eiau-color-swatch:hover {
    transform: scale(1.15);
}

.eiau-color-swatch.active {
    border-color: #0f172a;
    box-shadow: 0 0 0 2px #ffffff inset;
}

/* Custom Font Select styling */
#eiau-font-select {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #ffffff;
    color: var(--eiau-text-dark);
    cursor: pointer;
    outline: none;
}

/* Font Size Buttons Group */
.eiau-size-buttons {
    display: flex;
    gap: 4px;
    background-color: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
}

.eiau-btn-sz {
    flex: 1;
    border: none;
    background: none;
    font-size: 11px;
    font-weight: 500;
    padding: 6px 4px;
    cursor: pointer;
    border-radius: 6px;
    color: #64748b;
    transition: all 0.15s ease;
}

.eiau-btn-sz.active {
    background-color: #ffffff;
    color: var(--eiau-text-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Auto Transition Indicator & Progress Bar */
.eiau-timer-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 6px;
    color: #334155;
}

.eiau-progress-bg {
    width: 100%;
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

#eiau-progress-bar {
    width: 100%;
    height: 100%;
    background-color: var(--eiau-theme-color);
    border-radius: 3px;
}

.eiau-timer-controls {
    display: flex;
    justify-content: flex-end;
}

.eiau-mini-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    color: #475569;
    cursor: pointer;
}

.eiau-mini-btn:hover {
    background-color: #e2e8f0;
}

.eiau-mini-btn.paused {
    background-color: var(--eiau-theme-color);
    color: white;
}

.eiau-footer-credits {
    text-align: center;
    padding: 10px;
    background-color: #f8fafc;
    border-top: 1px solid #f1f5f9;
    font-size: 10px;
    color: #94a3b8;
}

/* ----------------------------------------------------
   NEWS TAGS STYLING & ANIMATIONS
   ---------------------------------------------------- */
.eiau-tag {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 4px;
    color: #ffffff;
    text-transform: uppercase;
    vertical-align: middle;
}

/* Preset News Colors */
.eiau-tag-son-dakika { background-color: var(--eiau-red); }
.eiau-tag-canlı { background-color: var(--eiau-green); }
.eiau-tag-manşet { background-color: var(--eiau-yellow); color: #000000; }
.eiau-tag-özel-haber { background-color: var(--eiau-purple); }

/* --- ANIMATION STYLES --- */

/* 1. PULSE (Nefes Alma Efekti) */
.eiau-animated-tag-pulse {
    animation: eiau-pulse 2s infinite ease-in-out;
}
@keyframes eiau-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; box-shadow: 0 0 10px var(--eiau-red-glow); }
    100% { transform: scale(1); opacity: 1; }
}

/* 2. GLOW (Işıldama Efekti) */
.eiau-animated-tag-glow {
    animation: eiau-glow 1.5s infinite alternate ease-in-out;
}
@keyframes eiau-glow {
    from {
        box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
    }
    to {
        box-shadow: 0 0 12px var(--eiau-theme-color);
    }
}

/* 3. SHIMMER (Işık Sızması / Parlama) */
.eiau-animated-tag-shimmer {
    position: relative;
    overflow: hidden;
}
.eiau-animated-tag-shimmer::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-20deg);
    animation: eiau-shimmer 2.5s infinite;
}
@keyframes eiau-shimmer {
    0% { left: -150%; }
    40%, 100% { left: 150%; }
}

/* 4. BOUNCE (Zıplama / Titreşim) */
.eiau-animated-tag-bounce {
    animation: eiau-bounce 3s infinite ease;
}
@keyframes eiau-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-3px); }
    60% { transform: translateY(-1.5px); }
}
