/* Attribute Mapper Admin Styles */

.attribute-mapper-admin {
    max-width: 1200px;
}

.attribute-mapper-content {
    background: #fff;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.attribute-mapper-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 15px;
    margin-bottom: 20px;
}

.attribute-mapper-notice p {
    margin: 0;
}

.attribute-mapper-form h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.attribute-mapper-form > p {
    color: #666;
    margin-bottom: 20px;
}

#attribute-mappings {
    margin-bottom: 15px;
}

.mapping-row {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.mapping-row-fields {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.mapping-field {
    flex: 1;
    min-width: 250px;
}

.mapping-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.mapping-field select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.mapping-arrow {
    font-size: 24px;
    color: #666;
    padding-bottom: 8px;
}

.remove-mapping-row {
    color: #b32d2e;
    text-decoration: none;
    padding-bottom: 8px;
}

.remove-mapping-row:hover {
    color: #dc3232;
}

#add-mapping-row {
    margin-bottom: 20px;
}

.attribute-mapper-actions {
    padding-top: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.attribute-mapper-actions .button {
    min-width: 150px;
}

.attribute-mapper-results {
    background: #fff;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.attribute-mapper-results h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

#results-content {
    margin-top: 15px;
}

.results-summary {
    background: #e7f4e7;
    border-left: 4px solid #46b450;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.results-summary.error {
    background: #ffe7e7;
    border-left-color: #dc3232;
}

.results-summary h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.results-summary p {
    margin: 5px 0;
}

.products-table-container {
    margin-top: 15px;
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.products-table th,
.products-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.products-table th {
    background: #f9f9f9;
    font-weight: 600;
}

.products-table tr:hover {
    background: #f9f9f9;
}

.products-table a {
    color: #0073aa;
    text-decoration: none;
}

.products-table a:hover {
    text-decoration: underline;
}

.download-csv-btn {
    margin-top: 15px;
}

.spinner-container {
    display: inline-block;
    margin-left: 10px;
}

.attribute-mapper-actions .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.error-list {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.error-list ul {
    margin: 0;
    padding-left: 20px;
}

.error-list li {
    color: #dc3232;
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .mapping-row-fields {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mapping-arrow {
        transform: rotate(90deg);
        padding: 0;
        text-align: center;
    }
    
    .remove-mapping-row {
        padding-bottom: 0;
        margin-top: 10px;
    }
    
    .attribute-mapper-actions {
        flex-direction: column;
    }
    
    .attribute-mapper-actions .button {
        width: 100%;
    }
}
