/**
 * mod_jmaxtaric - EU TARIC Module Styles
 *
 * @package     Joomlamax.Module.Jmaxtaric
 * @copyright   Copyright (C) 2024 joomlamax.com. All rights reserved.
 * @license     GNU General Public License version 2 or later
 */

/* CSS Variables for theming */
:root {
    --taric-primary: #006fb4;
    --taric-primary-light: #0088d4;
    --taric-primary-dark: #004a7c;
    --taric-secondary: #ffcc00;
    --taric-success: #28a745;
    --taric-warning: #ffc107;
    --taric-danger: #dc3545;
    --taric-info: #17a2b8;
    --taric-light: #f8f9fa;
    --taric-dark: #343a40;
    --taric-border: #dee2e6;
    --taric-shadow: 0 4px 20px rgba(0, 111, 180, 0.15);
    --taric-radius: 0;
    --taric-radius-sm: 4px;
    --taric-transition: all 0.3s ease;
}

/* Container */
.mod-jmaxtaric {
    font-family: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    color: var(--taric-dark);
}

.taric-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* ================================================== */
/* HEADER WITH TABS */
/* ================================================== */
.taric-header {
    background: linear-gradient(135deg, var(--taric-primary) 0%, var(--taric-primary-light) 100%);
    border-radius: var(--taric-radius-sm) var(--taric-radius-sm) 0 0;
    overflow: hidden;
}

.taric-header-top {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
}

.taric-eu-badge {
    background: rgba(255, 204, 0, 0.15);
    border: 2px solid var(--taric-secondary);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--taric-secondary);
    font-size: 10px;
    line-height: 1.2;
}

.eu-stars {
    display: block;
    text-align: center;
    letter-spacing: 2px;
}

.taric-header-title {
    display: flex;
    flex-direction: column;
}

.taric-brand {
    font-size: 28px;
    font-weight: 800;
    color: white;
    letter-spacing: 3px;
}

.taric-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

/* Header Tabs */
.taric-header-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.1);
    padding: 0 16px;
}

.taric-header-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    background: transparent;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    transition: var(--taric-transition);
    position: relative;
    margin-top: 4px;
}

.taric-header-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.taric-header-tab-active {
    background: white;
    color: var(--taric-primary);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
}

.taric-header-tab-active:hover {
    background: white;
    color: var(--taric-primary);
}

.taric-header-tab .tab-icon {
    font-size: 18px;
}

.taric-header-tab .tab-label {
    white-space: nowrap;
}

/* ================================================== */
/* FORM BODY */
/* ================================================== */
.taric-form-body {
    background: white;
    border: 1px solid var(--taric-border);
    border-top: none;
    padding: 0;
}

/* Tab Content */
.taric-tab-content {
    display: none;
    padding: 24px;
}

.taric-tab-content-active {
    display: block;
    animation: taric-fadeIn 0.3s ease;
}

@keyframes taric-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections */
.taric-section {
    margin-bottom: 20px;
}

/* Form Rows */
.taric-form-row {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.taric-form-row-split {
    align-items: flex-start;
}

/* Form Groups */
.taric-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.taric-form-group-sm {
    flex: 0 0 120px;
}

.taric-form-group-md {
    flex: 0 0 200px;
}

.taric-form-group-lg {
    flex: 1 1 280px;
}

.taric-form-group-xl {
    flex: 2 1 400px;
}

.taric-form-group-full {
    flex: 1 1 100%;
}

/* Labels */
.taric-label {
    font-weight: 600;
    color: var(--taric-dark);
    font-size: 14px;
}

.taric-label-mt {
    margin-top: 16px;
}

/* Browse Link */
.taric-browse-link {
    display: inline-block;
    font-size: 13px;
    color: var(--taric-primary);
    text-decoration: none;
    margin-left: 12px;
}

.taric-browse-link:hover {
    text-decoration: underline;
}

/* Inputs & Selects */
.taric-input,
.taric-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--taric-border);
    border-radius: var(--taric-radius-sm);
    font-size: 14px;
    transition: var(--taric-transition);
    background: white;
}

.taric-input:focus,
.taric-select:focus {
    outline: none;
    border-color: var(--taric-primary);
    box-shadow: 0 0 0 3px rgba(0, 111, 180, 0.15);
}

.taric-input-upper {
    text-transform: uppercase;
}

.taric-input-date {
    max-width: 160px;
}

.taric-select-sm {
    max-width: 80px;
}

.taric-select-multi {
    height: auto;
    min-height: 180px;
}

/* Input Group */
.taric-input-group {
    display: flex;
    gap: 8px;
}

.taric-input-group .taric-input {
    flex: 1;
}

/* Hints */
.taric-hint {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* ================================================== */
/* ADVANCED SEARCH TOGGLE */
/* ================================================== */
.taric-advanced-toggle {
    margin: 12px 0;
    padding: 12px 0;
    border-top: 1px solid var(--taric-border);
    border-bottom: 1px solid var(--taric-border);
}

.taric-toggle-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--taric-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.taric-toggle-link:hover {
    text-decoration: underline;
}

.toggle-indicator {
    font-size: 10px;
    transition: transform 0.3s;
}

.taric-toggle-link.expanded .toggle-indicator {
    transform: rotate(180deg);
}

/* ================================================== */
/* DATE RANGE */
/* ================================================== */
.taric-date-range {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.date-label {
    font-size: 14px;
    color: #6c757d;
}

.taric-date-shortcuts {
    display: flex;
    gap: 12px;
}

.taric-shortcut {
    color: var(--taric-primary);
    text-decoration: none;
    font-size: 13px;
}

.taric-shortcut:hover {
    text-decoration: underline;
}

/* ================================================== */
/* REFERENCE DATE SECTION */
/* ================================================== */
.taric-ref-date {
    background: #f8f9fa;
    margin: 24px -24px -24px -24px;
    padding: 16px 24px;
    border-top: 1px solid var(--taric-border);
}

/* ================================================== */
/* FORM ACTIONS */
/* ================================================== */
.taric-form-actions {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    background: #f8f9fa;
    border-top: 1px solid var(--taric-border);
}

.taric-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--taric-radius-sm);
    cursor: pointer;
    transition: var(--taric-transition);
}

.taric-btn-primary {
    background: var(--taric-primary);
    color: white;
}

.taric-btn-primary:hover {
    background: var(--taric-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 111, 180, 0.3);
}

.taric-btn-secondary {
    background: white;
    color: var(--taric-dark);
    border: 1px solid var(--taric-border);
}

.taric-btn-secondary:hover {
    background: #f0f0f0;
}

.btn-icon {
    font-size: 16px;
}

/* ================================================== */
/* ALERTS */
/* ================================================== */
.taric-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--taric-radius-sm);
    margin-bottom: 20px;
    margin-top: 20px;
}

.taric-alert-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
}

.taric-alert-info {
    background: #e8f4fd;
    border: 1px solid #90cdf4;
    color: #2b6cb0;
}

.taric-alert-icon {
    font-size: 20px;
}

/* ================================================== */
/* RESULTS */
/* ================================================== */
.taric-results {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.taric-result-card {
    background: white;
    border: 1px solid var(--taric-border);
    border-radius: var(--taric-radius-sm);
    box-shadow: var(--taric-shadow);
    overflow: hidden;
}

.taric-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--taric-border);
}

.taric-card-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--taric-dark);
}

.taric-code-badge {
    background: var(--taric-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Monaco', 'Consolas', monospace;
}

.taric-count-badge {
    background: var(--taric-info);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.taric-card-body {
    padding: 20px;
}

.taric-description-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--taric-dark);
    margin: 0 0 16px 0;
}

.taric-status {
    display: flex;
    gap: 8px;
}

.taric-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.taric-badge-success {
    background: #d4edda;
    color: #155724;
}

.taric-badge-warning {
    background: #fff3cd;
    color: #856404;
}

/* ================================================== */
/* TABLE */
/* ================================================== */
.taric-table-wrapper {
    overflow-x: auto;
}

.taric-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.taric-table th,
.taric-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--taric-border);
}

.taric-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--taric-dark);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.taric-table tbody tr:hover {
    background: #f8f9fa;
}

.taric-measure-type {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.measure-code {
    font-weight: 600;
    color: var(--taric-primary);
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
}

.measure-desc {
    color: #6c757d;
    font-size: 12px;
}

.taric-duty-rate {
    font-weight: 600;
    color: var(--taric-dark);
}

.taric-regulation-link {
    color: var(--taric-primary);
    text-decoration: none;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
}

.taric-regulation-link:hover {
    text-decoration: underline;
}

.taric-validity {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.validity-separator {
    color: #adb5bd;
}

.validity-open {
    color: var(--taric-success);
    font-style: italic;
}

.taric-footnotes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.taric-footnote {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-family: 'Monaco', 'Consolas', monospace;
    cursor: help;
}

/* ================================================== */
/* FOOTER */
/* ================================================== */
.taric-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--taric-border);
    text-align: center;
    font-size: 12px;
    color: #6c757d;
}

.taric-footer a {
    color: var(--taric-primary);
    text-decoration: none;
}

.taric-footer a:hover {
    text-decoration: underline;
}

/* ================================================== */
/* LOADING */
/* ================================================== */
.taric-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.taric-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--taric-border);
    border-top-color: var(--taric-primary);
    border-radius: 50%;
    animation: taric-spin 0.8s linear infinite;
}

@keyframes taric-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================================== */
/* RESPONSIVE */
/* ================================================== */
@media (max-width: 768px) {
    .taric-header-top {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .taric-header-actions {
        margin-left: 0;
        width: 100%;
    }

    .taric-header-actions select {
        width: 100%;
        text-align: center;
        text-align-last: center;
        /* For select text alignment */
    }

    .taric-header-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .taric-header-tab {
        padding: 12px 16px;
        font-size: 13px;
    }

    .taric-form-row {
        flex-direction: column;
    }

    .taric-form-group-sm,
    .taric-form-group-md,
    .taric-form-group-lg,
    .taric-form-group-xl {
        flex: 1 1 100%;
    }

    .taric-date-range {
        flex-direction: column;
        align-items: flex-start;
    }

    .taric-form-actions {
        flex-direction: column;
    }

    .taric-btn {
        width: 100%;
        justify-content: center;
    }

    .taric-card-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .taric-table {
        font-size: 12px;
    }

    .taric-table th,
    .taric-table td {
        padding: 10px 8px;
    }
}

/* Alert close button */
.taric-alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
}

.taric-alert-close:hover {
    opacity: 1;
}

.taric-alert-fadeout {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Tooltip */
.taric-tooltip {
    position: absolute;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    max-width: 300px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Input validation states */
.taric-input-valid {
    border-color: var(--taric-success);
}

.taric-input-invalid {
    border-color: var(--taric-danger);
}

/* ================================================== */
/* NOMENCLATURE TREE STYLES */
/* ================================================== */

/* Tree Container Card */
.taric-nomenclature-card .taric-card-body {
    padding: 16px;
}

.taric-tree-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #666;
    font-size: 14px;
}

.taric-badge-info {
    background: var(--taric-info);
    color: white;
}

.taric-tree-container {
    border: 1px solid var(--taric-border);
    border-radius: var(--taric-radius-sm);
    max-height: 600px;
    overflow-y: auto;
    background: var(--taric-light);
}

/* Tree List */
.taric-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.taric-tree-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--taric-transition);
}

.taric-tree-item:last-child {
    border-bottom: none;
}

.taric-tree-item.collapsed {
    display: none;
}

.taric-tree-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    transition: var(--taric-transition);
}

.taric-tree-item:hover>.taric-tree-row {
    background: rgba(0, 111, 180, 0.05);
}

/* Depth-based indentation */
.taric-tree-item.depth-0 .taric-tree-row {
    padding-left: 12px;
}

.taric-tree-item.depth-1 .taric-tree-row {
    padding-left: 32px;
}

.taric-tree-item.depth-2 .taric-tree-row {
    padding-left: 52px;
}

.taric-tree-item.depth-3 .taric-tree-row {
    padding-left: 72px;
}

.taric-tree-item.depth-4 .taric-tree-row {
    padding-left: 92px;
}

.taric-tree-item.depth-5 .taric-tree-row {
    padding-left: 112px;
}

.taric-tree-item.depth-6 .taric-tree-row {
    padding-left: 132px;
}

/* Toggle button */
.taric-tree-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: var(--taric-primary);
    font-size: 10px;
    user-select: none;
    flex-shrink: 0;
    border-radius: 3px;
    transition: var(--taric-transition);
}

.taric-tree-toggle:hover {
    background: rgba(0, 111, 180, 0.15);
}

.taric-tree-toggle-placeholder {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Code display */
.taric-tree-code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    padding: 2px 8px;
    border-radius: 3px;
    background: white;
    border: 1px solid var(--taric-border);
    color: var(--taric-dark);
    flex-shrink: 0;
    min-width: 90px;
    text-align: center;
}

.taric-tree-code.clickable {
    cursor: pointer;
    background: var(--taric-primary);
    color: white;
    border-color: var(--taric-primary-dark);
    transition: var(--taric-transition);
}

.taric-tree-code.clickable:hover {
    background: var(--taric-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Small badge for declarable indicator */
.taric-badge-small {
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
}

/* Description */
.taric-tree-description {
    flex: 1;
    font-size: 13px;
    color: #444;
    line-height: 1.4;
}

/* Highlighted match */
.taric-tree-item.is-match>.taric-tree-row {
    background: rgba(255, 204, 0, 0.15);
    border-left: 3px solid var(--taric-secondary);
}

.taric-tree-item.is-match .taric-tree-code {
    font-weight: 600;
}

/* Declarable items styling */
.taric-tree-item.declarable>.taric-tree-row {
    background: rgba(40, 167, 69, 0.05);
}

.taric-tree-item.declarable:hover>.taric-tree-row {
    background: rgba(40, 167, 69, 0.1);
}

/* Chapter/Section headers (depth 0) */
.taric-tree-item.depth-0 {
    background: rgba(0, 111, 180, 0.08);
}

.taric-tree-item.depth-0 .taric-tree-description {
    font-weight: 600;
    color: var(--taric-primary-dark);
    text-transform: uppercase;
    font-size: 12px;
}

/* Scrollbar styling for tree container */
.taric-tree-container::-webkit-scrollbar {
    width: 8px;
}

.taric-tree-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.taric-tree-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.taric-tree-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ================================================== */
/* MEASURES DETAIL STYLES */
/* ================================================== */

/* Area Column */
.taric-area {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.area-code {
    font-weight: 600;
    color: var(--taric-dark);
}

.taric-exclusions {
    color: #dc3545;
    /* var(--taric-danger) fallback */
    font-size: 11px;
    line-height: 1.2;
}

/* Condition Toggle Button */
.taric-btn-text {
    background: none;
    border: none;
    color: var(--taric-primary);
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    font-size: 13px;
}

.taric-btn-text:hover {
    color: var(--taric-primary-dark);
}

/* Conditions Row (Sub-table) */
.taric-conditions-row {
    background-color: #f8f9fa;
}

.taric-conditions-row td {
    padding: 0 !important;
    border-bottom: 2px solid var(--taric-border);
}

.taric-conditions-wrapper {
    padding: 16px;
    background: white;
    margin: 8px 16px;
    border: 1px solid var(--taric-border);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.taric-conditions-wrapper h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--taric-dark);
    font-weight: 600;
}

.taric-sub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.taric-sub-table th {
    background: #f1f3f5;
    padding: 8px;
    text-align: left;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #dee2e6;
}

.taric-sub-table td {
    padding: 8px;
    border-bottom: 1px solid #eee;
    color: #444;
}

.taric-sub-table tr:last-child td {
    border-bottom: none;
}

/* Enhanced Condition Items */
.taric-condition-item {
    font-size: 11px;
    background: #f8f9fa;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    margin-bottom: 3px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: help;
}

.taric-condition-item:hover {
    white-space: normal;
    overflow: visible;
    position: absolute;
    z-index: 100;
    max-width: 400px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.taric-condition-badge {
    background-color: #004494;
    color: #fff;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 10px;
    flex-shrink: 0;
}

.taric-condition-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================================================== */
/* MODAL */
/* ================================================== */
.taric-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.taric-modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 1000px;
    height: 90%;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.taric-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.taric-modal-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.taric-modal-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.taric-modal-close:hover,
.taric-modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.taric-modal-body {
    padding: 0;
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #eee;
}

.taric-modal-body iframe {
    flex: 1;
    display: block;
}

/* Compact modal variant for regulation info */
.taric-modal-compact {
    max-width: 480px;
    height: auto;
    max-height: 400px;
    border-radius: 12px;
}

/* Regulation buttons */
.taric-reg-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.taric-reg-btn-primary {
    background: #003399;
    color: #fff;
    border: 2px solid #003399;
}

.taric-reg-btn-primary:hover {
    background: #004db3;
    border-color: #004db3;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.3);
}

.taric-reg-btn-secondary {
    background: #fff;
    color: #003399;
    border: 2px solid #003399;
}

.taric-reg-btn-secondary:hover {
    background: #f0f4ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.15);
}

/* Condition Items Truncation */
.taric-conditions-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 150px;
    overflow-y: auto;
}

.taric-condition-item {
    font-size: 11px;
    background: #f8f9fa;
    padding: 2px 4px;
    border-radius: 2px;
    border: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
    cursor: help;
}

.taric-condition-item:hover {
    white-space: normal;
    overflow: visible;
    max-width: none;
    position: absolute;
    z-index: 10;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    width: max-content;
    max-width: 400px;
}