/*
Theme Name: Calcala V2
Theme URI: https://calcala.co.il
Author: Calcala Team
Author URI: https://calcala.co.il
Description: Mobile-first responsive theme for Calcala financial news website
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: calcala
*/

/* Alpine.js x-cloak */
[x-cloak] {
    display: none !important;
}

/* Global Glossary Terms Tooltip Styles */
.glossary-term {
    position: relative;
    background: linear-gradient(120deg, #10b981 0%, #10b981 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.0em;
    background-position: 0 88%;
    transition: all 0.3s ease;
    cursor: help;
    border-bottom: 2px dotted #10b981;
    color: inherit;
}

.glossary-term:hover, .glossary-term:focus {
    background-size: 100% 88%;
    color: white;
}

/* Glossary tooltip - created by JavaScript */
.glossary-tooltip {
    position: absolute;
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: normal;
    white-space: nowrap;
    max-width: 300px;
    white-space: normal;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    line-height: 1.4;
    pointer-events: none;
}

/* Stock Mentions Styles */
.stock-mention {
    position: relative;
    background: linear-gradient(120deg, #3b82f6 0%, #3b82f6 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.0em;
    background-position: 0 88%;
    transition: all 0.3s ease;
    cursor: pointer;
    border-bottom: 2px dotted #3b82f6;
    color: inherit;
    font-weight: 600;
}

.stock-mention:hover, .stock-mention:focus {
    background-size: 100% 88%;
    color: white;
}

/* Stock popup - created by JavaScript */
.stock-popup {
    position: absolute;
    background: white;
    border-radius: 12px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    pointer-events: none;
    width: 360px;
    border: 1px solid #e5e7eb;
}

.stock-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.stock-popup-title {
    font-weight: 700;
    font-size: 16px;
    color: #1f2937;
    margin: 0;
}

.stock-popup-symbol {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

.stock-popup-body {
    padding: 16px;
}

.stock-popup-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stock-price-value {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    direction: ltr;
    line-height: 1;
}

.stock-popup-chart {
    width: 100%;
    height: 100px;
    margin-top: 12px;
    position: relative;
}

.stock-popup-chart canvas {
    direction: ltr;
}

.stock-change {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 700;
}

.stock-change.positive {
    color: #10b981;
}

.stock-change.negative {
    color: #ef4444;
}

.stock-popup-footer {
    padding: 10px 16px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.stock-popup-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stock-popup-link:hover {
    color: #2563eb;
}

.wp-block-list {margin-right: 20px;}
.wp-element-caption {text-align: center;margin-top: 0;padding: 5px 0;}
.wp-post-image {border-radius: 0.375rem 0 0 0.375rem;}

.hero-section {
    background-size: cover;
    background-position: center;
    height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: white;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
}

.admin-bar .top-header {
    top: 32px;
}

.glossary-tooltip {
    display: none;
}

/* Mobile responsive for stock popup */
@media (max-width: 768px) {
    .stock-popup {
        width: 260px;
        font-size: 13px;
    }
    
    .stock-popup-title {
        font-size: 14px;
    }
    
    .stock-price-value {
        font-size: 20px;
    }
    
    .glossary-tooltip {
        max-width: 250px;
        font-size: 13px;
    }
    .tabsData::-webkit-scrollbar {
    display: none;
}
    .tabsData {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    }

    img {
        max-width: 100%;
        height: auto;
    }

    .wp-post-image {
        border-radius:  0 0 0.375rem 0.375rem;
    }
}
/* ============================================================
   Calcala V2 - סטיילים גלובליים שהיו בעבר ב-style מוטמע ב-header
   ============================================================ */

/* טיקר נע RTL (מדדי שוק + מבזקים) */
@keyframes marquee-rtl {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.animate-marquee-rtl {
    animation: marquee-rtl 50s linear infinite;
}

/* טאבים פעילים/לא פעילים (טאבי קטגוריות ועוד) */
.tab-active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: bold;
}

.tab-inactive {
    border-bottom-color: transparent;
    color: #6b7280;
}

/* נגן אודיו (פודקאסטים) */
audio::-webkit-media-controls-panel {
    background-color: #f8fafc;
}

audio::-webkit-media-controls-play-button {
    color: var(--primary-color);
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: #374151;
}

/* קישורי פוטר - יעדי מגע נאותים */
.footer-nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: #d1d5db;
    transition: color 0.2s ease;
}

.footer-nav-link:hover,
.footer-nav-link:focus-visible {
    color: #fff;
}

/* כפתורי רשתות חברתיות בפוטר */
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    background-color: #1f2937;
    color: #d1d5db;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.social-btn:hover,
.social-btn:focus-visible {
    background-color: var(--primary-color);
    color: #fff;
}

.social-btn:active {
    transform: scale(0.95);
}

/* חץ טולטיפ מילון (נוצר על ידי JS ב-single-article) */
.glossary-tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #1f2937;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}

/* תמונת hero בכתבה פיצ'ר (single-article) */
.hero-section {
    overflow: hidden;
}

.hero-section__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
