/** --------------Page Designer styles --------------*/
.page-designer-layout {
    min-height: 760px;
    position: relative;
}

.designer-canvas-container {
    flex: 1;
    min-height: 760px;
}

.designer-canvas {
    border: 2px dashed rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 12px;
    position: relative;
    overflow: auto;
    background-color: #f9f9f9;
    background-image:
        linear-gradient(to right, rgba(128, 128, 128, 0.3) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(128, 128, 128, 0.3) 1px, transparent 1px);
    background-size: calc(100% / 12) 90px;
}

.designer-panels-container {
    width: 320px;
    min-height: 760px;
    position: relative;
    background: #f5f5f5;
    border-left: 1px solid #ccc;
    transition: width 0.3s ease;
}

.designer-panels-container.panels-hidden {
    width: 24px;
}

.designer-panels-container.panels-pinned:hover {
    /* Stay visible when pinned */
}

.panel-toggle-btn {
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 48px;
    background: #007acc;
    color: white;
    border-radius: 4px 0 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: -2px 0 4px rgba(0, 0, 0, 0.2);
}

.panel-toggle-btn:hover {
    background: #005a9e;
}

.designer-panels {
    height: 100%;
    background: white;
    border-left: 1px solid #ccc;
    display: flex;
    flex-direction: column;
}

.panel-tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 1px solid #ccc;
}

.panel-tab {
    flex: 1;
    padding: 8px 12px;
    text-align: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.panel-tab:hover {
    background: #e8e8e8;
    color: #333;
}

.panel-tab.active {
    background: white;
    color: #007acc;
    border-bottom-color: #007acc;
}

.panel-pin-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

.panel-pin-btn:hover {
    background: #e8e8e8;
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.panel-header {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e0e0e0;
}

.panel-subheader {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toolbox-panel .toolbox-items {
    margin-bottom: 16px;
}

.toolbox-item {
    padding: 8px 12px;
    margin-bottom: 4px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease;
}

.toolbox-item:hover {
    background: #e8f4fd;
}

.toolbox-item:active {
    background: #c2e7ff;
}

.canvas-tools {
    margin-top: 8px;
}

.properties-panel .properties-content {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.properties-panel .q-field {
    margin-bottom: 8px;
}

.properties-panel .q-field__control {
    font-size: 12px;
}

.properties-panel .q-field__label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 12px;
}

.children-list {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fafafa;
}

.child-item {
    padding: 6px 8px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 11px;
}

.child-item:last-child {
    border-bottom: none;
}

.no-selection {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-selection .q-icon {
    color: #ccc;
    margin-bottom: 8px;
}

.designer-item {
    position: relative;
    border: 2px solid rgba(33, 150, 243, 0.3);
    background: white;
    border-radius: 10px;
    padding: 12px;
    cursor: move;
    min-height: 60px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease;
}

.designer-item:hover {
    border-color: rgba(33, 150, 243, 0.6);
}

.designer-item.selected {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.3);
}

.designer-item-title {
    width: 100%;
}

.designer-item-body {
    margin-top: 8px;
    font-size: 0.95rem;
}

.resize-handle {
    width: 12px;
    height: 12px;
    background: #1976d2;
    border-radius: 3px;
    position: absolute;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.resize-handle:hover {
    opacity: 1;
}

.resize-left {
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    cursor: ew-resize;
}

.resize-right {
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    cursor: ew-resize;
}

.resize-top {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: ns-resize;
}

.resize-bottom {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: ns-resize;
}

.resize-top-left {
    top: -6px;
    left: -6px;
    cursor: nwse-resize;
}

.resize-top-right {
    top: -6px;
    right: -6px;
    cursor: nesw-resize;
}

.resize-bottom-left {
    bottom: -6px;
    left: -6px;
    cursor: nesw-resize;
}

.resize-bottom-right {
    bottom: -6px;
    right: -6px;
    cursor: nwse-resize;
}

.designer-children {
    margin-top: 10px;
    background: rgba(25, 118, 210, 0.06);
    border-radius: 8px;
    padding: 6px;
}

.designer-child {
    background: #e3f2fd;
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 6px;
}