/* Tecneco Car Selector Plugin Styles */

.tecneco-car-selector {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.tecneco-header {
    margin-bottom: 25px;
    text-align: center;
}

.tecneco-header h3 {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: inline-block;
}

.tecneco-form {
    margin-bottom: 30px;
}

.tecneco-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.tecneco-col {
    flex: 1;
    min-width: 250px;
}

.tecneco-col-full {
    flex: 1 1 100%;
}

.tecneco-col label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
}

.tecneco-col select,
.tecneco-col input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-size: 16px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.tecneco-col select:focus,
.tecneco-col input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.tecneco-col select:disabled,
.tecneco-col input[type="text"]:disabled {
    background-color: #ecf0f1;
    color: #7f8c8d;
    cursor: not-allowed;
    border-color: #d5dbdb;
}

.tecneco-search-container {
    display: flex;
    gap: 10px;
}

.tecneco-search-container input[type="text"] {
    flex: 1;
}

.tecneco-search-container button {
    padding: 12px 25px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tecneco-search-container button:hover:not(:disabled) {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.tecneco-search-container button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.tecneco-results {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.tecneco-results h4 {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.tecneco-results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.tecneco-part-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tecneco-part-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tecneco-part-code {
    font-size: 14px;
    font-weight: 600;
    color: #3498db;
    margin-bottom: 8px;
}

.tecneco-part-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
}

.tecneco-part-type {
    font-size: 12px;
    background-color: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.tecneco-part-description {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 15px;
    line-height: 1.4;
}

.tecneco-part-price {
    font-size: 20px;
    font-weight: 700;
    color: #27ae60;
    text-align: right;
}

.tecneco-loading {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-size: 16px;
}

.tecneco-loading::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: tecneco-spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

.tecneco-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-size: 16px;
    font-style: italic;
}

.tecneco-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    margin: 20px 0;
    font-size: 14px;
}

.tecneco-success {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    margin: 20px 0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tecneco-car-selector {
        margin: 10px;
        padding: 15px;
    }
    
    .tecneco-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .tecneco-col {
        min-width: auto;
    }
    
    .tecneco-search-container {
        flex-direction: column;
    }
    
    .tecneco-search-container button {
        width: 100%;
    }
    
    .tecneco-results-container {
        grid-template-columns: 1fr;
    }
    
    .tecneco-header h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .tecneco-car-selector {
        margin: 5px;
        padding: 10px;
    }
    
    .tecneco-col select,
    .tecneco-col input[type="text"],
    .tecneco-search-container button {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .tecneco-part-card {
        padding: 15px;
    }
    
    .tecneco-part-name {
        font-size: 16px;
    }
    
    .tecneco-part-price {
        font-size: 18px;
    }
}

/* Stili per l'accessibilità */
.tecneco-col select:focus,
.tecneco-col input[type="text"]:focus,
.tecneco-search-container button:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Animazioni per il caricamento */
.tecneco-fade-in {
    animation: tecneco-fadeIn 0.5s ease-in;
}

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

/* Stili per i tooltip (se necessari) */
.tecneco-tooltip {
    position: relative;
    display: inline-block;
}

.tecneco-tooltip .tecneco-tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tecneco-tooltip:hover .tecneco-tooltiptext {
    visibility: visible;
    opacity: 1;
}

