/* TÜİK Analytics Plugin Styles */

/* Override theme container clipping */
.bs-card-box:has(.tuik-analysis-wrap),
.bs-card-box:has(.tuik-index-wrap),
.entry-content:has(.tuik-analysis-wrap),
.post-content:has(.tuik-analysis-wrap) {
    overflow: visible !important;
    max-width: 100% !important;
}

.tuik-analysis-wrap,
.tuik-index-wrap {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

.tuik-analysis-wrap {
    margin: 0 auto;
    padding: 0 16px 48px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: visible !important;
}

.tuik-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 12px;
}

/* AI Insight Box */
.tuik-insight-box {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #f0f7ff;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 28px;
}

.tuik-insight-icon {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
}

.tuik-insight-box p {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.7;
    color: #1e3a5f;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* Chart */
.tuik-chart-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* Table */
.tuik-table-wrap {
    overflow-x: auto;
}

.tuik-table {
    width: 100% !important;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.tuik-table thead th {
    background: #1e3a5f;
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
}

.tuik-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.tuik-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.tuik-error {
    color: #dc2626;
    font-style: italic;
}

/* Index / listing page */
.tuik-index-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 16px 64px;
}

.tuik-index-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.tuik-index-sub {
    color: #6b7280;
    margin-bottom: 32px;
}

.tuik-index-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tuik-index-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 20px;
    border-top: 1px solid rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.tuik-index-card:first-child {
    border-top: none;
}

.tuik-index-card:hover {
    background: #f9fafb;
}

.tuik-card-left {
    flex: 1;
}

.tuik-card-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 10px;
}

.tuik-card-updated {
    font-size: 0.75rem;
    color: rgba(0,0,0,0.5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tuik-card-rows {
    font-size: 0.75rem;
    color: rgba(0,0,0,0.4);
}

.tuik-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 8px;
}

.tuik-card-desc {
    font-size: 0.875rem;
    color: rgba(0,0,0,0.5);
    margin: 0;
    max-width: 600px;
    line-height: 1.55;
}

.tuik-card-right {
    padding-left: 20px;
    color: rgba(0,0,0,0.3);
    font-size: 1.1rem;
}

.tuik-index-card:hover .tuik-card-right {
    color: #2563eb;
}

/* Filter bar */
.tuik-filter-bar { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; align-items: flex-end; }
.tuik-filter-label { display: block; font-size: 0.78rem; font-weight: 600; color: #374151; margin-bottom: 5px; }
.tuik-filter-select { padding: 9px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.875rem; background: #fff; cursor: pointer; min-width: 180px; }
.tuik-filter-select:focus { outline: 2px solid #2563eb; border-color: #2563eb; }

/* Calc grid */
.tuik-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
@media (max-width: 800px) { .tuik-calc-grid { grid-template-columns: 1fr; } }
.tuik-calc-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 28px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.tuik-calc-card h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; }
.tuik-calc-field { margin-bottom: 16px; }
.tuik-calc-field label { display: block; font-size: 0.8rem; font-weight: 600; color: #374151; margin-bottom: 6px; }
.tuik-calc-field input[type=number], .tuik-calc-field select { width: 100%; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.9rem; box-sizing: border-box; }
.tuik-calc-field input:focus, .tuik-calc-field select:focus { outline: 2px solid #2563eb; border-color: #2563eb; }
.tuik-calc-btn { width: 100%; padding: 12px; background: #2563eb; color: #fff; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; margin-top: 8px; transition: background 0.15s; }
.tuik-calc-btn:hover { background: #1d4ed8; }
.tuik-calc-result { margin-top: 20px; padding: 18px; background: #f0f7ff; border-radius: 8px; display: none; }
.tuik-calc-result.show { display: block; }
.tuik-result-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(37,99,235,0.12); font-size: 0.9rem; }
.tuik-result-row:last-child { border-bottom: none; font-weight: 700; color: #1e3a5f; }
.tuik-result-row span:last-child { font-weight: 600; color: #2563eb; }

/* Radio toggle */
.tuik-radio-toggle { display: flex; border: 1px solid #d1d5db; border-radius: 8px; overflow: hidden; margin-bottom: 4px; }
.tuik-radio-toggle label { flex: 1; text-align: center; padding: 9px 0; font-size: 0.85rem; font-weight: 600; cursor: pointer; color: #374151; background: #fff; transition: all 0.15s; }
.tuik-radio-toggle input[type=radio] { display: none; }
.tuik-radio-toggle input[type=radio]:checked + label { background: #2563eb; color: #fff; }

/* Responsive */
@media (max-width: 640px) {
    .tuik-title { font-size: 1.35rem; }
    .tuik-index-title { font-size: 1.5rem; }
    .tuik-card-title { font-size: 1rem; }
    .tuik-card-meta { flex-direction: column; gap: 4px; align-items: flex-start; }
}
