/* Frontend Styles for Listeo Listing Albums */
/* 100% identical to Gallery styling */

/* Active thumbnail (featured image) - same as Gallery */
.dz-preview.active-thumb {
    position: relative;
    border: 3px solid #0073aa !important;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.dz-preview.active-thumb::after {
    content: '\f155'; /* dashicons-star-filled */
    font-family: 'dashicons';
    position: absolute;
    top: 5px;
    right: 5px;
    background: #0073aa;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dz-preview.active-thumb .dz-image {
    position: relative;
}

/* Dropzone styling - same as Gallery */
.dropzone {
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 20px;
    min-height: 150px;
    background: #fafafa;
}

.dropzone.dz-started {
    border-style: solid;
    background: #fff;
}

.dropzone .dz-message {
    text-align: center;
    margin: 2em 0;
    color: #999;
}

.dropzone .dz-message span {
    display: inline-block;
    font-size: 14px;
}

.dropzone .dz-message i {
    font-size: 24px;
    display: block;
    margin-bottom: 10px;
    color: #0073aa;
}

/* Album container */
.listeo-albums-container {
    margin-top: 20px;
    padding: 0;
}

.listeo-albums-frontend-container {
    margin-top: 20px;
    padding: 0;
}

.listeo-albums-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.listeo-albums-header h4 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.listeo-albums-header .button {
    display: flex;
    align-items: center;
    gap: 5px;
}

.album-item-frontend {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.album-item-frontend:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.album-item-frontend.sortable-ghost {
    opacity: 0.5;
    background: #f0f0f0;
}

.album-header-frontend {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    user-select: none;
}

.album-header-frontend:hover {
    background: #efefef;
}

.album-drag-handle-frontend {
    margin-right: 10px;
    color: #999;
    cursor: grab;
    font-size: 20px;
    display: flex;
    align-items: center;
}

.album-drag-handle-frontend:active {
    cursor: grabbing;
    color: #333;
}

.album-title-display-frontend {
    flex: 1;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.album-actions-frontend {
    display: flex;
    gap: 5px;
}

.album-actions-frontend .button {
    padding: 5px 8px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.album-actions-frontend .button .dashicons {
    margin: 0;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.album-content-frontend {
    padding: 15px;
}

.album-form-frontend {
    margin-bottom: 15px;
    background: white;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.album-title-input-frontend,
.album-description-input-frontend {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.album-title-input-frontend:focus,
.album-description-input-frontend:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.album-description-input-frontend {
    resize: vertical;
    min-height: 80px;
}

.form-actions-frontend {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.form-actions-frontend .button {
    padding: 8px 16px;
}

.album-images-frontend {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
}

.images-grid-frontend {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    min-height: 50px;
}

.image-item-frontend {
    position: relative;
    border: 2px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    cursor: grab;
    transition: border-color 0.3s;
}

.image-item-frontend:hover {
    border-color: #0073aa;
}

.image-item-frontend.sortable-ghost {
    opacity: 0.5;
    background: #f0f0f0;
}

.image-item-frontend:active {
    cursor: grabbing;
}

.image-item-frontend img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.image-drag-handle-frontend {
    position: absolute;
    top: 2px;
    left: 2px;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 2px;
    border-radius: 2px;
    cursor: grab;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.remove-image-btn-frontend {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(220, 52, 69, 0.8) !important;
    border: none !important;
    color: white;
    padding: 4px !important;
    height: auto !important;
    width: auto !important;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10;
}

.remove-image-btn-frontend:hover {
    background: rgba(220, 52, 69, 1) !important;
}

.remove-image-btn-frontend .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    margin: 0;
}

.empty-message,
.empty-images {
    text-align: center;
    color: #999;
    padding: 20px;
    margin: 0;
}

.add-image-btn-frontend {
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .album-header-frontend {
        flex-wrap: wrap;
    }

    .album-actions-frontend {
        width: 100%;
        justify-content: flex-end;
        margin-top: 10px;
    }

    .images-grid-frontend {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}
