/**
 * FINEART Artworks Manager Styles
 * Flat, black and white design
 */

.fineart-artworks-manager {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.fineart-am-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #000;
}

.fineart-am-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin: 0 0 10px 0;
}

.fineart-am-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Stats Cards */
.fineart-am-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.fineart-am-stat-card {
    background: #000;
    color: #fff;
    padding: 25px;
    border-radius: 0;
    text-align: center;
    border: 2px solid #000;
}

.fineart-am-stat-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
}

.fineart-am-stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Instructions */
.fineart-am-instructions {
    background: #f5f5f5;
    border-left: 4px solid #000;
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 0;
    color: #333;
}

.fineart-am-instructions strong {
    color: #000;
}

/* Artworks List */
.fineart-am-artworks-list {
    display: grid;
    gap: 20px;
}

/* Artwork Card */
.fineart-am-artwork-card {
    background: #fff;
    border-radius: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 2px solid #000;
    transition: all 0.2s ease;
    position: relative;
    cursor: move;
}

.fineart-am-artwork-card:hover {
    box-shadow: 4px 4px 0 #000;
    transform: translate(-2px, -2px);
}

.fineart-am-artwork-card.ui-sortable-helper {
    box-shadow: 8px 8px 0 #000;
    transform: scale(1.02);
    cursor: grabbing;
}

/* Drag Handle */
.fineart-am-drag-handle {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    cursor: grab;
    transition: color 0.2s ease;
}

.fineart-am-drag-handle:hover {
    color: #000;
}

.fineart-am-drag-handle:active {
    cursor: grabbing;
}

.fineart-am-drag-handle svg {
    width: 20px;
    height: 20px;
}

/* Artwork Image */
.fineart-am-artwork-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 0;
    overflow: hidden;
    background: #f5f5f5;
    border: 2px solid #000;
}

.fineart-am-artwork-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Artwork Info */
.fineart-am-artwork-info {
    flex: 1;
    min-width: 0;
}

.fineart-am-artwork-title {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin: 0 0 10px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fineart-am-editions {
    font-size: 14px;
    color: #666;
}

.fineart-am-editions-label {
    margin-right: 8px;
}

.fineart-am-editions-count {
    font-weight: 700;
    color: #000;
    background: #fff;
    padding: 2px 10px;
    border: 2px solid #000;
    border-radius: 0;
}

.fineart-am-editions-count.fineart-am-sold-out {
    color: #fff;
    background: #000;
}

/* Artwork Actions */
.fineart-am-artwork-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Buttons */
.fineart-am-btn {
    display: inline-block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid #000;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.fineart-am-btn-primary {
    background: #000;
    color: #fff;
}

.fineart-am-btn-primary:hover {
    background: #fff;
    color: #000;
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #000;
}

.fineart-am-btn-referral {
    background: #000;
    color: #fff;
}

.fineart-am-btn-referral:hover {
    background: #fff;
    color: #000;
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #000;
}

.fineart-am-btn-view {
    background: #fff;
    color: #000;
}

.fineart-am-btn-view:hover {
    background: #000;
    color: #fff;
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #000;
}

.fineart-am-btn-edit {
    background: #fff;
    color: #000;
}

.fineart-am-btn-edit:hover {
    background: #000;
    color: #fff;
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #000;
}

/* Empty State */
.fineart-am-empty {
    text-align: center;
    padding: 80px 20px;
    border: 2px solid #000;
}

.fineart-am-empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.fineart-am-empty h2 {
    font-size: 24px;
    color: #000;
    margin: 0 0 10px 0;
}

.fineart-am-empty p {
    font-size: 16px;
    color: #666;
    margin: 0 0 30px 0;
}

/* Footer */
.fineart-am-footer {
    margin-top: 30px;
    text-align: center;
}

/* Modal */
.fineart-am-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fineart-am-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
}

.fineart-am-modal-content {
    position: relative;
    background: #fff;
    border-radius: 0;
    max-width: 600px;
    width: 90%;
    border: 3px solid #000;
    box-shadow: 8px 8px 0 #000;
}

.fineart-am-modal-header {
    background: #000;
    color: #fff;
    padding: 20px 25px;
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fineart-am-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.fineart-am-modal-close {
    background: #fff;
    border: none;
    color: #000;
    font-size: 24px;
    width: 35px;
    height: 35px;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
    font-weight: 700;
}

.fineart-am-modal-close:hover {
    background: #000;
    color: #fff;
    border: 2px solid #fff;
}

.fineart-am-modal-body {
    padding: 25px;
}

.fineart-am-modal-product-title {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin: 0 0 15px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #000;
}

.fineart-am-modal-help {
    color: #666;
    margin: 0 0 15px 0;
    font-size: 14px;
}

.fineart-am-modal-link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.fineart-am-modal-link-container input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #000;
    border-radius: 0;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: #000;
    background: #f5f5f5;
}

.fineart-am-modal-link-container input:focus {
    outline: none;
    background: #fff;
}

.fineart-am-copy-success {
    background: #000;
    color: #fff;
    padding: 12px 20px;
    border-radius: 0;
    font-weight: 700;
    text-align: center;
}

/* Save Notification */
.fineart-am-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #000;
    color: #fff;
    padding: 15px 25px;
    border-radius: 0;
    font-weight: 700;
    border: 3px solid #000;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
    z-index: 100000;
}

/* Sortable Placeholder */
.fineart-am-artworks-list .ui-sortable-placeholder {
    background: #f5f5f5;
    border: 2px dashed #000;
    border-radius: 0;
    visibility: visible !important;
    height: 140px !important;
    margin: 0 0 20px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fineart-am-artwork-card {
        flex-direction: column;
        text-align: center;
    }

    .fineart-am-drag-handle {
        position: absolute;
        top: 10px;
        left: 10px;
    }

    .fineart-am-artwork-image {
        width: 150px;
        height: 150px;
    }

    .fineart-am-artwork-title {
        white-space: normal;
    }

    .fineart-am-artwork-actions {
        flex-direction: column;
        width: 100%;
    }

    .fineart-am-btn {
        width: 100%;
    }

    .fineart-am-modal-link-container {
        flex-direction: column;
    }
}

/* Loading State */
.fineart-am-artwork-card.fineart-am-saving {
    opacity: 0.6;
    pointer-events: none;
}

.fineart-am-artwork-card.fineart-am-saving::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #ccc;
    border-top: 3px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
