/**
 * MDM Manager - Styles
 * Custom styles to complement Vuetify
 */

/* 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);
}

/* External System Card customizations */
.external-system-card .v-card-title {
    padding-bottom: 8px !important;
}

.external-system-card .v-card-text {
    padding-top: 8px !important;
}

.external-system-card .v-card-actions {
    padding-top: 8px !important;
    justify-content: flex-end;
}

/* Data table customizations */
.v-data-table td {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 960px) {
    .v-data-table td {
        max-width: 150px;
    }
}

/* Custom spacing for mobile */
@media (max-width: 600px) {
    .v-container {
        padding: 12px !important;
    }
    
    .v-card {
        margin-bottom: 16px !important;
    }
}

/* System info layout */
.system-info {
    flex: 1;
}

/* Improve chip spacing */
.v-chip + .v-chip {
    margin-left: 4px;
}

/* External attributes styling */
.external-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Mapping details */
.mapping-details {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Form styling improvements */
.v-dialog .v-card {
    overflow-y: auto;
}

.v-dialog .v-card-text {
    max-height: 70vh;
    overflow-y: auto;
}

/* Attribute card styling */
.attribute-card {
    margin-bottom: 12px;
}

.attribute-card .v-card-text {
    padding: 16px !important;
}

/* Button group improvements */
.v-btn-group .v-btn {
    min-width: auto !important;
}

/* Tooltip improvements */
.v-tooltip .v-overlay__content {
    font-size: 0.75rem;
}

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

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

/* Table action buttons */
.table-actions .v-btn {
    min-width: auto !important;
    width: 32px !important;
    height: 32px !important;
}

/* Status chips */
.status-chip--active {
    background-color: rgba(76, 175, 80, 0.12) !important;
    color: #2e7d32 !important;
}

.status-chip--inactive {
    background-color: rgba(244, 67, 54, 0.12) !important;
    color: #c62828 !important;
}

/* Primary key badge */
.primary-key-badge {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Mapping attribute chips */
.mapping-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

/* System identifier chip */
.system-identifier-chip {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
}

/* Card hover effects */
.external-system-card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease-in-out;
}

/* Form validation styling */
.v-input--error .v-field__outline {
    border-color: #e74c3c !important;
}

/* Loading overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.v-theme--dark .loading-overlay {
    background: rgba(0, 0, 0, 0.8);
}

/* Dark theme adjustments */
.v-theme--dark .external-system-card {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.v-theme--dark .v-chip {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Navigation improvements */
.v-tabs .v-tab {
    text-transform: none !important;
    font-weight: 500 !important;
}

.v-navigation-drawer .v-list-item {
    padding: 8px 16px !important;
}

/* Snackbar positioning */
.v-snackbar {
    margin-top: 64px !important; /* Account for app bar height */
}

/* Dialog improvements */
.v-dialog .v-card-title {
    background-color: rgba(var(--v-theme-primary), 0.1);
    border-bottom: 1px solid rgba(var(--v-theme-on-surface), 0.12);
}

/* Form section headers */
.form-section-header {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 24px 0 16px 0;
    color: rgba(var(--v-theme-primary));
}

/* Attribute form styling */
.attribute-form {
    border: 1px solid rgba(var(--v-theme-on-surface), 0.12);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    background-color: rgba(var(--v-theme-surface), 0.5);
}

/* Mobile optimizations */
@media (max-width: 600px) {
    .v-app-bar-title {
        font-size: 1.1rem !important;
    }
    
    .v-btn .v-btn__content {
        font-size: 0.875rem;
    }
    
    .v-dialog {
        margin: 8px !important;
    }
    
    .v-dialog .v-card {
        max-height: calc(100vh - 16px) !important;
    }
}

/* Entity Details Dialog Enhancements */
.entity-details-dialog .v-card-title {
    background: linear-gradient(135deg, rgba(var(--v-theme-primary), 0.05), rgba(var(--v-theme-secondary), 0.05));
    border-bottom: 1px solid rgba(var(--v-theme-on-surface), 0.12);
    position: sticky;
    top: 0;
    z-index: 1;
}

.entity-details-section {
    padding: 16px 0;
    border-bottom: 1px solid rgba(var(--v-theme-on-surface), 0.08);
}

.entity-details-section:last-child {
    border-bottom: none;
}

.entity-info-card {
    background: rgba(var(--v-theme-surface), 0.8);
    transition: all 0.2s ease;
}

.entity-info-card:hover {
    background: rgba(var(--v-theme-surface), 1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.attribute-card {
    background: linear-gradient(135deg, rgba(var(--v-theme-surface), 0.8), rgba(var(--v-theme-surface), 1));
    border-left: 3px solid rgba(var(--v-theme-primary), 0.3);
    transition: all 0.2s ease;
}

.attribute-card:hover {
    border-left-color: rgba(var(--v-theme-primary), 0.6);
    transform: translateX(2px);
}

.attribute-value-code {
    background: rgba(var(--v-theme-on-surface), 0.08) !important;
    border: 1px solid rgba(var(--v-theme-on-surface), 0.12);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.875rem;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    max-width: 100%;
    word-break: break-all;
}

.v-theme--dark .attribute-value-code {
    background: rgba(var(--v-theme-on-surface), 0.12) !important;
    border-color: rgba(var(--v-theme-on-surface), 0.2);
}

.section-header {
    font-weight: 600 !important;
    letter-spacing: 0.5px;
}

.metadata-card {
    background: linear-gradient(135deg, rgba(var(--v-theme-info), 0.05), rgba(var(--v-theme-info), 0.02));
}

/* Entity dialog responsive improvements */
@media (max-width: 600px) {
    .entity-details-dialog .v-container {
        padding: 8px !important;
    }
    
    .entity-info-card {
        margin-bottom: 8px !important;
    }
    
    .attribute-card {
        margin-bottom: 8px !important;
    }
    
    .section-header {
        font-size: 1.1rem !important;
    }
}