/* 한국관광공사 공공데이터 분석 페이지 (korea-tourism-data-analysis.php) */

.api-header.kto-analysis-header {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.kto-analysis-panel {
    text-align: left;
}

.kto-analysis-panel h2 {
    color: #333;
    margin-bottom: 10px;
}

.kto-analysis-panel .panel-desc {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 16px;
}

.kto-analysis-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.kto-analysis-actions .test-button {
    margin: 0;
}

.kto-analysis-status {
    display: none;
    color: #555;
    font-size: 0.95em;
}

.kto-analysis-status.is-visible {
    display: inline;
}

.kto-analysis-error {
    display: none;
    color: #c0392b;
    margin-top: 10px;
    padding: 10px 12px;
    background: #fdeaea;
    border-radius: 8px;
    font-size: 0.95em;
}

.kto-analysis-error.is-visible {
    display: block;
}

.kto-analysis-info {
    display: none;
    color: #0c5460;
    margin-top: 10px;
    padding: 10px 12px;
    background: #e7f5f8;
    border: 1px solid #b8dce8;
    border-radius: 8px;
    font-size: 0.95em;
    line-height: 1.5;
    white-space: pre-line;
}

.kto-analysis-info.is-visible {
    display: block;
}

.kto-table-wrap {
    display: none;
    margin-top: 16px;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.kto-table-wrap.is-visible {
    display: block;
}

.kto-map-wrap {
    display: none;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    background: #fff;
}

.kto-map-wrap.is-visible {
    display: block;
}

.kto-map-head {
    padding: 10px 14px;
    font-size: 0.95em;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.kto-map-canvas {
    width: 100%;
    height: 420px;
}

.kto-map-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    font-size: 0.85em;
    color: #555;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.kto-map-legend__bar {
    flex: 1;
    min-width: 160px;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #2166ac 0%, #fee08b 50%, #d73027 100%);
    border: 1px solid #ccc;
}

.kto-map-legend__labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    min-width: 200px;
    font-variant-numeric: tabular-nums;
}

/* JS로 채우는 범례: 세로 스택 */
#tourDemandMapLegend.kto-map-legend {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.kto-result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88em;
}

.kto-result-table th,
.kto-result-table td {
    border: 1px solid #dee2e6;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.kto-result-table th {
    background: #f1f3f5;
    color: #333;
    white-space: nowrap;
}

.kto-result-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.kto-param-form {
    margin-bottom: 18px;
}

.kto-param-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px 18px;
    margin-bottom: 8px;
}

.kto-param-field label {
    display: block;
    font-size: 0.88em;
    font-weight: 600;
    color: #444;
    margin-bottom: 4px;
}

.kto-param-field input,
.kto-param-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 0.95em;
}

.kto-param-field .field-hint {
    font-size: 0.8em;
    color: #888;
    margin-top: 4px;
    font-weight: normal;
}

.kto-param-reference {
    grid-column: 1 / -1;
    margin-top: 6px;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.82em;
    color: #444;
    line-height: 1.45;
}

.kto-param-reference summary {
    cursor: pointer;
    font-weight: 600;
    color: #333;
}

.kto-param-reference dl {
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(3.5rem, auto) 1fr;
    column-gap: 12px;
    row-gap: 4px;
}

.kto-param-reference dt {
    font-weight: 600;
    color: #555;
}

.kto-param-reference dd {
    margin: 0;
    padding: 0;
}
