/**
 * Code Editor CSS
 * Minimale Styles die REDAXO nicht verwendet
 */

/* Editor Toolbar */
.code-container .editor-toolbar {
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}

/* File Browser */
.code-container .file-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.code-container .file-row:hover {
    background-color: rgba(0,123,255,0.05);
    transform: translateX(2px);
}

.code-container .folder-row {
    cursor: pointer;
    transition: all 0.15s ease;
}

.code-container .folder-row:hover {
    background-color: rgba(255,193,7,0.1);
    transform: translateX(2px);
}

/* File Status */
#fileStatus {
    transition: all 0.2s ease;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 12px;
}

#fileStatus.modified {
    background-color: #fd7e14;
    color: white;
    animation: pulse 2s infinite;
}

#fileStatus.saved {
    background-color: #198754;
    color: white;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Breadcrumb */
.code-container .breadcrumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 15px;
    margin: 0 0 20px 0;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.code-container .breadcrumb a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: color 0.2s ease;
}

.code-container .breadcrumb a:hover {
    color: white;
    text-shadow: 0 0 8px rgba(255,255,255,0.8);
}

/* Search Results */
.search-result {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-result:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.search-result-file {
    font-weight: 600;
    color: #0056b3;
    margin-bottom: 10px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.search-result-file:hover {
    color: #003d82;
    text-decoration: underline;
}

.search-result-match {
    background: white;
    border-left: 4px solid #0056b3;
    padding: 8px 12px;
    margin: 8px 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    border-radius: 0 4px 4px 0;
    transition: border-left-color 0.2s ease;
}

.search-result-match:hover {
    border-left-color: #003d82;
}

.search-result-line {
    color: #6c757d;
    font-size: 10px;
    display: inline-block;
    min-width: 50px;
    font-weight: bold;
}

/* Backup Actions */
.backup-actions .btn {
    margin-right: 6px;
    transition: all 0.2s ease;
}

.backup-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Monaco Editor Container */
#monacoEditor {
    border: 1px solid #dee2e6;
    border-radius: 0 0 6px 6px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

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

.fa-spinner.fa-spin {
    animation: spin 1s linear infinite;
}

/* Button Hover Effects */
.code-container .btn {
    transition: all 0.2s ease;
}

.code-container .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Panel Enhancements */
.code-container .panel {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: none;
    border-radius: 8px;
    overflow: hidden;
}

.code-container .panel-heading {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    border: none;
    color: white;
}

.code-container .panel-heading .btn {
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
}

.code-container .panel-heading .btn:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

/* Table Enhancements */
.code-container .table > tbody > tr > td {
    vertical-align: middle;
    border-color: #dee2e6;
}

.code-container .table > thead > tr > th {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    .code-container .editor-toolbar .btn-group {
        margin-top: 10px;
    }
    
    .code-container .panel-heading .btn-group {
        margin-top: 5px;
    }
    
    #monacoEditor {
        height: 400px !important;
    }
}

/* Fullscreen Mode */
.editor-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: #1e1e1e !important;
    margin: 0 !important;
}

.editor-fullscreen .panel-body {
    padding: 0 !important;
    height: calc(100vh - 60px) !important;
}

.editor-fullscreen #monaco-editor {
    height: calc(100vh - 60px) !important;
    border: none !important;
    border-radius: 0 !important;
}

.editor-fullscreen .panel-heading {
    background: linear-gradient(135deg, #2d2d30 0%, #1e1e1e 100%) !important;
    border: none !important;
    border-radius: 0 !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
}

/* Fullscreen Button Icon Animation */
#btn-fullscreen .rex-icon {
    transition: transform 0.2s ease;
}

.editor-fullscreen #btn-fullscreen .rex-icon {
    transform: rotate(45deg);
}

/* Body overflow hiding für Fullscreen */
body.editor-fullscreen-active {
    overflow: hidden !important;
}

/* Monaco Fullscreen Override */
.monaco-wrapper.monaco-fullscreen {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 10000;
    background: #1e1e1e;
    display: flex !important;
    flex-direction: column !important;
}

.monaco-wrapper.monaco-fullscreen .monaco-editor-container {
    flex: 1 !important;
    height: auto !important;
    width: 100% !important;
}

.monaco-wrapper.monaco-fullscreen .monaco-toolbar {
    border-radius: 0;
}

body.rex-theme-light .monaco-wrapper.monaco-fullscreen {
    background: #ffffff;
}
