/**
 * Improvable Fields Styles
 *
 * @package    Magazines_Collection
 * @since      0.0.26
 */

.improvable-field-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.improvable-field-trigger {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #f59e0b;
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    line-height: 1;
}

.improvable-field-trigger:hover {
    color: #d97706;
    transform: scale(1.1);
}

.improvable-field-trigger:focus {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
    border-radius: 0.25rem;
}

.improvable-field-badge {
    color: #9ca3af;
    display: flex;
    align-items: center;
    cursor: help;
}

.improvable-field-wrapper.editing {
    display: block;
}

.improvable-field-wrapper.editing .improvable-field-value {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.improvable-field-wrapper.editing .improvable-field-trigger {
    display: none;
}

.improvable-field-editor {
    margin-top: 0.5rem;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.2s ease-out;
}

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

.improvement-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.improvement-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.improvement-input[type="file"] {
    padding: 0.25rem;
}

textarea.improvement-input {
    resize: vertical;
    min-height: 80px;
}

.improvement-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.improvement-actions .button {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.improvement-actions .button-primary {
    background-color: #3b82f6;
    color: white;
    border: none;
}

.improvement-actions .button-primary:hover:not(:disabled) {
    background-color: #2563eb;
}

.improvement-actions .button-primary:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.improvement-actions .button:not(.button-primary) {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.improvement-actions .button:not(.button-primary):hover {
    background-color: #f3f4f6;
}

.help-text {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

.icon-improve,
.icon-incomplete {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Notificacions inline */
.mc-inline-notice {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-left: 4px solid #3b82f6;
    border-radius: 0.25rem;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s;
}

.mc-inline-notice.notice-success {
    border-left-color: #10b981;
    background-color: #ecfdf5;
}

.mc-inline-notice.notice-error {
    border-left-color: #ef4444;
    background-color: #fef2f2;
}

.mc-inline-notice p {
    margin: 0;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 640px) {
    .improvable-field-wrapper.editing {
        width: 100%;
    }
    
    .improvable-field-editor {
        padding: 0.75rem;
    }
    
    .improvement-actions {
        flex-direction: column;
    }
    
    .improvement-actions .button {
        width: 100%;
    }
}
