#oxygen-customizer {
    position: fixed;
    top: 50px;
    right: 20px;
    background: #222;
    color: white;
    padding: 15px;
    width: 300px;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    z-index: 99999;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 80vh; /* Limit height to 80% of viewport */
}

#oxygen-customizer h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #f5f5f5;
}

#oxygen-customizer label {
    display: block;
    margin-top: 10px;
    font-size: 14px;
}

#oxygen-customizer select, 
#oxygen-customizer textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border-radius: 4px;
    border: none;
}

#oxygen-customizer button {
	float: right;
    display: inline-block;
    width: 32%;
    margin-top: 10px;
    padding: 8px;
    background: #0073aa;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

#oxygen-customizer button:hover {
    background: #0096d6;
}

#close-customizer {
    background: #cc0000;
}


.js-dropzone {
    position: relative;
    min-height: 150px; /* Ensure space even when empty */
    border: 2px dashed #ccc;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease-in-out;
}

.js-dropzone::before {
    content: "➕ Add sections here";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 16px;
    font-weight: bold;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* Hide text when there are elements inside */
.js-dropzone:not(:empty)::before {
    content: "";
    opacity: 0;
}

/* Highlight dropzone when dragging over */
.js-dropzone.drag-over {
    background: #eef7ff;
    border-color: #007bff;
}

.reusable-preview {
  cursor: plus-lighter;
}


.reusable {
    position: relative;
    padding: 10px;
    border: 1px solid #ccc;
    background: #fff;
    margin-bottom: 10px;
    width: 100%;
}

.reusable .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: red;
    color: white;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 14px;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    text-align: center;
}

.reusables-bar {
    max-height: 300px;
    overflow-y: auto;
    background: #2a2a2a;
    border-radius: 6px;
    margin-top: 10px;
}

.reusables-category {
    border-bottom: 1px solid #333;
}

.reusables-category:last-child {
    border-bottom: none;
}

.category-header {
    padding: 8px 12px;
    background: #333;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-header:hover {
    background: #444;
}

.reusables-list {
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.reusable-preview {
    position: relative;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.reusable-preview:hover {
    transform: translateY(-2px);
}

.reusable-preview img {
    width: 100%;
    height: 60px;
    object-fit: cover;
}

.reusable-preview .title {
    padding: 4px 6px;
    font-size: 11px;
    color: #fff;
    background: rgba(0,0,0,0.5);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Scrollbar styling */
.reusables-bar::-webkit-scrollbar,
.reusables-list::-webkit-scrollbar {
    width: 6px;
}

.reusables-bar::-webkit-scrollbar-track,
.reusables-list::-webkit-scrollbar-track {
    background: #333;
}

.reusables-bar::-webkit-scrollbar-thumb,
.reusables-list::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

/* Collapse animation */
.reusables-list {
    transition: max-height 0.3s ease;
}

.reusables-list.collapsed {
    max-height: 0;
    padding: 0;
    overflow: hidden;
}

/* Main controls section */
.customizer-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Reusables section */
.reusables-section {
    border-top: 1px solid #444;
    padding-top: 15px;
    margin-top: 10px;
}

.reusables-section h4 {
    color: #f5f5f5;
    margin: 0 0 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reusables-section h4 .toggle-btn {
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    background: #333;
    border-radius: 4px;
}

/* Empty state */
.reusables-bar:empty::before {
    content: "No reusable sections available";
    display: block;
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}


.selected-element-info {
    margin-bottom: 15px;
}

#selected-element-display {
    padding: 8px;
    background: #333;
    border-radius: 4px;
    margin-top: 5px;
    color: #fff;
    font-size: 13px;
}

.oxygen-element-selected {
    outline: 2px solid #0073aa !important;
    position: relative;
}

.oxygen-element-selected::after {
    content: "Selected";
    position: absolute;
    top: -20px;
    right: 0;
    background: #0073aa;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}
