/**
 * Chart Theme & Visuals
 * 버튼, 입력 필드, 쉐도우 등 시각적 요소 정의
 */

/* 1. Field Label */
.chart-field-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    line-height: 1.4;
}

/* 2. Input Fields */
.chart-input {
    width: 100%;
    /* 높이는 부모(Grid Cell)에 맞춤 */
    height: 100%;
    min-height: calc(28px * var(--v-scale));

    padding: calc(4px * var(--v-scale)) 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 0.9rem;
    background: var(--card-bg);
    transition: var(--transition);
}

.chart-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 10%, transparent);
}

.chart-input:disabled,
.chart-input[readonly] {
    background-color: #f8f9fa;
    color: var(--text-muted);
    cursor: default;
}

/* 3. Specific Inputs */
textarea.chart-input {
    resize: none;
    line-height: 1.4;
}

select.chart-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

/* 4. Checkbox & Radio */
.chart-option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    height: 100%;
}

.chart-option-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.chart-option-item input {
    margin: 0;
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

/* 5. Buttons */
.chart-btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chart-btn-primary {
    background: var(--primary-color);
    color: white;
}

.chart-btn-primary:hover {
    background: var(--primary-dark);
}

.chart-btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.chart-btn-outline:hover {
    background: var(--primary-light);
}

/* 6. Utility Classes */
.chart-hidden {
    display: none !important;
}

.chart-error-msg {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 4px;
}


/* 7. Additional theme styles can be added here */