/* Label Designer - Design v2 */

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    font-size: 14px;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* Toolbar */
.toolbar {
    height: 52px;
    flex-shrink: 0;
    background: #2b3035;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 10;
    position: relative;
}

.toolbar-select {
    background-color: #3a4149;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 160px;
}

.toolbar-select:focus {
    background-color: #3a4149;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.15);
}

.toolbar-select option {
    background-color: #2b3035;
    color: #fff;
}

/* Template dropdown: larger font for taller items in native dropdown */
#templateSelect {
    font-size: 1rem;
}

#templateSelect option {
    font-size: 1rem;
}

/* Smooth button transitions */
.toolbar .btn {
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

/* Tool buttons in toolbar */
.toolbar .btn-tool {
    padding: 4px 10px;
    font-size: 0.8rem;
}

/* 3-panel layout */
.designer-layout {
    display: flex;
    height: calc(100vh - 52px);
}

.tool-panel {
    width: 260px;
    flex-shrink: 0;
    overflow-y: auto;
    background: #fff;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
    z-index: 5;
    padding: 12px;
}

.canvas-area {
    flex: 1;
    overflow: auto;
    background-color: #e9ecef;
    background-image: radial-gradient(circle, #ced4da 1px, transparent 1px);
    background-size: 20px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px;
}


/* Preview image in modal */
.preview-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #dee2e6;
    background: #fff;
}

/* Order lines scrollable list */
.order-lines-list {
    max-height: calc(100vh - 400px);
    overflow-y: auto;
}

.order-lines-list .list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

/* Tag list scrollable */
.tag-list {
    max-height: calc(100vh - 400px);
    overflow-y: auto;
}

.tag-list .list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

/* Admin page */
.admin-body {
    height: calc(100vh - 52px);
    overflow-y: auto;
    background: #f0f2f5;
}

.admin-body .nav-pills .nav-link {
    color: #495057;
    font-weight: 500;
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.admin-body .nav-pills .nav-link.active {
    background-color: #0d6efd;
}

.admin-body .tab-content {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.admin-body .table {
    margin-bottom: 0;
}

.admin-body .table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    border-bottom-width: 1px;
}

/* Modal improvements */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0;
    padding: 12px 16px;
}

.modal-header .modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 16px;
}

.modal-body .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    margin-bottom: 4px;
}

/* BC-fält dropdown: taller items + header styling */
#bcFieldDropdown .dropdown-item {
    padding: 8px 16px;
    font-size: 0.9rem;
}

#bcFieldDropdown .dropdown-header {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;
    padding: 6px 16px 2px;
}

/* Thin scrollbars for panels */
.tool-panel::-webkit-scrollbar,
.order-lines-list::-webkit-scrollbar,
.tag-list::-webkit-scrollbar {
    width: 6px;
}

.tool-panel::-webkit-scrollbar-track,
.order-lines-list::-webkit-scrollbar-track,
.tag-list::-webkit-scrollbar-track {
    background: transparent;
}

.tool-panel::-webkit-scrollbar-thumb,
.order-lines-list::-webkit-scrollbar-thumb,
.tag-list::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 3px;
}

.tool-panel::-webkit-scrollbar-thumb:hover,
.order-lines-list::-webkit-scrollbar-thumb:hover,
.tag-list::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}
