/* Reset and base styles */

/* Layout */
.le1-app {
    display: flex;
    height: 100vh;
    width: 100%;
}

.le1-sidebar {
    width: 200px;
    height: 100%;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

.le1-sidebar-left {
    border-right: 1px solid #e0e0e0;
}

.le1-sidebar-right {
    border-left: 1px solid #e0e0e0;
}

.le1-sidebar-content {
    padding: 20px;
}

.le1-main-content {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    background: #fafafa;
}

.le1-content-wrapper {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Buttons */
.le1-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #f0f0f0;
    color: #333;
}

.le1-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.le1-btn-primary:hover {
/*    transform: translateY(-2px); */
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.le1-btn-danger {
    background: #ff4757;
    color: white;
}

.le1-btn-danger:hover {
    background: #ff3838;
}

.le1-btn-success {
    background: #00b894;
    color: white;
}

/* Upload area */
.le1-upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.le1-upload-area.drag-over {
    border-color: #667eea;
    background: #f8f9ff;
}

.le1-image-list {
    margin-top: 20px;
}

.le1-image-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: white;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.le1-image-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f0;
}

.le1-placeholder-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #be29ba;
}

.le1-image-info {
    flex: 1;
    margin-left: 15px;
}

.le1-image-date {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Editor styles */
.le1-editor-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
}

.le1-canvas-wrapper {
    position: relative;
    display: inline-block;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.le1-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    cursor: crosshair;
}

.le1-crop-overlay {
    position: absolute;
    border: 2px solid #fff;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    cursor: move;
}

.le1-resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 50%;
    pointer-events: auto;
}

/* Modal (fullscreen) */
.le1-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1000;
    overflow-y: auto;
}

.le1-modal-content {
    min-height: 100%;
    background: white;
}

.le1-modal-inner {
    max-width: 1000px;
    margin: 100px auto 0;
    padding: 20px;
    background: white;
}

/* Info panel */
.le1-info-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
}

.le1-info-panel h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

.le1-info-panel p {
    font-size: 12px;
    opacity: 0.9;
    margin: 5px 0;
}



/* Добавляем в конец файла css/le1-styles.css */

/* Warnings container */
.le1-warnings {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    pointer-events: none;
}

.le1-warning {
    background: white;
    border-left: 4px solid #ff4757;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.le1-warning-success {
    border-left-color: #00b894;
}

.le1-warning-info {
    border-left-color: #3498db;
}

.le1-warning-warning {
    border-left-color: #f39c12;
}

.le1-warning-error {
    border-left-color: #ff4757;
}

.le1-warning-content {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.le1-warning-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 0 5px;
    transition: color 0.3s;
}

.le1-warning-close:hover {
    color: #333;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Editor styles - настраиваемые через CSS */
.le1-canvas-wrapper {
    position: relative;
    display: inline-block;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.le1-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    cursor: crosshair;
}

/* Оверлей для затемнения (полупрозрачный) */
.le1-crop-overlay {
    position: absolute;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

/* Рамка обрезки */
.le1-crop-frame {
    position: absolute;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
    cursor: move;
    pointer-events: auto;
}

/* Маркеры изменения размера */
.le1-resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 50%;
    pointer-events: auto;
    transition: transform 0.2s;
}

.le1-resize-handle:hover {
/*    transform: scale(1.2);*/
    background: #667eea;
}

/* Позиции маркеров */
.le1-resize-handle-tl {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}

.le1-resize-handle-tr {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}

.le1-resize-handle-bl {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}

.le1-resize-handle-br {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

/* Дополнительные маркеры по краям */
.le1-resize-handle-top {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: n-resize;
}

.le1-resize-handle-bottom {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: s-resize;
}

.le1-resize-handle-left {
    top: 50%;
    left: -6px;
    transform: translateY(-50%);
    cursor: w-resize;
}

.le1-resize-handle-right {
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    cursor: e-resize;
}



/* Добавьте в конец css/le1-styles.css */

/* Убедимся, что маркеры находятся поверх всего */
.le1-crop-frame {
    position: absolute;
    z-index: 5;
}

.le1-resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 50%;
    z-index: 10;
    transition: transform 0.2s, background 0.2s;
    pointer-events: auto;
}

.le1-resize-handle:hover {
/*    transform: scale(1.3); */
    background: #667eea;
    border-color: white;
}

/* Позиционирование маркеров */
.le1-resize-handle-tl {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}

.le1-resize-handle-tr {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}

.le1-resize-handle-bl {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}

.le1-resize-handle-br {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

.le1-resize-handle-top {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: n-resize;
}

.le1-resize-handle-bottom {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: s-resize;
}

.le1-resize-handle-left {
    top: 50%;
    left: -6px;
    transform: translateY(-50%);
    cursor: w-resize;
}

.le1-resize-handle-right {
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    cursor: e-resize;
}

/* Убедимся, что рамка не перекрывает маркеры */
.le1-crop-frame {
    cursor: move;
    user-select: none;
}

/* Стили для оверлея */
.le1-crop-overlay svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}



/* Добавьте в конец файла или замените существующие стили маркеров */

/* Стили для рамки и маркеров */
.le1-crop-frame {
    position: absolute;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
    cursor: move;
    z-index: 5;
    box-sizing: border-box;
}

.le1-resize-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 50%;
    z-index: 15;
    transition: all 0.2s ease;
    pointer-events: auto;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.le1-resize-handle:hover {
/*    transform: scale(1.2); */
    background: #667eea;
    border-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Точное позиционирование маркеров */
.le1-resize-handle-tl {
    top: -7px;
    left: -7px;
    cursor: nw-resize;
}

.le1-resize-handle-tr {
    top: -7px;
    right: -7px;
    cursor: ne-resize;
}

.le1-resize-handle-bl {
    bottom: -7px;
    left: -7px;
    cursor: sw-resize;
}

.le1-resize-handle-br {
    bottom: -7px;
    right: -7px;
    cursor: se-resize;
}

.le1-resize-handle-top {
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    cursor: n-resize;
}

.le1-resize-handle-bottom {
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    cursor: s-resize;
}

.le1-resize-handle-left {
    top: 50%;
    left: -7px;
    transform: translateY(-50%);
    cursor: w-resize;
}

.le1-resize-handle-right {
    top: 50%;
    right: -7px;
    transform: translateY(-50%);
    cursor: e-resize;
}

/* Кнопки в редакторе */
.le1-editor-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.le1-btn-danger {
    background: #ff4757;
    color: white;
}

.le1-btn-danger:hover {
    background: #ff3838;
/*    transform: translateY(-2px); */
}



/* Добавьте в конец файла css/le1-styles.css */

/* Кастомное окно подтверждения */
.le1-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.le1-confirm-dialog {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.le1-confirm-header {
    padding: 20px 20px 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.le1-confirm-icon {
    width: 48px;
    height: 48px;
    background: #fff3e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.le1-confirm-icon.warning {
    background: #fff3e0;
    color: #f39c12;
}

.le1-confirm-icon.danger {
    background: #ffe5e5;
    color: #ff4757;
}

.le1-confirm-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.le1-confirm-content {
    padding: 20px;
    color: #666;
    line-height: 1.5;
    font-size: 14px;
}

.le1-confirm-buttons {
    padding: 0 20px 20px 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.le1-confirm-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.le1-confirm-btn-cancel {
    background: #f0f0f0;
    color: #666;
}

.le1-confirm-btn-cancel:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.le1-confirm-btn-confirm {
    background: #ff4757;
    color: white;
}

.le1-confirm-btn-confirm:hover {
    background: #ff3838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.le1-confirm-btn-confirm.success {
    background: #00b894;
}

.le1-confirm-btn-confirm.success:hover {
    background: #00a884;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.le1-confirm-modal {
    animation: fadeIn 0.2s ease;
}