/* FINEART Edit Gallery Styles */

.fineart-edit-gallery-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

.fineart-edit-gallery-wrapper .mvx-form-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.fineart-edit-gallery-wrapper h2 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
}

.fineart-edit-gallery-wrapper > .mvx-form-container > .description {
    margin: 0 0 40px;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

/* Form Groups */
.form-group {
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid #f0f0f0;
}

.form-group:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 15px;
}

.form-group .required {
    color: #e74c3c;
    margin-left: 3px;
}

.form-group .field-description {
    margin: 0 0 15px;
    color: #777;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.5;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #fafafa;
}

.form-group input[type="text"]:focus,
.form-group input[type="url"]:focus,
.form-group textarea:focus {
    border-color: #007cba;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Word Counter */
.word-counter {
    font-weight: 600;
    color: #666;
    font-size: 13px;
    white-space: nowrap;
    margin-left: 15px;
}

.word-counter.exceeded {
    color: #e74c3c;
}

.word-counter .current-words {
    font-weight: 700;
    font-size: 14px;
}

/* Artist Image Upload */
.artist-image-upload {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 30px;
    align-items: start;
}

.artist-image-upload .current-image {
    width: 180px;
    height: 180px;
    border: 3px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    background: #f9f9f9;
    position: relative;
}

.artist-image-upload .current-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

.artist-image-upload .current-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.artist-image-upload .upload-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
}

.artist-image-upload .button {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: 2px solid #007cba;
    background: #007cba;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.artist-image-upload .button:hover {
    background: #006ba1;
    border-color: #006ba1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.2);
}

.artist-image-upload .button:active {
    transform: translateY(0);
}

#crop-image-btn {
    background: #2ecc71;
    border-color: #2ecc71;
}

#crop-image-btn:hover {
    background: #27ae60;
    border-color: #27ae60;
}

/* Crop Modal */
.crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.crop-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.crop-modal-header {
    padding: 24px 30px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crop-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.crop-modal-header .close-modal {
    background: #f0f0f0;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.crop-modal-header .close-modal:hover {
    background: #e74c3c;
    color: white;
}

.crop-modal-body {
    padding: 30px;
    flex: 1;
    overflow: auto;
    background: #f9f9f9;
}

.crop-container {
    max-width: 100%;
    max-height: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.crop-container img {
    max-width: 100%;
    display: block;
}

.crop-modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: white;
}

.crop-modal-footer .button {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid;
}

#cancel-crop-btn {
    background: white;
    border-color: #ddd;
    color: #666;
}

#cancel-crop-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

#apply-crop-btn {
    background: #2ecc71;
    border-color: #2ecc71;
    color: white;
}

#apply-crop-btn:hover {
    background: #27ae60;
    border-color: #27ae60;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

/* Social Links */
.social-links-group {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    border: 2px solid #f0f0f0;
}

.social-links-group h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.social-links-group > .field-description {
    margin: 0 0 25px;
    color: #777;
    font-size: 14px;
}

.social-link-field {
    margin-bottom: 20px;
}

.social-link-field:last-child {
    margin-bottom: 0;
}

.social-link-field label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}

.social-link-field .dashicons {
    width: 22px;
    height: 22px;
    font-size: 22px;
    color: #666;
}

.social-link-field input[type="url"] {
    background: white;
}

/* Form Actions */
.form-actions {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.form-actions .button-primary {
    padding: 14px 36px;
    font-size: 15px;
    font-weight: 600;
    height: auto;
    background: #007cba;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-actions .button-primary:hover {
    background: #006ba1;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.3);
}

.form-actions .button-primary:active {
    transform: translateY(0);
}

.form-actions .button-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.form-actions .spinner {
    float: none;
    margin: 0;
}

.form-actions .spinner.is-active {
    visibility: visible;
}

/* Form Messages */
.form-messages {
    margin-top: 25px;
    padding: 16px 20px;
    border-radius: 8px;
    border-left: 4px solid;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-messages.success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.form-messages.error {
    background: #f8d7da;
    border-color: #e74c3c;
    color: #721c24;
}

.form-messages p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .fineart-edit-gallery-wrapper .mvx-form-container {
        padding: 25px 20px;
    }

    .fineart-edit-gallery-wrapper h2 {
        font-size: 24px;
    }

    .artist-image-upload {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .artist-image-upload .current-image {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }

    .crop-modal-content {
        max-width: 95%;
    }

    .crop-modal-header,
    .crop-modal-body,
    .crop-modal-footer {
        padding: 20px;
    }

    .social-links-group {
        padding: 20px;
    }
}

/* Override any conflicting MVX styles */
.mvx-form-container .form-group input[type="text"],
.mvx-form-container .form-group input[type="url"],
.mvx-form-container .form-group textarea {
    background: #fafafa;
}

.mvx-form-container .form-group input[type="text"]:focus,
.mvx-form-container .form-group input[type="url"]:focus,
.mvx-form-container .form-group textarea:focus {
    background: #fff;
}
