/* Proto-OKN Demonstrator - Main Application Styles
 * Extracted from index.html inline styles
 * This file contains all component and layout styles for the WASM application
 */

/* ===== Base Styles ===== */
html {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family-base, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif);
    margin: 0;
    padding: 0;
    background-color: white;
    color: var(--color-text-dark, #333333);
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* ===== Layout ===== */
.page {
    display: grid;
    grid-template-rows: auto auto;
    gap: 10px;
}

.description {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 0px;
    padding-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-input-area-container {
    width: 100%;
    margin: 0 auto;
}

.settings-row {
    text-align: right;
    margin-bottom: 10px;
}

.input-area {
    display: grid;
    grid-template-rows: auto auto;
    gap: 8px;
    width: min(900px, 80%);
    margin: 0 auto;
    padding: 20px;
}

.input-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.impressum {
    background-color: #f2f2f2;
    padding: 20px;
    text-align: center;
}

/* ===== Loading Spinner ===== */
.loader {
    border: 0px solid #f3f3f3;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ===== Header Styles (REMOVED - Now in header.css) ===== */
/* Header is now server-rendered, see frontend/css/header.css */

/* ===== Button Styles ===== */
.button {
    display: inline-block;
    position: relative;
    margin: 10px;
    padding: 10px 20px;
    height: auto;
    min-height: 48px;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    font-size: var(--font-size-sm, 14px);
    font-weight: var(--font-weight-semibold, 600);
    border-radius: var(--radius-md, 10px);
    background-color: var(--color-primary-purple, #6B4C9A);
    color: white;
    border: none;
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
    transition: var(--transition-all, all 0.2s ease);
    cursor: pointer;
}

.button:hover {
    background-color: #5A3B7E;
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
}

.button:active {
    transform: translateY(1px);
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
}

/* Primary Button */
.btn-primary {
    background-color: var(--color-primary-purple, #6B4C9A);
    color: white;
    border: none;
    border-radius: var(--radius-md, 10px);
    padding: var(--button-padding-base, 10px 20px);
    font-size: var(--font-size-sm, 14px);
    font-weight: var(--font-weight-semibold, 600);
    cursor: pointer;
    transition: var(--transition-all, all 0.2s ease);
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
}

.btn-primary:hover {
    background-color: #5A3B7E;
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
}

/* Secondary Button */
.btn-secondary {
    background-color: white;
    color: var(--color-primary-purple, #6B4C9A);
    border: 2px solid var(--color-primary-purple, #6B4C9A);
    border-radius: var(--radius-md, 10px);
    padding: var(--button-padding-base, 10px 20px);
    font-size: var(--font-size-sm, 14px);
    font-weight: var(--font-weight-semibold, 600);
    cursor: pointer;
    transition: var(--transition-all, all 0.2s ease);
}

.btn-secondary:hover {
    background-color: var(--color-hover-background, #F5F0FA);
}

/* Icon Button (Circular) */
.btn-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-circle, 50%);
    background-color: var(--color-primary-purple, #6B4C9A);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base, 0.2s ease);
    padding: 0;
    font-size: 20px;
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
}

.btn-icon:hover {
    background-color: #7D5BAD;
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
}

.btn-icon:active {
    transform: scale(0.95);
}

/* Arrow Button (Pill-shaped) */
.btn-arrow {
    min-width: 56px;
    height: 48px;
    border-radius: 24px;
    background-color: var(--color-primary-purple, #6B4C9A);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base, 0.2s ease);
    padding: 0 20px;
    font-size: 24px;
    font-weight: bold;
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
}

.btn-arrow:hover {
    background-color: #7D5BAD;
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
}

.btn-arrow:active {
    transform: scale(0.95);
}

.select {
    -webkit-appearance: menulist-button;
    -moz-appearance: none;
    display: inline-block;
    position: relative;
    margin: 10px;
    padding: 0 20px;
    height: 50px;
    text-align: center;
    text-decoration: none;
    font: bold 12px/25px Arial, sans-serif;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, .22);
    -webkit-border-radius: 30px;
    -moz-border-radius: 30px;
    border-radius: 30px;
    -webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, .29), inset 1px 1px 1px rgba(255, 255, 255, .44);
    -moz-box-shadow: 1px 1px 1px rgba(0, 0, 0, .29), inset 1px 1px 1px rgba(255, 255, 255, .44);
    box-shadow: 1px 1px 1px rgba(0, 0, 0, .29), inset 1px 1px 1px rgba(255, 255, 255, .44);
    -webkit-transition: all 0.15s ease;
    -moz-transition: all 0.15s ease;
    -o-transition: all 0.15s ease;
    -ms-transition: all 0.15s ease;
    transition: all 0.15s ease;
}

.oval-link {
    display: inline-block;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    color: rgb(0, 0, 0);
    background-color: #ffffff;
    border: 1px solid #7e7e7e;
    border-radius: 50px;
}

.oval-link:hover {
    background-color: #e7e7e7;
}

.input-mode-toggle-link,
.mode-toggle-btn {
    display: inline-block;
    padding: 8px 20px;
    text-align: center;
    text-decoration: none;
    font-size: var(--font-size-sm, 14px);
    font-weight: var(--font-weight-medium, 500);
    color: var(--color-primary-purple, #6B4C9A);
    background-color: white;
    border-radius: var(--radius-xl, 20px);
    border: 2px solid var(--color-primary-purple, #6B4C9A);
    cursor: pointer;
    transition: var(--transition-all, all 0.2s ease);
}

.input-mode-toggle-link:hover,
.mode-toggle-btn:hover {
    background-color: var(--color-hover-background, #F5F0FA);
}

.input-mode-toggle-link.active,
.mode-toggle-btn.active {
    background-color: var(--color-primary-purple, #6B4C9A);
    color: white;
}

/* ===== Input Fields ===== */
.text-field-input {
    display: flex;
    gap: 10px;
    width: 100%;
    margin: 10px 0;
}

.text-field-input textarea {
    flex: 1;
    width: 100%;
}

.textarea {
    resize: none;
    margin: 0;
    padding: var(--input-padding, 12px 16px);
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    flex: 1;
    width: 100%;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base, 16px);
    line-height: 1.5;
    border-radius: var(--radius-md, 10px);
    border: var(--input-border-width, 2px) solid var(--color-primary-purple, #6B4C9A);
    background-color: white;
    box-shadow: none;
    transition: var(--transition-base, 0.2s ease);
    overflow: hidden;
}

.textarea:focus {
    outline: none;
    border-color: var(--color-light-purple, #9659FF);
    box-shadow: 0 0 0 3px rgba(107, 76, 154, 0.1);
}

/* ===== Text Field (Fixed Bottom) ===== */
.fixed-text-field {
    position: fixed;
    bottom: 0;
    left: 25%;
    background-color: rgb(245, 245, 255);
    border-top: 1px solid #ccc;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    z-index: 1000;
    width: 50%;
    margin: 1rem;
    border-radius: 8px;
}

.text-field-button {
    display: inline-block;
    position: relative;
    margin: 10px;
    padding: 0 20px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    text-decoration: none;
    font: bold 12px/25px Arial, sans-serif;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, .22);
    -webkit-border-radius: 30px;
    -moz-border-radius: 30px;
    border-radius: 30px;
    -webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, .29), inset 1px 1px 1px rgba(255, 255, 255, .44);
    -moz-box-shadow: 1px 1px 1px rgba(0, 0, 0, .29), inset 1px 1px 1px rgba(255, 255, 255, .44);
    box-shadow: 1px 1px 1px rgba(0, 0, 0, .29), inset 1px 1px 1px rgba(255, 255, 255, .44);
    -webkit-transition: all 0.15s ease;
    -moz-transition: all 0.15s ease;
    -o-transition: all 0.15s ease;
    -ms-transition: all 0.15s ease;
    transition: all 0.15s ease;
}

.text-field-textarea {
    resize: none;
    margin: 10px;
    padding: 10px 20px;
    height: 40px;
    width: 100%;
    font: normal 12px/15px Arial, sans-serif;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, .22);
    -webkit-border-radius: 30px;
    -moz-border-radius: 30px;
    border-radius: 30px;
    -webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, .29), inset 1px 1px 1px rgba(255, 255, 255, .44);
    -moz-box-shadow: 1px 1px 1px rgba(0, 0, 0, .29), inset 1px 1px 1px rgba(255, 255, 255, .44);
    box-shadow: 1px 1px 1px rgba(0, 0, 0, .29), inset 1px 1px 1px rgba(255, 255, 255, .44);
}

.text-field-header {
    margin-bottom: 0.25rem;
}

.text-field-header h3 {
    margin: 0;
    font-size: 1rem;
}

.text-field-header p {
    margin: 0;
    font-size: 0.9rem;
}

/* ===== Example Queries (Pill Buttons) ===== */
.example-queries-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.example-pill {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    background: white;
    border: 1px solid #D0D0D0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1.4;
}

.example-pill:hover {
    border-color: var(--color-primary-purple, #6B4C9A);
    color: var(--color-primary-purple, #6B4C9A);
    background: var(--color-hover-background, #F5F0FA);
}

/* ===== Connection Status ===== */
.connection-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
}

.connection-status.connected {
    color: #4CAF50;
}

.connection-status.connecting {
    color: #F5A623;
}

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.connection-status.connected .connection-dot {
    background: #4CAF50;
}

.connection-status.connecting .connection-dot {
    background: #F5A623;
}

/* ===== Queries + Trust Row ===== */
.queries-trust-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.trust-settings-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    background: white;
    border: 1px solid #D0D0D0;
    border-radius: 20px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.trust-settings-btn:hover {
    border-color: var(--color-primary-purple, #6B4C9A);
    color: var(--color-primary-purple, #6B4C9A);
    background: var(--color-hover-background, #F5F0FA);
}


/* ===== Suggestions ===== */
.suggestions-container {
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.suggestion-link {
    text-decoration: none;
    color: #0066cc;
    padding: 0.25rem 0.5rem;
    background-color: #f0f4f8;
    border-radius: 4px;
    font-size: 0.9rem;
}

.suggestion-link:hover {
    background-color: #e0e8f0;
}

/* ===== Tables ===== */
.output_table {
    border-collapse: collapse;
    margin: 25px 0;
    width: 100%;
    font-size: var(--font-size-sm, 14px);
    font-family: var(--font-family-base);
    min-width: 400px;
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
    border-radius: var(--radius-base, 8px);
    overflow: hidden;
}

.output_table thead tr {
    background-color: white;
    color: var(--color-primary-purple, #6B4C9A);
    font-weight: var(--font-weight-semibold, 600);
    text-align: left;
    border-bottom: 2px solid var(--color-primary-purple, #6B4C9A);
}

.output_table th,
.output_table td {
    padding: 12px 15px;
}

.output_table tbody tr {
    border-bottom: 1px solid var(--color-border-light, #E0E0E0);
}

.output_table tbody tr:nth-of-type(even) {
    background-color: var(--color-background-light, #FAFAFA);
}

.output_table tbody tr:last-of-type {
    border-bottom: none;
}

.output_table tbody tr:hover {
    background-color: var(--color-hover-background, #F5F0FA);
}

/* ===== Graph ===== */
.graph {
    display: block;
    border: 1px solid var(--color-border-light, #E0E0E0);
    border-radius: var(--radius-base, 8px);
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Graph wrapper - container for graph and zoom controls */
.graph-wrapper {
    position: relative;
}

/* Graph Zoom Controls */
.graph-zoom-controls {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: var(--z-index-base, 10);
}

.zoom-btn {
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid var(--color-border-medium, #D0D0D0);
    border-radius: var(--radius-sm, 4px);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base, 0.2s ease);
}

.zoom-btn:hover {
    border-color: var(--color-primary-purple, #6B4C9A);
    color: var(--color-primary-purple, #6B4C9A);
    background-color: var(--color-hover-background, #F5F0FA);
}

/* ===== Output Components ===== */
.output-external {
    border: 1px solid black;
}

.output-math {
    border: 0px solid black;
}

.output-image {
    display: block;
    text-align: center;
    margin-bottom: 1em;
}

.output-div-code {
    background-color: #eee;
    border: 1px solid #999;
    display: block;
    padding: 20px;
    font-family: monospace;
}

.output-image img {
    display: block;
    margin: 0 auto;
    max-width: 300px;
    width: 100%;
}

.image-description {
    font-size: smaller;
    display: block;
    margin-top: 0.5em;
}

#wasm-container {
    width: 100%;
    height: 400px;
    overflow: auto;
}

/* ===== Error Display ===== */
.error-container {
    border: 1px solid #ff4d4f;
    border-radius: 4px;
    padding: 16px;
    margin: 16px 0;
    background-color: #fff2f0;
}

.error-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.error-header h3 {
    margin: 0;
    color: #cf1322;
    font-size: 16px;
    font-weight: 600;
}

.error-icon {
    width: 20px;
    height: 20px;
}

.error-description {
    margin-left: 32px;
    color: #595959;
}

.error-description p {
    margin: 0;
    line-height: 1.5;
}

/* ===== Feedback Component ===== */
.feedback {
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 16px;
    margin: 16px 0;
    background-color: #fafafa;
}

.feedback-header {
    margin-bottom: 8px;
}

.feedback-header h3 {
    margin: 0;
    color: #262626;
    font-size: 16px;
    font-weight: 600;
}

.feedback-description {
    margin-bottom: 16px;
    color: #595959;
}

.feedback-description p {
    margin: 0;
    line-height: 1.5;
}

.feedback-input {
    margin-bottom: 12px;
}

.feedback-textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    transition: border-color 0.2s;
}

.feedback-textarea:focus {
    outline: none;
    border-color: #51a7e8;
    box-shadow: 0 0 5px rgba(81, 167, 232, 0.5);
}

.feedback-textarea:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.feedback-textarea::placeholder {
    color: #999;
}

.feedback-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.feedback-button {
    background: none;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-button:hover {
    border-color: #40a9ff;
    background-color: #f0f8ff;
}

.feedback-button:hover:not(:disabled) {
    background-color: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.feedback-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.feedback-button.disabled,
.feedback-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f0f0f0;
}

.feedback-up:hover {
    border-color: #52c41a;
    background-color: #f6ffed;
}

.feedback-up:hover:not(:disabled) {
    background-color: #e8f5e9;
    border-color: #4caf50;
}

.feedback-down:hover {
    border-color: #ff4d4f;
    background-color: #fff2f0;
}

.feedback-down:hover:not(:disabled) {
    background-color: #ffebee;
    border-color: #f44336;
}

.feedback-icon {
    width: 20px;
    height: 20px;
    display: block;
}

/* ===== SPARQL Syntax Highlighting ===== */
.keywords {
    color: #770097;
}

.variable {
    color: #2260C4;
}

.string {
    color: #00521C;
}

.prefix {
    color: #FF9842;
}

.url {
    color: #42916B;
}

/* ===== Blockly Visual Editor ===== */
.play-button {
    width: 40px;
    height: 40px;
    box-sizing: border-box;
    color: #1a73e8;
    cursor: pointer;
    display: inline-block;
    font: 500 14px / 36px var(--font-family);
    padding: 0 16px;
    position: absolute;
    right: -60px;
    bottom: -40px;
}

#blocklyDiv {
    float: left !important;
    height: 100% !important;
    width: 130% !important;
}

.blocklyFlyoutBackground {
    fill: #39272e38 !important;
}

.operate {
    height: 60%;
    width: 100%;
    display: flex;
    position: relative;
}

.main {
    height: 600px;
    width: 80%;
}

/* ===== Trust Widget ===== */
.trust-widget {
    font-family: Arial, sans-serif;
    line-height: 1.4;
}

.trust-widget .input-container {
    transition: box-shadow 0.2s ease;
}

.trust-widget .input-container:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.trust-widget input[type="number"]:focus {
    outline: none;
    border-color: #007acc;
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}

.trust-widget .intermediate-container {
    transition: all 0.2s ease;
}

.trust-widget .intermediate-container:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 122, 204, 0.15);
}

.trust-widget [id^="intermediate_"],
.trust-widget #final_result {
    transition: background-color 0.3s ease;
}

.trust-widget [id^="intermediate_"].updated,
.trust-widget #final_result.updated {
    background-color: #fff3cd !important;
    animation: valueFlash 0.6s ease;
}

@keyframes valueFlash {
    0% {
        background-color: #fff3cd;
    }
    100% {
        background-color: white;
    }
}

/* ===== Trust Panel ===== */
.trust-panel-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.trust-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.trust-panel-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trust-panel-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.trust-input-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.trust-panel-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.save-btn {
    background: #007acc;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

/* ===== Modal/Dialog Styles ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-modal, 9999);
    animation: fadeIn 0.2s ease;
}

.modal-dialog {
    background: white;
    border-radius: var(--radius-lg, 12px);
    padding: var(--modal-padding, 32px);
    max-width: var(--modal-max-width, 600px);
    width: 90%;
    box-shadow: var(--shadow-xl, 0 10px 40px rgba(0, 0, 0, 0.2));
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    font-size: var(--font-size-xl, 20px);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--color-text-dark, #333);
    margin-bottom: var(--spacing-base, 16px);
}

.modal-section {
    margin-bottom: var(--spacing-xl, 24px);
}

.modal-label {
    font-size: var(--font-size-sm, 14px);
    color: var(--color-primary-purple, #6B4C9A);
    font-weight: var(--font-weight-semibold, 600);
    margin-bottom: var(--spacing-sm, 8px);
    display: block;
}

.modal-value {
    font-size: var(--font-size-base, 16px);
    color: var(--color-text-dark, #333);
    margin-bottom: var(--spacing-base, 16px);
    line-height: var(--line-height-normal, 1.5);
}

.modal-code-box {
    background: var(--color-background-code, #F5F5F5);
    border: 1px solid var(--color-border-light, #E0E0E0);
    border-radius: var(--radius-base, 8px);
    padding: var(--spacing-base, 16px);
    font-family: var(--font-family-monospace);
    font-size: 13px;
    overflow-x: auto;
    margin-bottom: var(--spacing-base, 16px);
    position: relative;
}

.modal-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm, 8px);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: var(--spacing-xl, 24px);
}

/* ===== Icon Buttons ===== */
.icon-btn {
    background: transparent;
    border: 1px solid var(--color-border-medium, #D0D0D0);
    border-radius: var(--radius-sm, 4px);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: var(--spacing-sm, 8px);
    transition: var(--transition-all, all 0.2s ease);
    font-size: 14px;
}

.icon-btn:hover {
    border-color: var(--color-primary-purple, #6B4C9A);
    background: var(--color-hover-background, #F5F0FA);
    color: var(--color-primary-purple, #6B4C9A);
}

/* ===== Download Buttons ===== */
.download-btn,
.edit-btn {
    background: white;
    border: 2px solid var(--color-primary-purple, #6B4C9A);
    border-radius: var(--radius-base, 8px);
    color: var(--color-primary-purple, #6B4C9A);
    padding: 8px 16px;
    font-size: var(--font-size-sm, 14px);
    font-weight: var(--font-weight-semibold, 600);
    cursor: pointer;
    transition: var(--transition-all, all 0.2s ease);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.download-btn:hover,
.edit-btn:hover {
    background: var(--color-primary-purple, #6B4C9A);
    color: white;
}

/* ===== Map Container with Purple Frame ===== */
.map-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.map-container .container-with-download > div {
    border: 1px solid var(--color-primary-purple, #6B4C9A);
    border-radius: var(--radius-base, 8px);
    width: 100%;
    height: 400px;
}

/* Container with download button - provides positioning context */
.container-with-download {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Floating download button - positioned on right side outside content */
.download-btn-floating {
    position: absolute;
    right: -100px;
    top: 0;
    background: white;
    border: 2px solid var(--color-primary-purple, #6B4C9A);
    border-radius: var(--radius-base, 8px);
    color: var(--color-primary-purple, #6B4C9A);
    padding: 8px 16px;
    font-size: var(--font-size-sm, 14px);
    font-weight: var(--font-weight-semibold, 600);
    cursor: pointer;
    transition: var(--transition-all, all 0.2s ease);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 50;
}

.download-btn-floating:hover {
    background: var(--color-primary-purple, #6B4C9A);
    box-shadow: 0 4px 12px rgba(107, 76, 154, 0.3);
}

/* Download button icon - use SVG instead of emoji */
.download-btn-floating img {
    width: 16px;
    height: 16px;
}

.download-btn-floating:hover img {
    filter: brightness(0) invert(1);
}

/* ===== Labeled Content Layout (Header | Divider | Content) ===== */
.labeled-content {
    display: grid;
    grid-template-columns: auto 4px 1fr;
    gap: 20px;
    align-items: start;
    margin: 0;
    padding: 0;
}

.label-section {
    font-size: var(--font-size-base, 16px);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--color-primary-purple, #6B4C9A);
    min-width: 180px;
    padding-right: 16px;
    text-align: left;
}

.divider-line {
    width: 4px;
    background-color: var(--color-primary-purple, #6B4C9A);
    align-self: stretch;
    border-radius: 2px;
}

.content-section {
    font-size: var(--font-size-base, 16px);
    color: var(--color-text-dark, #333);
    line-height: var(--line-height-normal, 1.5);
    position: relative;
}

.code-header-buttons {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 8px;
}

.code-content {
    background: var(--color-background-code, #F5F5F5);
    border: 1px solid var(--color-border-light, #E0E0E0);
    border-radius: var(--radius-base, 8px);
    padding: 16px;
    padding-top: 48px;
    font-family: var(--font-family-monospace, 'Courier New', Courier, monospace);
    font-size: 13px;
    overflow-x: auto;
    white-space: pre;
    margin: 0;
}

.code-content code {
    font-family: inherit;
}

/* ===== Dialog Container (Inline, No Modal) ===== */
.dialog-container {
    margin: 0;
}

.dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    margin-bottom: 24px;
    padding-left: 200px; /* Align with content section, accounting for label + divider */
}

.dialog-actions .btn-primary,
.dialog-actions button.btn-primary,
button.btn-primary {
    background-color: #6B4C9A !important;
    background: #6B4C9A !important;
    color: white !important;
    border: none !important;
}

.dialog-actions .btn-primary:hover,
.dialog-actions button.btn-primary:hover,
button.btn-primary:hover {
    background-color: #5A3B7E !important;
    background: #5A3B7E !important;
}

/* ===== Section Headers ===== */
.section-header {
    font-size: var(--font-size-lg, 18px);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--color-primary-purple, #6B4C9A);
    margin-top: var(--spacing-xl, 24px);
    margin-bottom: var(--spacing-md, 12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h3 {
    font-weight: var(--font-weight-semibold, 600);
    color: var(--color-primary-purple, #6B4C9A);
    margin: 0;
}

/* ===== Visual SPARQL Builder Updates ===== */
.visual-builder-container {
    display: grid;
    grid-template-columns: 200px 1fr 300px;
    height: calc(100vh - 200px);
    gap: 0;
    border: 1px solid var(--color-border-light, #E0E0E0);
    border-radius: var(--radius-base, 8px);
    overflow: hidden;
    margin: var(--spacing-lg, 20px);
}

.visual-builder-sidebar {
    background: var(--color-background-gray, #F5F5F5);
    border-right: 1px solid var(--color-border-light, #E0E0E0);
    overflow-y: auto;
    padding: var(--spacing-base, 16px);
}

.visual-builder-canvas {
    background: white;
    position: relative;
}

.visual-builder-preview {
    background: #F9F9F9;
    border-left: 1px solid var(--color-border-light, #E0E0E0);
    padding: var(--spacing-base, 16px);
    overflow-y: auto;
    font-family: var(--font-family-monospace);
    font-size: 13px;
}

.visual-builder-preview h3 {
    margin-top: 0;
    color: var(--color-primary-purple, #6B4C9A);
    font-size: var(--font-size-base, 16px);
}

/* Sidebar Buttons */
.sidebar-btn {
    width: 100%;
    background: white;
    border: 2px solid var(--color-primary-purple, #6B4C9A);
    border-radius: var(--radius-base, 8px);
    color: var(--color-primary-purple, #6B4C9A);
    padding: 10px;
    font-size: var(--font-size-sm, 14px);
    font-weight: var(--font-weight-semibold, 600);
    margin-bottom: var(--spacing-md, 12px);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm, 8px);
    transition: var(--transition-base, 0.2s ease);
}

.sidebar-btn:hover {
    background: var(--color-hover-background, #F5F0FA);
}

/* Toolbox Categories */
.toolbox-category {
    background: white;
    border: 1px solid var(--color-border-light, #E0E0E0);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: var(--spacing-sm, 8px);
    cursor: pointer;
    transition: var(--transition-all, all 0.2s ease);
    font-size: var(--font-size-sm, 14px);
}

.toolbox-category:hover {
    border-color: var(--color-primary-purple, #6B4C9A);
}

.toolbox-category.active {
    background: var(--color-primary-purple, #6B4C9A);
    color: white;
    border-color: var(--color-primary-purple, #6B4C9A);
}

/* Update Blockly styles */
#blocklyDiv {
    float: none !important;
    height: 100% !important;
    width: 100% !important;
}

/* ===== Hero Section ===== */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 20px;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px;
    text-align: center;
}

.hero-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
    text-align: center;
}

.hero-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .hero-logo {
        max-width: 150px;
    }
}

/* ===== SPARQL Visualization Styles ===== */
.sparql-visualization-container {
    width: 100%;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background-color: #f9f9f9;
}

.sparql-viz-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.sparql-blockly-container,
.sparql-input-container {
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    overflow: hidden;
}

.sparql-viz-title {
    background-color: #93AFC4;
    color: white;
    padding: 10px;
    font-weight: 600;
    font-size: 16px;
}

.sparql-blockly-div {
    width: 100%;
    height: 500px;
}

.sparql-code-input {
    min-height: 400px;
    padding: 15px;
    font-family: monospace;
    font-size: 14px;
    overflow: auto;
    white-space: pre;
    background-color: #f5f5f5;
}

.sparql-code-input:focus {
    outline: 2px solid #93AFC4;
    background-color: white;
}

.sparql-update-btn {
    width: 100%;
    padding: 12px;
    background-color: #98aec2;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.sparql-update-btn:hover {
    background-color: #7a95b0;
}

.sparql-update-btn:active {
    background-color: #6a859f;
}
