.wfe-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-direction: row-reverse;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    min-height: 420px;
    position: relative;
}
.wfe-sidebar {
    width: 340px;
    min-width: 280px;
    padding: 50px 10px 48px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: width 0.2s ease;
}

.wfe-sidebar[data-collapsed="true"] {
    width: 72px;
    min-width: 72px;
    padding: 18px 12px;
}

.wfe-sidebar[data-collapsed="true"] .wfe-sidebar-inner {
    display: none;
}

.wfe-sidebar-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    border: 1px solid #ccd0d4;
    background: #fff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
}

@media (max-width: 750px) {
  .wfe-container  {
    flex-direction: column-reverse;
  }
  .wfe-sidebar {
    width: 100% !important;
  }
  .wfe-editor-area {
    padding: 15px !important;
  }
}
.wfe-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.wfe-editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px 0 15px 15px;
}
#wfe-editor {
    height: 60vh;
}
.wfe-filename {
    font-weight: bold;
    margin-bottom: 6px;
}
.wfe-diff {
    display: none;
    margin-top: 10px;
    border: 1px solid #ddd;
    background: #fff;
    max-height: 300px;
    overflow: auto;
    padding: 10px;
    flex-direction: column-reverse;
}
.aadvana-darkskin .wfe-diff {
    background: #13273b;
}

.aadvana-darkskin table.diff .diff-deletedline {
    background-color: #5a1e1e;
}
.aadvana-darkskin table.diff .diff-deletedline del {
    background-color: #d73939;
}
.aadvana-darkskin table.diff .diff-addedline {
    background-color: #1e5a2e;
}
.aadvana-darkskin table.diff .diff-addedline ins {
    background-color: #39d739;
    color: #002240;
}
.wfe-buttons {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}
@media (max-width: 600px) {
  .wfe-buttons  {
    flex-direction: column;
  }
}
.wfe-dir-wrapper {
    overflow-y: auto;
    height: 100%;
}
.wfe-resizer {
    width: 6px;
    cursor: col-resize;
    background: linear-gradient(to right, #ddd, #bbb);
    border-left: 1px solid #aaa;
    border-right: 1px solid #aaa;
    margin: 0;
    flex: 0 0 auto;
}
.aadvana-darkskin .wfe-resizer {
    background: linear-gradient(to right, #233445, #1a2734);
    border-left: 1px solid #2f4a60;
    border-right: 1px solid #2f4a60;
}
.aadvana-darkskin .wfe-context-menu button {
    color: #c9c0c0 !important;
}
.wfe-resizer:hover, .wfe-resizer:focus {
    background: #92b7dd;
    outline: none;
}
.wfe-resizing {
    user-select: none !important;
    cursor: col-resize !important;
}
.wfe-context-menu {
    position: absolute;
    z-index: 99999;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    padding: 4px 0;
    min-width: 160px;
    font-size: 13px;
    border-radius: 4px;
}
.wfe-context-menu button {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
}
.wfe-context-menu button:hover, .wfe-context-menu button:focus {
    background: #f0f6ff;
    outline: none;
}
.aadvana-darkskin .wfe-context-menu {
    background: #13273b;
    border-color: #2f4a60;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.aadvana-darkskin .wfe-context-menu button:hover, .aadvana-darkskin .wfe-context-menu button:focus {
    background: #1e3e59;
}
.wfe-tree ul ul {
    list-style: none;
    margin-left: 15px;
    padding-left: 10px;
    border-left: 1px dotted #ccc;
}
.wfe-item {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
}
.wfe-item:hover {
    background: #e2f0ff26;
}
.wfe-item.active {
    background: #c7e3ff;
    font-weight: 600;
}
.aadvana-darkskin .wfe-item.active {
    background: #1e3e59;
}
.toggle {
    cursor: pointer;
    margin-right: 4px;
}
.button-danger {
    background: #d63638 !important;
    border-color: #b32d2e !important;
    color: #fff !important;
}
#wfe-undo {
    background: #46b450 !important;
    border-color: #388e3c !important;
    color: #fff !important;
}
#wfe-empty-trash {
    color: #fff !important;
    border-color: #a1282a !important;
}
.wfe-backups {
    margin-top: 10px;
    background: #f8f9fa;
    border: 1px solid #ccc;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
}
.aadvana-darkskin .wfe-backups {
    background: #13273b;
}
.wfe-backup-item:last-child { border-bottom: none; }
.wfe-backup-item {
    padding: 4px 6px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.wfe-backup-item a.button {
    margin-right: 6px;
}
.wfe-backup-item div {
    display: flex;
    gap: 4px;
}
.wfe-backup-item .button {
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1.4;
}

.CodeMirror-wrap {
    resize: vertical;
    height: 80vh;
}

/* Drop zone styling */
.wfe-drop-zone {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(33, 150, 243, 0.9);
    border: 3px dashed #fff;
    border-radius: 8px;
    z-index: 1000;
    pointer-events: none;
    align-items: center;
    justify-content: center;
    margin: 10px;
}

.wfe-drop-zone.wfe-drop-active {
    display: flex;
}

.wfe-drop-zone p {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin: 0;
    padding: 20px;
}

.aadvana-darkskin .wfe-drop-zone {
    background: rgba(30, 62, 89, 0.95);
    border-color: #2196f3;
}

/* Upload button styling */
#wfe-upload-file {
    background: #2196f3 !important;
    border-color: #1976d2 !important;
    color: #fff !important;
}

#wfe-upload-file:hover {
    background: #1976d2 !important;
}

/* Tree positioning for drop zone */
.wfe-tree {
    position: relative;
    border-left: 1px solid #8d7a7a73;
    border-bottom: 1px solid #8d7a7a73;
    border-top: 1px solid #8d7a7a73;
}

/* Upload Progress Bar */
.wfe-upload-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wfe-upload-progress-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    min-width: 400px;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.aadvana-darkskin .wfe-upload-progress-content {
    background: #13273b;
    color: #c9c0c0;
}

.wfe-upload-progress-content h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.wfe-progress-bar-container {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.aadvana-darkskin .wfe-progress-bar-container {
    background: #1e3e59;
}

.wfe-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2196f3, #1976d2);
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.wfe-progress-text {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.wfe-progress-status {
    text-align: center;
    font-size: 13px;
    color: #666;
    min-height: 20px;
}

.aadvana-darkskin .wfe-progress-status {
    color: #999;
}

.wfe-progress-status.success {
    color: #46b450;
    font-weight: 600;
}

.wfe-progress-status.error {
    color: #d63638;
    font-weight: 600;
}

.wfe-progress-status.warning {
    color: #f0b849;
    font-weight: 600;
}
