/**
 * Configuration Manager - Styles
 */

/* General app styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

/* Loading indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 50vh;
}

/* Theme toggle styles */
.theme-toggle-icon {
    transition: transform 0.3s ease;
}

.theme-toggle-icon--dark {
    transform: rotate(180deg);
}

/* Header and navigation styles */
.v-app-bar-title {
    font-weight: 500 !important;
}

/* Configuration card styles */
.configuration-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.configuration-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Template card styles */
.template-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 4px solid rgb(var(--v-theme-primary)) !important;
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 97, 255, 0.2) !important;
}

/* Hierarchy tree styles */
.hierarchy-tree {
    max-height: 600px;
    overflow-y: auto;
}

.hierarchy-tree .v-treeview-item {
    margin-bottom: 8px;
}

.hierarchy-tree .v-treeview-item__content {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(var(--v-border-color), 0.12);
    background-color: rgba(var(--v-theme-surface), 1);
}

.hierarchy-tree .v-treeview-item__content:hover {
    background-color: rgba(var(--v-theme-primary), 0.04);
    border-color: rgba(var(--v-theme-primary), 0.2);
}

/* Configuration value display */
.config-value-key {
    font-weight: 500;
    color: var(--v-theme-primary);
}

.config-value-value {
    font-family: 'Roboto Mono', monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875em;
}

.v-theme--dark .config-value-value {
    background: rgba(255, 255, 255, 0.1);
}

/* JSON syntax highlighting */
.json-display {
    font-family: 'Roboto Mono', monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 12px;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 0.875em;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.v-theme--dark .json-display {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Form styles */
.config-form .v-text-field,
.config-form .v-textarea,
.config-form .v-select {
    margin-bottom: 8px;
}

/* Value type specific styles */
.value-type-string {
    border-left: 3px solid #2196F3;
}

.value-type-number {
    border-left: 3px solid #4CAF50;
}

.value-type-boolean {
    border-left: 3px solid #FF9800;
}

.value-type-json {
    border-left: 3px solid #9C27B0;
}

.value-type-url {
    border-left: 3px solid #F44336;
}

/* Key-value pair display */
.key-value-pair {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.v-theme--dark .key-value-pair {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
}

.key-value-pair .key {
    font-weight: 500;
    margin-right: 12px;
    min-width: 120px;
    color: var(--v-theme-primary);
}

.key-value-pair .value {
    flex: 1;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.875em;
}

.key-value-pair .type-indicator {
    margin-left: 8px;
    font-size: 0.75em;
    opacity: 0.7;
}

/* Configuration status indicators */
.config-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.config-status--active {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.config-status--inactive {
    background: rgba(158, 158, 158, 0.1);
    color: #9E9E9E;
}

/* Empty state styles */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state .v-icon {
    opacity: 0.5;
    margin-bottom: 16px;
}

.empty-state h3 {
    margin-bottom: 8px;
    opacity: 0.8;
}

.empty-state p {
    opacity: 0.6;
    margin-bottom: 24px;
}

/* Search and filter styles */
.search-filters {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.v-theme--dark .search-filters {
    background: rgba(255, 255, 255, 0.02);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .key-value-pair {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .key-value-pair .key {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 4px;
    }
    
    .configuration-card {
        margin-bottom: 16px;
    }
}

/* Animation styles */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

.slide-enter-active,
.slide-leave-active {
    transition: all 0.3s ease;
}

.slide-enter-from {
    transform: translateX(-100%);
    opacity: 0;
}

.slide-leave-to {
    transform: translateX(100%);
    opacity: 0;
}

/* Configuration value chips */
.config-values-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.config-values-preview .v-chip {
    font-size: 0.75em;
    height: 24px;
}

/* Syntax highlighting for JSON */
.json-key {
    color: #0066CC;
    font-weight: 500;
}

.json-string {
    color: #008000;
}

.json-number {
    color: #FF6600;
}

.json-boolean {
    color: #0066CC;
    font-weight: bold;
}

.json-null {
    color: #999999;
    font-style: italic;
}

/* Dark theme JSON syntax */
.v-theme--dark .json-key {
    color: #66B3FF;
}

.v-theme--dark .json-string {
    color: #66FF66;
}

.v-theme--dark .json-number {
    color: #FFAA66;
}

.v-theme--dark .json-boolean {
    color: #66B3FF;
}

.v-theme--dark .json-null {
    color: #CCCCCC;
}

/* Form validation styles */
.v-input--error .v-field__outline {
    border-color: #F44336 !important;
    border-width: 2px !important;
}

.v-input--error .v-field-label {
    color: #F44336 !important;
}

/* Toolbar and action styles */
.config-toolbar {
    background: transparent;
    padding: 0;
}

.config-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Card hover effects */
.v-card.configuration-card {
    position: relative;
    overflow: hidden;
}

.v-card.configuration-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.v-card.configuration-card:hover::before {
    left: 100%;
}

/* Loading states */
.loading-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: 9999;
}

.loading-content {
    background: white;
    padding: 32px;
    border-radius: 8px;
    text-align: center;
    min-width: 200px;
}

.v-theme--dark .loading-content {
    background: #1e1e1e;
}

/* Success/error message styles */
.success-message {
    color: #4CAF50;
    font-weight: 500;
}

.error-message {
    color: #F44336;
    font-weight: 500;
}

/* Utility classes */
.text-monospace {
    font-family: 'Roboto Mono', monospace;
}

.bg-subtle {
    background: rgba(0, 0, 0, 0.02);
}

.v-theme--dark .bg-subtle {
    background: rgba(255, 255, 255, 0.02);
}

.border-subtle {
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.v-theme--dark .border-subtle {
    border-color: rgba(255, 255, 255, 0.08);
}