/* Admin Editing Mode Styles */

.admin-edit-mode {
    /* Don't set position here as it breaks fixed positioning */
}

/* Only apply editing styles to non-admin elements */
.admin-edit-mode *:not(.admin-style-panel):not(.admin-style-panel *):not(.admin-edit-icon):not(.admin-save-button):not(.admin-changes-indicator) {
    cursor: pointer;
    transition: outline 0.2s ease;
}

.admin-edit-mode *:not(.admin-style-panel):not(.admin-style-panel *):not(.admin-edit-icon):not(.admin-save-button):not(.admin-changes-indicator):hover {
    outline: 2px dashed #007bff;
    outline-offset: 2px;
}

.admin-edit-mode *.editing {
    outline: 3px solid #28a745 !important;
    outline-offset: 2px;
}

.admin-edit-icon {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #6B5480;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.admin-edit-icon:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.admin-edit-icon.active {
    background: #28a745;
}

.admin-save-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    z-index: 10000;
    display: none;
    transition: all 0.3s ease;
}

.admin-save-button:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.4);
}

.admin-style-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    display: none;
    width: 350px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.admin-style-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.admin-style-panel .form-group {
    margin-bottom: 15px;
}

.admin-style-panel label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #555;
}

.admin-style-panel input[type="text"],
.admin-style-panel input[type="number"],
.admin-style-panel textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.admin-style-panel input[type="color"] {
    height: 40px;
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    box-sizing: border-box;
}

.admin-style-panel textarea {
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.admin-style-panel .dimension-group {
    display: flex;
    gap: 10px;
}

.admin-style-panel .dimension-group > div {
    flex: 1;
}

.admin-style-panel .close-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.admin-style-panel .close-panel:hover {
    color: #333;
}

.admin-element-info {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 12px;
    color: #666;
    word-break: break-all;
}

.admin-changes-indicator {
    position: fixed;
    top: 80px;
    left: 20px;
    background: #ffc107;
    color: #000;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    z-index: 10000;
    display: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-style-panel {
        right: 10px;
        left: 10px;
        width: auto;
        top: 70px;
    }
    
    .admin-edit-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .admin-save-button {
        bottom: 10px;
        right: 10px;
        padding: 10px 20px;
        font-size: 14px;
    }
}
