/**
 * Arts Gallery - Admin Styles
 * Version: 1.1.0 (Repeater Update)
 */

/* General Metabox Styles */
.arts-gallery-metabox {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
.arts-gallery-field {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}
.arts-gallery-field:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.arts-gallery-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}
.arts-gallery-field .description {
    color: #646970;
    font-size: 13px;
    margin: 4px 0 0 0;
}
.arts-gallery-image-actions {
    margin: 10px 0;
}
.arts-gallery-preview img {
    max-width: 100%;
    height: auto;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}
.arts-gallery-no-image {
    padding: 30px 20px;
    text-align: center;
    background: #f6f7f7;
    border: 2px dashed #dcdcde;
    color: #646970;
}

/* --- Repeater Field Styles --- */
#arts-gallery-repeater-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}
.arts-gallery-repeater-item {
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    background: #fff;
}
.repeater-item-handle {
    margin: 0;
    padding: 10px 15px;
    background: #f6f7f7;
    border-bottom: 1px solid #ccd0d4;
    cursor: move;
    font-size: 14px;
    user-select: none;
}
.repeater-item-content {
    padding: 15px;
    display: grid;
    grid-template-columns: 350px 1fr; /* Image uploader has fixed width */
    gap: 30px;
    align-items: start;
}
.repeater-remove-button {
    float: right;
    margin: -42px 10px 0 0;
    color: #d63638 !important;
}
.repeater-remove-button:hover {
    color: #b32d2e !important;
}

/* Position Picker Styles */
.position-preview-container {
    position: relative;
    width: 100%;
    height: 300px;
    background-color: #f0f0f0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    overflow: hidden;
}
.artwork-position-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    background: #2271b1;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: move;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    z-index: 2;
}
.artwork-preview {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: move;
    z-index: 1;
}
.artwork-preview img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    border: 1px solid #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

/* Responsive styles for admin */
@media (max-width: 900px) {
    .repeater-item-content {
        grid-template-columns: 1fr;
    }
}