﻿
:root {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f4;
    --border-light: #e1e5e9;
    --border-medium: #dadce0;
    --text-primary: #1a1a1a;
    --text-secondary: #5f6368;
    --text-tertiary: #80868b;
    --accent-primary: #00b4d8;
    --accent-hover: #1a233a;
    --accent-light: #e8f0fe;
    --success: #34a853;
    --warning: #fbbc04;
    --danger: #ea4335;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}


.editor-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}



/* Main Layout */
.main-layout {
    /* display: flex; */
    /* flex: 1; */
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* Left Sidebar */
.left-sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    z-index: 5;
    right: -100%;
    transition: 0.4s all;
    height: 100%;
    top: 137px;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    /* display: none; */
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Canvas Area */
.canvas-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-tertiary);
    position: relative;
}

.canvas-toolbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    padding: 8px 0px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.canvas-wrapper {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-lg);
    position: relative;
    transform-origin: center center;
    transition: transform 0.2s ease;
}

/* Right Sidebar */
.right-sidebar {
    width: 320px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    border-left: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    right: 0;
    display: none;
    height: 100%;
    z-index: 5;
}

.properties-panel {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Bottom Toolbar */
.bottom-toolbar {
    /* position: fixed; */
    /* bottom: 20px; */
    /* left: 50%; */
    /* transform: translateX(-50%); */
    /* background: var(--bg-secondary); */
    /* border: 1px solid var(--border-light); */
    /* border-radius: var(--radius-lg); */
    /* box-shadow: var(--shadow-lg); */
    padding: 8px 1px;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 4px;
    z-index: 50;
}

/* Buttons */
.btn-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .btn-card:hover {
        background: var(--bg-tertiary);
        border-color: var(--border-medium);
    }

.btn-primary {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

    .btn-primary:hover {
        background: var(--accent-hover);
    }

.btn-icon {
    width: 100%;
    height: 45px;
    border: 1px solid;
    border-radius: var(--radius-md);
    justify-content: center;
    /* padding: 0; */
    position: relative;
}

#undo-btn,
#redo-btn {
    min-width: 35px !important;
    height: 35px;
    font-size: 12px;
    width: auto;
}

.btn-icon.active {
    background: var(--accent-light);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Face Tabs */
.face-tabs {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 2px;
    width: 200px;
}

.face-tab {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    width: 100px;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s;
}

    .face-tab.active {
        background: var(--bg-secondary);
        color: var(--accent-primary);
        box-shadow: var(--shadow-sm);
        font-weight: 700;
        /* width: 136px; */
    }

    .face-tab.hidden {
        display: none;
    }

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.template-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-secondary);
}

    .template-card:hover {
        border-color: var(--accent-primary);
        box-shadow: var(--shadow-sm);
    }

    .template-card.active {
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 2px var(--accent-light);
    }

.template-preview {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: white;
    position: relative;
}

.template-info {
    padding: 8px;
    text-align: center;
}

.template-name {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 2px;
}

.template-size {
    font-size: 10px;
    color: var(--text-tertiary);
}

/* Layers Panel */
.layers-panel {
    /* margin-top: 24px; */
}

.layers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.layers-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.layers-list {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    max-height: 300px;
    overflow-y: auto;
}

.layer-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

    .layer-item:last-child {
        border-bottom: none;
    }

    .layer-item:hover {
        background: #fff2e7;
    }

    .layer-item.active {
        background: var(--accent-light);
        color: var(--accent-primary);
    }

    .layer-item.dragging {
        opacity: 0.5;
    }

.layer-icon {
    font-size: 16px;
    margin-right: 8px;
}

.layer-content {
    flex: 1;
    min-width: 0;
}

.layer-name {
    font-size: 13px;
    font-weight: 500;
    cursor: text;
    padding: 2px 4px;
    border-radius: var(--radius-sm);
    outline: none;
    border: 1px solid transparent;
}

    .layer-name:focus {
        background: var(--bg-secondary);
        border-color: var(--accent-primary);
    }

    .layer-name.editing {
        background: var(--bg-secondary);
        border-color: var(--accent-primary);
    }

.layer-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.2s;
}

.layer-item:hover .layer-actions {
    opacity: 1;
}

.layer-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.2s;
}

    .layer-btn:hover {
        background: var(--bg-tertiary);
    }

/* Form Controls */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.form-label-icon {
    display: block;
    font-size: 23px;
    font-weight: 600;
    color: var(--text-secondary);
    /* margin-bottom: -10px; */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: auto;
    float: left;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg-secondary);
    height: auto;
    transition: border-color 0.2s;
}

    .form-input:focus {
        outline: none;
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 2px var(--accent-light);
    }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.color-picker {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    background: none;
    top: -1px;
    position: relative;
}

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

    .zoom-btn:hover {
        background: var(--bg-tertiary);
    }

.zoom-level {
    font-size: 12px;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

    .modal.active {
        display: flex;
    }

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.modal-body {
    padding: 20px 24px 24px;
}

.modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Canvas Styling */
.canvas-element {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

/* No layers state */
.no-layers {
    text-align: center;
    padding: 24px;
    color: var(--text-tertiary);
    font-size: 13px;
}

/* Section Headers */
.section-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    /* margin-bottom: 12px; */
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-divider {
    height: 1px;
    background: var(--border-light);
    margin: 20px 0;
}

/* Status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.status-single {
    background: var(--accent-light);
    color: var(--accent-primary);
}

.status-double {
    background: #e8f5e8;
    color: var(--success);
}

.bleedLines::before {
    content: "\2702";
    left: 5px;
    top: -15px;
    position: absolute;
    font-size: 20px;
}

textarea {
    min-height: auto;
}

.label-txt {
    font-size: 15px;
    width: auto;
    float: left;
    margin-right: 5px;
    margin-top: 2px;
    /* letter-spacing: 1.5px; */
}
