/*
Theme Name: Calcala
Theme URI: https://calcala.co.il
Author: Calcala Team
Author URI: https://calcala.co.il
Description: Custom theme for Calcala financial news website
Version: 1.0.3
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;}

/* 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;
    }
}