/**
 * Content Submission Wizard & SVG Editor Styles
 * Eyes of Azrael Project
 */

/* ============================================
   Content Submission Wizard Styles
   ============================================ */

.csw-wizard {
    max-width: 1000px;
    margin: 0 auto;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Progress Bar */
.csw-progress {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(147, 112, 219, 0.2);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.csw-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.csw-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.csw-progress-steps {
    display: flex;
    justify-content: space-between;
}

.csw-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.csw-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.csw-progress-step.active .csw-step-circle {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #64ffda;
    color: white;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.4);
}

.csw-progress-step.completed .csw-step-circle {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: #22c55e;
    color: white;
}

.csw-step-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.csw-progress-step.active .csw-step-label {
    color: #64ffda;
    font-weight: 600;
}

/* Wizard Body */
.csw-body {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(147, 112, 219, 0.2);
    border-radius: 20px;
    padding: 2rem;
    min-height: 500px;
}

.csw-step {
    display: none;
    animation: fadeInStep 0.5s ease;
}

.csw-step.active {
    display: block;
}

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

.csw-step-title {
    font-family: 'Cinzel', serif;
    font-size: 1.75rem;
    color: #64ffda;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
}

.csw-step-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Type Selection Grid */
.csw-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.csw-type-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.csw-type-card:hover {
    border-color: rgba(100, 255, 218, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(100, 255, 218, 0.15);
}

.csw-type-card.selected {
    border-color: #64ffda;
    background: rgba(100, 255, 218, 0.1);
}

.csw-type-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.csw-type-label {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: #64ffda;
    margin-bottom: 0.5rem;
}

.csw-type-description {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Form Styles */
.csw-form-container {
    max-width: 800px;
}

.csw-form-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(147, 112, 219, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.csw-section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.125rem;
    color: #9370DB;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(147, 112, 219, 0.2);
}

.csw-section-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
}

.csw-form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.csw-form-group {
    flex: 1;
}

.csw-form-group-lg {
    flex: 2;
}

.csw-form-group-btn {
    flex: 0;
    display: flex;
    align-items: flex-end;
}

.csw-label {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.csw-required {
    color: #ef4444;
}

.csw-input,
.csw-select,
.csw-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(147, 112, 219, 0.2);
    border-radius: 10px;
    color: #e0e0e0;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.csw-input:focus,
.csw-select:focus,
.csw-textarea:focus {
    outline: none;
    border-color: #9370DB;
    box-shadow: 0 0 0 3px rgba(147, 112, 219, 0.15);
}

.csw-input::placeholder,
.csw-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.csw-input-emoji {
    width: 80px;
    text-align: center;
    font-size: 1.5rem;
}

.csw-input-sm {
    width: 100px;
}

.csw-textarea {
    resize: vertical;
    min-height: 100px;
}

.csw-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.25rem;
}

.csw-select option {
    background: #1a1a2e;
    color: #e0e0e0;
}

/* Color Picker */
.csw-color-picker {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.csw-input-color {
    width: 50px;
    height: 40px;
    padding: 0;
    border: 2px solid rgba(147, 112, 219, 0.2);
    border-radius: 8px;
    cursor: pointer;
}

/* Collapsible Sections */
.csw-collapsible-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.csw-collapse-icon {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s;
}

/* Icon Section */
.csw-icon-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.csw-icon-option {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.csw-icon-option:hover {
    border-color: rgba(147, 112, 219, 0.5);
}

.csw-icon-option.active {
    border-color: #9370DB;
    background: rgba(147, 112, 219, 0.1);
}

.csw-icon-option-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.csw-icon-option-label {
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 0.25rem;
}

.csw-icon-option-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.csw-icon-generator {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
}

.csw-icon-controls {
    margin-bottom: 1.5rem;
}

.csw-icon-preview {
    text-align: center;
}

.csw-icon-preview-container {
    width: 150px;
    height: 150px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(147, 112, 219, 0.2);
    border-radius: 16px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.csw-icon-preview-container svg {
    width: 120px;
    height: 120px;
}

.csw-icon-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

/* Relationships Section */
.csw-relationship-list,
.csw-source-list,
.csw-extended-sections {
    margin-bottom: 1rem;
}

.csw-relationship-item,
.csw-source-item,
.csw-extended-section-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(147, 112, 219, 0.1);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.csw-rel-type-badge,
.csw-source-type-badge {
    padding: 0.25rem 0.75rem;
    background: rgba(147, 112, 219, 0.2);
    border-radius: 999px;
    font-size: 0.75rem;
    color: #9370DB;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.csw-rel-entity-name,
.csw-source-citation {
    flex: 1;
    color: #e0e0e0;
}

.csw-btn-remove {
    background: none;
    border: none;
    color: rgba(239, 68, 68, 0.7);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.csw-btn-remove:hover {
    color: #ef4444;
}

/* Tags */
.csw-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.csw-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 999px;
    font-size: 0.8125rem;
    color: #64ffda;
}

.csw-tag-remove {
    background: none;
    border: none;
    color: inherit;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
}

.csw-tag-remove:hover {
    opacity: 1;
}

.csw-add-tag {
    display: flex;
    gap: 0.75rem;
}

.csw-add-tag .csw-input {
    flex: 1;
}

/* Extended Sections */
.csw-section-item-title {
    font-size: 0.9375rem;
    color: #9370DB;
    margin: 0 0 0.25rem 0;
}

.csw-section-item-preview {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    flex: 1;
}

/* Preview Section */
.csw-preview {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
}

.csw-preview-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(147, 112, 219, 0.2);
}

.csw-preview-icon {
    width: 80px;
    height: 80px;
    background: rgba(147, 112, 219, 0.1);
    border: 2px solid rgba(147, 112, 219, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.csw-preview-icon svg {
    width: 60px;
    height: 60px;
}

.csw-preview-emoji {
    font-size: 2.5rem;
}

.csw-preview-title-section {
    flex: 1;
}

.csw-preview-name {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #64ffda;
    margin: 0 0 0.5rem 0;
}

.csw-preview-badges {
    display: flex;
    gap: 0.5rem;
}

.csw-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.csw-badge-type {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.csw-badge-mythology {
    background: rgba(218, 165, 32, 0.2);
    color: #daa520;
    border: 1px solid rgba(218, 165, 32, 0.3);
}

.csw-preview-section {
    margin-bottom: 1rem;
}

.csw-preview-section h4 {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.csw-preview-short {
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
}

.csw-preview-content {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.csw-preview-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.csw-preview-detail {
    font-size: 0.875rem;
}

.csw-preview-detail strong {
    color: rgba(255, 255, 255, 0.6);
}

.csw-preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.csw-preview-relationships,
.csw-preview-sources {
    list-style: none;
    padding: 0;
    margin: 0;
}

.csw-preview-relationships li,
.csw-preview-sources li {
    padding: 0.375rem 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.csw-preview-notice {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
}

.csw-preview-notice p {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Navigation */
.csw-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(147, 112, 219, 0.2);
}

.csw-step-indicator {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.csw-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.csw-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.csw-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.csw-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.csw-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.csw-btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.csw-btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.csw-btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.csw-btn-icon {
    font-size: 1.125rem;
}

/* Success State */
.csw-success-state {
    text-align: center;
    padding: 3rem 2rem;
}

.csw-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: white;
}

.csw-success-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: #22c55e;
    margin: 0 0 1rem 0;
}

.csw-success-message {
    font-size: 1.125rem;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.csw-success-info {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
}

.csw-success-info code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
}

.csw-success-note {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 2rem;
}

.csw-success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Notifications */
.csw-notifications {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.csw-notification {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.3s ease;
}

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

.csw-notification-fade {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.csw-notification-info {
    border-left: 4px solid #3b82f6;
}

.csw-notification-success {
    border-left: 4px solid #22c55e;
}

.csw-notification-warning {
    border-left: 4px solid #fbbf24;
}

.csw-notification-error {
    border-left: 4px solid #ef4444;
}

.csw-notification-message {
    flex: 1;
    font-size: 0.9375rem;
    color: #e0e0e0;
}

.csw-notification-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.csw-notification-close:hover {
    color: #e0e0e0;
}

/* Placeholder Text */
.csw-placeholder-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    padding: 1rem;
}

/* Spinner */
.csw-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   SVG Editor Styles
   ============================================ */

.svge-editor {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 600px;
    background: #0a0e27;
    border: 2px solid rgba(147, 112, 219, 0.2);
    border-radius: 16px;
    overflow: hidden;
    font-family: 'Lato', sans-serif;
}

/* Toolbar */
.svge-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 2px solid rgba(147, 112, 219, 0.2);
    flex-wrap: wrap;
}

.svge-toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.svge-toolbar-right {
    margin-left: auto;
}

.svge-toolbar-separator {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 0.5rem;
}

.svge-toolbar-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-right: 0.25rem;
}

.svge-tool-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s;
}

.svge-tool-btn:hover:not(:disabled) {
    background: rgba(147, 112, 219, 0.2);
    border-color: rgba(147, 112, 219, 0.4);
}

.svge-tool-btn.active {
    background: rgba(147, 112, 219, 0.3);
    border-color: #9370DB;
    color: #9370DB;
}

.svge-tool-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.svge-tool-btn-sm {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
}

.svge-icon {
    font-size: 1rem;
}

.svge-color-input {
    width: 36px;
    height: 36px;
    padding: 2px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
}

.svge-number-input {
    width: 60px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.8125rem;
    text-align: center;
}

.svge-select {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.8125rem;
}

.svge-zoom-display {
    min-width: 50px;
    text-align: center;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Main Area */
.svge-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Canvas Area */
.svge-canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    overflow: auto;
}

.svge-canvas-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    border: 2px solid rgba(147, 112, 219, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.svge-canvas-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

.svge-canvas {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center;
    transition: transform 0.2s;
}

.svge-canvas svg {
    max-width: 100%;
    max-height: 100%;
}

.svge-canvas-empty,
.svge-canvas-error {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    padding: 2rem;
}

.svge-canvas-error {
    color: #ef4444;
}

/* Selection styling */
.svge-selected {
    outline: 2px dashed #64ffda;
    outline-offset: 2px;
}

/* Right Panel */
.svge-panel {
    width: 280px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 2px solid rgba(147, 112, 219, 0.2);
    overflow-y: auto;
}

.svge-panel-section {
    border-bottom: 1px solid rgba(147, 112, 219, 0.1);
}

.svge-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(147, 112, 219, 0.1);
    font-size: 0.8125rem;
    font-weight: 600;
    color: #9370DB;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.svge-panel-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    cursor: pointer;
}

.svge-panel-content {
    padding: 1rem;
}

.svge-panel-empty {
    text-align: center;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* Properties Panel */
.svge-properties {
    font-size: 0.8125rem;
}

.svge-prop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(147, 112, 219, 0.2);
}

.svge-prop-tag {
    font-family: monospace;
    color: #64ffda;
    background: rgba(100, 255, 218, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.svge-prop-section {
    margin-bottom: 1rem;
}

.svge-prop-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.svge-prop-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.svge-prop-row label {
    min-width: 60px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.svge-prop-input {
    flex: 1;
    padding: 0.375rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 0.8125rem;
}

.svge-prop-input-sm {
    width: 50px;
    flex: none;
}

.svge-prop-color {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
}

.svge-prop-range {
    flex: 1;
}

.svge-prop-value {
    min-width: 40px;
    text-align: right;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.svge-prop-full {
    flex-direction: column;
    align-items: stretch;
}

.svge-prop-full label {
    margin-bottom: 0.25rem;
}

.svge-prop-textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #e0e0e0;
    font-family: monospace;
    font-size: 0.75rem;
    resize: vertical;
}

/* Elements Panel */
.svge-elements-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.svge-element-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.svge-element-item:hover {
    background: rgba(147, 112, 219, 0.1);
    border-color: rgba(147, 112, 219, 0.2);
}

.svge-element-item.active {
    background: rgba(147, 112, 219, 0.2);
    border-color: #9370DB;
}

.svge-element-icon {
    font-size: 0.875rem;
    opacity: 0.7;
}

.svge-element-name {
    flex: 1;
    font-size: 0.8125rem;
    color: #e0e0e0;
}

.svge-element-visibility {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.75rem;
}

/* Color Palette */
.svge-palette-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.svge-palette-tab {
    flex: 1;
    padding: 0.375rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.6875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.svge-palette-tab:hover {
    background: rgba(147, 112, 219, 0.1);
}

.svge-palette-tab.active {
    background: rgba(147, 112, 219, 0.2);
    border-color: #9370DB;
    color: #9370DB;
}

.svge-palette-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.375rem;
}

.svge-palette-color {
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.svge-palette-color:hover {
    transform: scale(1.1);
    border-color: white;
}

/* Code Panel */
.svge-code-panel {
    display: flex;
    flex-direction: column;
    height: 200px;
    border-top: 2px solid rgba(147, 112, 219, 0.2);
}

.svge-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    font-size: 0.8125rem;
    font-weight: 600;
    color: #9370DB;
}

.svge-code-actions {
    display: flex;
    gap: 0.5rem;
}

.svge-code-editor {
    flex: 1;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: #e0e0e0;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.8125rem;
    resize: none;
    outline: none;
}

/* Bottom Bar */
.svge-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(147, 112, 219, 0.1);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.svge-status-error {
    color: #ef4444;
}

.svge-status-success {
    color: #22c55e;
}

/* Buttons */
.svge-btn {
    padding: 0.375rem 0.75rem;
    background: rgba(147, 112, 219, 0.2);
    border: 1px solid rgba(147, 112, 219, 0.3);
    border-radius: 4px;
    color: #9370DB;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.svge-btn:hover {
    background: rgba(147, 112, 219, 0.3);
}

.svge-btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
}

.svge-btn-danger {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.svge-btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Responsive */
@media (max-width: 900px) {
    .svge-main {
        flex-direction: column;
    }

    .svge-panel {
        width: 100%;
        border-left: none;
        border-top: 2px solid rgba(147, 112, 219, 0.2);
    }

    .csw-form-row {
        flex-direction: column;
    }

    .csw-icon-options {
        flex-direction: column;
    }

    .csw-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .csw-type-grid {
        grid-template-columns: 1fr;
    }

    .csw-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .csw-step-indicator {
        order: -1;
    }

    .csw-progress-steps {
        display: none;
    }
}

/* ============================================
   Submission Wizard Modal
   ============================================ */

.submission-wizard-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.submission-wizard-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.submission-wizard-modal__content {
    position: relative;
    width: 90%;
    max-width: 1100px;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(var(--color-bg-card-rgb, 26, 31, 58), 0.97);
    border: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
    border-radius: var(--radius-xl, 1rem);
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.submission-wizard-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-primary, #e5e7eb);
    transition: all 0.2s ease;
}

.submission-wizard-modal__close:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
    transform: rotate(90deg);
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .submission-wizard-modal__content {
        width: 95%;
        padding: 1rem;
        max-height: 95vh;
    }
}

/* ============================================
   Add New Entity Card (Browse Grid)
   ============================================ */

.entity-card--add-new {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--color-primary-rgb, 139, 127, 255), 0.08);
    border: 2px dashed rgba(var(--color-primary-rgb, 139, 127, 255), 0.35);
    border-radius: var(--radius-lg, 0.75rem);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 200px;
    text-decoration: none;
    color: var(--color-text-primary, #e5e7eb);
}

.entity-card--add-new:hover {
    background: rgba(var(--color-primary-rgb, 139, 127, 255), 0.15);
    border-color: var(--color-primary, #8B7FFF);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(var(--color-primary-rgb, 139, 127, 255), 0.2);
}

.add-new-card__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    padding: 1.5rem;
}

.add-new-card__icon {
    color: var(--color-primary, #8B7FFF);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.entity-card--add-new:hover .add-new-card__icon {
    opacity: 1;
    transform: scale(1.1);
}

.add-new-card__title {
    font-size: var(--font-size-lg, 1.125rem);
    font-weight: 700;
    color: var(--color-primary, #8B7FFF);
    margin: 0;
}

.add-new-card__desc {
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--color-text-secondary, #9ca3af);
    margin: 0;
}

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