@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Very specific class names to avoid conflicts */
.holdco-historical-data-table-wrapper {
    font-family: 'Inter', sans-serif !important;
    width: 100%;
}

/* Mobile scroll container - only for the table */
.holdco-historical-table-scroll-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.holdco-historical-data-table {
    border-collapse: collapse !important;
    width: 100% !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1) !important;
    font-family: 'Inter', sans-serif !important;
    min-width: 100% !important; /* Start with 100% width */
}

/* On larger screens where table fits */
@media screen and (min-width: 1025px) {
    .holdco-historical-data-table {
        min-width: 100% !important;
    }
}

/* On medium screens, set a minimum width if needed */
@media screen and (max-width: 1024px) and (min-width: 769px) {
    .holdco-historical-data-table {
        min-width: 900px !important; /* Minimum width for tablet */
    }
}

/* On mobile, ensure horizontal scrolling works */
@media screen and (max-width: 768px) {
    .holdco-historical-data-table {
        min-width: 800px !important; /* Minimum width for mobile scrolling */
    }
}

.holdco-historical-data-table th,
.holdco-historical-data-table td {
    border: 1px solid #dbdbdb !important;
    padding: 10px 15px !important;
    text-align: left !important;
    font-family: 'Inter', sans-serif !important;
    vertical-align: middle !important;
}

.holdco-historical-data-table th {
    background-color: #EEEEEE !important;
    color: #000000 !important;
    font-weight: 600 !important;
}

.holdco-historical-data-table td {
    background-color: #EEEEEE !important;
    color: #000000 !important;
}

/* Field-specific text highlighting - TEXT ONLY, not entire cell */
.holdco-historical-data-table td span.holdco-highlight-high {
    background-color: #D3E9F8 !important;
    padding: 10px 15px !important;
    display: inline-block !important;
    border-radius: 4px !important;
}

.holdco-historical-data-table td span.holdco-highlight-low {
    background-color: #FBE7E9 !important;
    padding: 10px 15px !important;
    display: inline-block !important;
    border-radius: 4px !important;
}

.holdco-historical-data-table td span.holdco-highlight-close {
    background-color: #EEEEEE !important;
    padding: 10px 15px !important;
    display: inline-block !important;
    border-radius: 4px !important;
}

.holdco-historical-data-table td span.holdco-highlight-volume {
    background-color: #FFEFC0 !important;
    padding: 10px 15px !important;
    display: inline-block !important;
    border-radius: 4px !important;
}

/* Filters Styling - DESKTOP VERSION */
.holdco-historical-filters {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    gap: 20px !important;
}

.holdco-historical-search-container {
    position: relative !important;
    flex: 1 !important;
    max-width: 100% !important;
    width: 50% !important;
}

.holdco-historical-search-container::before {
    content: '' !important;
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 16px !important;
    height: 16px !important;
    background-image: url('/wp-content/uploads/2025/11/search_icon_.svg') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    pointer-events: none !important;
    z-index: 2 !important;
}

.holdco-historical-search-container input {
    width: 100% !important;
    padding: 12px 15px 12px 40px !important;
    border: none !important;
    border-radius: 0px !important;
    background-color: #ECEFF1 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    outline: none !important;
    box-shadow: none !important;
    position: relative !important;
    z-index: 1 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.holdco-historical-search-container input:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.holdco-historical-filter-container {
    position: relative !important;
    min-width: 30% !important;
    max-width: 30% !important;
    width: 30% !important;
}

.holdco-historical-filter-container::before {
    content: '' !important;
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 16px !important;
    height: 16px !important;
    background-image: url('/wp-content/uploads/2025/11/Filter-icon.png') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    pointer-events: none !important;
    z-index: 2 !important;
}

.holdco-historical-filter-container select {
    width: 100% !important;
    padding: 12px 15px 12px 40px !important;
    border: 0px !important;
    border-radius: 0px !important;
    background-color: #ECEFF1 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: none !important;
    position: relative !important;
    z-index: 1 !important;
    color: #757575 !important;
}

.holdco-historical-filter-container select:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.holdco-historical-filter-container select option {
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
}

/* Button Actions - DESKTOP VERSION */
.holdco-historical-table-actions {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 50px !important;
    margin-top: 40px !important;
    flex-wrap: wrap !important;
}

.holdco-historical-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 24px !important;
    background-color: transparent !important;
    color: #000000 !important;
    text-decoration: none !important;
    border: 2px solid !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    min-width: 180px !important;
    outline: none !important;
    box-shadow: none !important;
}

.holdco-historical-see-full-button {
    background-color: #f0bd2d !important;
    border-color: #f0bd2d !important;
    font-family: "Inter", Sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1em !important;
    border-radius: 0px !important;
    padding: 16px 24px 16px 24px !important;
    color: #000000 !important;
    text-decoration: none !important;
}

.holdco-historical-see-full-button:hover {
    background-color: transparent !important;
    color: #002855 !important;
    border: solid 1px #002855 !important;
    text-decoration: none !important;
}

.holdco-historical-see-full-button:active,
.holdco-historical-see-full-button:focus {
    outline: none !important;
    background-color: transparent !important;
    color: #002855 !important;
    border: 1px solid #002855 !important;
    border-radius: 0px !important;
    box-shadow: none !important;
}

.holdco-historical-download-csv {
    border-color: #f0bd2d !important;
    background-color: #f0bd2d !important;
    font-family: "Inter", Sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1em !important;
    border-radius: 0px !important;
    padding: 16px 24px 16px 24px !important;
    color: #000000 !important;
}

.holdco-historical-download-csv:hover {
    background-color: transparent !important;
    color: #002855 !important;
    border: 1px solid #002855 !important;
}

.holdco-historical-download-csv:active,
.holdco-historical-download-csv:focus {
    outline: none !important;
    background-color: transparent !important;
    color: #002855 !important;
    border: 1px solid #002855 !important;
    border-radius: 0px !important;
    box-shadow: none !important;
}

/* MOBILE STYLES - Only apply on mobile */
@media screen and (max-width: 768px) {
    .holdco-historical-filters {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    
    .holdco-historical-search-container,
    .holdco-historical-filter-container {
        max-width: 100% !important;
        min-width: 100% !important;
        width: 100% !important;
    }
    
    .holdco-historical-table-actions {
        flex-direction: column !important;
        gap: 15px !important;
        margin-top: 30px !important;
    }
    
    .holdco-historical-button {
        width: 100% !important;
        max-width: 300px !important;
    }
    
    .holdco-historical-data-table th,
    .holdco-historical-data-table td {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
    
    /* Adjust text highlighting padding for mobile */
    .holdco-historical-data-table td span.holdco-highlight-high,
    .holdco-historical-data-table td span.holdco-highlight-low,
    .holdco-historical-data-table td span.holdco-highlight-close,
    .holdco-historical-data-table td span.holdco-highlight-volume {
        padding: 8px 12px !important;
    }
    
    /* Adjust button padding for mobile */
    .holdco-historical-see-full-button,
    .holdco-historical-download-csv {
        padding: 16px 20px 16px 20px !important;
    }
}

/* Tablet Styles */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .holdco-historical-filters {
        gap: 15px !important;
    }
    
    .holdco-historical-search-container {
        max-width: 50% !important;
        width: 50% !important;
    }
    
    .holdco-historical-filter-container {
        min-width: 30% !important;
        width: 30% !important;
    }
}

/* Scrollbar Styling for Table Container Only */
.holdco-historical-table-scroll-container::-webkit-scrollbar {
    height: 8px !important;
}

.holdco-historical-table-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 4px !important;
}

.holdco-historical-table-scroll-container::-webkit-scrollbar-thumb {
    background: #888 !important;
    border-radius: 4px !important;
}

.holdco-historical-table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #555 !important;
}

/* Remove all focus outlines */
.holdco-historical-search-container input:focus,
.holdco-historical-filter-container select:focus,
.holdco-historical-button:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Debug border to see if CSS is loading */
.holdco-historical-data-table-wrapper {
    border: 1px solid transparent !important; /* Remove this after testing */
}
/* Separate date/date-range shortcode filters */
.holdco-historical-date-filters {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    gap: 20px !important;
}

.holdco-historical-date-filter-container {
    flex: 1 !important;
    min-width: 0 !important;
}

.holdco-historical-date-filter-container input[type="date"] {
    width: 100% !important;
    padding: 12px 15px !important;
    border: none !important;
    border-radius: 0 !important;
    background-color: #ECEFF1 !important;
    color: #757575 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    outline: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

.holdco-historical-date-filter-container input[type="date"]:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

@media screen and (max-width: 768px) {
    .holdco-historical-date-filters {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    
    .holdco-historical-date-filter-container input[type="date"] {
        max-width: 100% !important;
    }

    .holdco-historical-date-filter-container {
        width: 100% !important;
    }
}

.holdco-historical-date-filter-container label {
    display: block !important;
    margin-bottom: 5px !important;
    color: #757575 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}


.holdco-historical-date-search-container .holdco-historical-search-container {
    width: 100% !important;
}

.holdco-historical-date-search-container .holdco-historical-search {
    width: 100% !important;
    box-sizing: border-box !important;
}
