/* Chart Generator Styles */
.chart-title-display {
    text-align: center;
}

.chart-description-display {
    margin: 0 0 20px 0;
    font-size: 0.95em;
    color: #a8c4d8;
    text-align: center;
    line-height: 1.5;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.chart-container {
    position: relative;
    width: 100%;
    /* max-width: 600px; */
    margin: 0 auto 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
}

/* .chart-container canvas {
    max-height: 400px;
} */

.chart-item .no-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #88aacc;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    margin-bottom: 20px;
}

.chart-item .no-chart span {
    font-size: 3em;
    margin-bottom: 10px;
    opacity: 0.5;
}

.chart-item .creation-meta-info .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(54, 162, 235, 0.08);
    border-radius: 6px;
    color: #a8c4d8;
}

/* Optional input wrap for chart title */
.optional-input-wrap {
    margin-bottom: 20px;
}

.optional-input-wrap label {
    display: block;
    margin-bottom: 8px;
    color: #a8c4d8;
    font-size: 0.9em;
}

.optional-input-wrap input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #f0f6fc;
    font-size: 1em;
}

.optional-input-wrap input:focus {
    outline: none;
    border-color: rgba(54, 162, 235, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.optional-input-wrap input::placeholder {
    color: #6b7280;
}

/* Chart output in generation */
/* .chart-output {
    background: linear-gradient(135deg, rgba(54, 162, 235, 0.05) 0%, rgba(153, 102, 255, 0.05) 100%);
    border-radius: 12px;
    padding: 20px;
} */

.chart-output .chart-render-container {
    position: relative;
    width: 100%;
    /* max-width: 500px; */
    margin: 0 auto 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
}

.chart-output .chart-render-container canvas {
    max-height: 350px;
}

.chart-output .chart-generated-title {
    text-align: center;
    color: #6afcff;
    margin: 0 0 15px 0;
    font-size: 1.1em;
}

/* Export buttons */
.chart-export-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.chart-export-btn {
    padding: 8px 16px;
    background: rgba(54, 162, 235, 0.2);
    border: 1px solid rgba(54, 162, 235, 0.3);
    border-radius: 6px;
    color: #36A2EB;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.chart-export-btn:hover {
    background: rgba(54, 162, 235, 0.3);
    border-color: rgba(54, 162, 235, 0.5);
}

/* Chart Embed Modal */
.chart-embed-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.chart-embed-modal-content {
    background: #1a1a2e;
    border: 1px solid rgba(54, 162, 235, 0.3);
    border-radius: 12px;
    padding: 25px;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow: auto;
}

.chart-embed-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chart-embed-modal-header h3 {
    margin: 0;
    color: #f0f6fc;
    font-size: 1.2em;
}

.chart-embed-close {
    background: none;
    border: none;
    color: #88aacc;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.chart-embed-close:hover {
    color: #ff6b6b;
}

.chart-embed-instructions {
    color: #88aacc;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.chart-embed-code-wrap {
    float: left;
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.chart-embed-code {
    width: 100%;
    min-height: 300px;
    background: transparent;
    border: none;
    color: #6afcff;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    line-height: 1.5;
    resize: vertical;
}

.chart-embed-code:focus {
    outline: none;
}

.chart-embed-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    float: left;
    margin: 25px 0 0;
}

.chart-embed-copy-btn {
    padding: 10px 20px;
    background: rgba(54, 162, 235, 0.2);
    border: 1px solid rgba(54, 162, 235, 0.4);
    border-radius: 8px;
    color: #36A2EB;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s ease;
}

.chart-embed-copy-btn:hover {
    background: rgba(54, 162, 235, 0.3);
    border-color: rgba(54, 162, 235, 0.6);
}

/* Chart Data Toggle Section */
.chart-data-section {
    margin: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.chart-data-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(54, 162, 235, 0.1);
    border: 1px solid rgba(54, 162, 235, 0.3);
    border-radius: 8px;
    color: #36A2EB;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.chart-data-toggle:hover {
    background: rgba(54, 162, 235, 0.2);
    border-color: rgba(54, 162, 235, 0.5);
}

.chart-data-toggle svg {
    opacity: 0.8;
}

.chart-data-content {
    display: none;
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    position: relative;
}

.chart-data-content.expanded {
    display: block;
}

.chart-json-display {
    margin: 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.chart-json-display code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.85em;
    line-height: 1.6;
    color: #6afcff;
    white-space: pre;
}

.copy-json-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 14px;
    background: rgba(54, 162, 235, 0.15);
    border: 1px solid rgba(54, 162, 235, 0.3);
    border-radius: 6px;
    color: #36A2EB;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s ease;
}

.copy-json-btn:hover {
    background: rgba(54, 162, 235, 0.25);
    border-color: rgba(54, 162, 235, 0.5);
}

/* Variation Source Box */
.variation-source-box {
    background: rgba(54, 162, 235, 0.08);
    border: 1px solid rgba(54, 162, 235, 0.25);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.variation-source-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #88aacc;
    margin-bottom: 10px;
}

.variation-source-header a {
    color: #36A2EB;
    text-decoration: none;
}

.variation-source-header a:hover {
    text-decoration: underline;
}

.variation-source-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #f0f6fc;
    margin-bottom: 8px;
}

.variation-source-description {
    font-size: 0.9em;
    color: #a8c4d8;
    margin-bottom: 10px;
    line-height: 1.5;
}

.variation-source-prompt {
    font-size: 0.85em;
    color: #88aacc;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 12px;
    border-radius: 6px;
}

.variation-source-prompt strong {
    color: #a8c4d8;
}

/* Responsive */
@media (max-width: 768px) {
    .chart-container {
        padding: 15px;
    }
    
    .chart-container canvas {
        max-height: 300px;
    }
    
    .chart-item .creation-meta-info .meta-item {
        font-size: 0.8em;
        padding: 3px 8px;
    }
    
    .chart-embed-modal-content {
        padding: 15px;
    }
    
    .chart-embed-code {
        font-size: 0.75em;
        min-height: 200px;
    }
}

