/* MILLA Recommendation System Styles */

.milla-recommendation {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header */
.milla-recommendation__header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.milla-recommendation__header h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.milla-recommendation__header p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}

/* Form */
.milla-recommendation__form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.milla-recommendation__section {
    padding: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.milla-recommendation__section:last-child {
    border-bottom: none;
}

.milla-recommendation__section h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.milla-recommendation__section h4::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-right: 12px;
    border-radius: 2px;
}

/* Form Layout */
.milla-recommendation__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.milla-recommendation__field {
    display: flex;
    flex-direction: column;
}

.milla-recommendation__field label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #555;
    font-size: 0.95rem;
}

/* Input Styles */
.milla-recommendation__form input[type="text"],
.milla-recommendation__form input[type="number"],
.milla-recommendation__form input[type="date"],
.milla-recommendation__form input[type="time"],
.milla-recommendation__form select,
.milla-recommendation__form textarea {
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.milla-recommendation__form input:focus,
.milla-recommendation__form select:focus,
.milla-recommendation__form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.milla-recommendation__form input[type="number"] {
    -moz-appearance: textfield;
}

.milla-recommendation__form input[type="number"]::-webkit-outer-spin-button,
.milla-recommendation__form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Checkbox Styles */
.milla-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.milla-checkbox:hover {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 6px;
    padding-left: 8px;
}

.milla-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    accent-color: #667eea;
    cursor: pointer;
}

.milla-checkbox__label {
    font-weight: 500;
    color: #555;
    cursor: pointer;
}

/* Multiple Select */
.milla-recommendation__form select[multiple] {
    min-height: 120px;
    padding: 8px;
}

.milla-recommendation__form select[multiple] option {
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
}

.milla-recommendation__form select[multiple] option:hover {
    background: rgba(102, 126, 234, 0.1);
}

.milla-recommendation__form select[multiple] option:checked {
    background: #667eea;
    color: white;
}

/* Form Actions */
.milla-recommendation__actions {
    padding: 2rem;
    background: #f8f9fa;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Button Styles */
.milla-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.milla-button--primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.milla-button--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.milla-button--secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.milla-button--secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.milla-button--small {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-width: 100px;
}

/* Results Section */
.milla-recommendation__results {
    margin-top: 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.milla-recommendation__loading {
    padding: 4rem 2rem;
    text-align: center;
    color: #666;
}

.milla-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.milla-recommendation__content {
    padding: 2rem;
}

/* Grid Layout for Results */
.milla-recommendation__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

/* Card Styles */
.milla-recommendation__card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.milla-recommendation__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.milla-recommendation__card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.milla-recommendation__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.milla-recommendation__card:hover .milla-recommendation__card-image img {
    transform: scale(1.05);
}

.milla-recommendation__card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
}

.milla-recommendation__card-content {
    padding: 1.5rem;
}

.milla-recommendation__card-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
    line-height: 1.3;
}

.milla-recommendation__card-content p {
    color: #666;
    margin: 0 0 1rem 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Badge Styles */
.milla-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 2px;
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e9ecef;
}

.milla-badge--easy {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.milla-badge--moderate {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.milla-badge--difficult {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.milla-badge--expert {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.milla-recommendation__card-meta {
    margin-bottom: 1rem;
}

.milla-recommendation__card-actions {
    display: flex;
    justify-content: flex-end;
}

/* Error and No Results */
.milla-recommendation__error,
.milla-recommendation__no-results {
    padding: 3rem 2rem;
    text-align: center;
    color: #666;
}

.milla-recommendation__error {
    color: #dc3545;
}

.milla-recommendation__error p,
.milla-recommendation__no-results p {
    font-size: 1.1rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .milla-recommendation {
        padding: 1rem;
    }
    
    .milla-recommendation__header {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .milla-recommendation__header h3 {
        font-size: 2rem;
    }
    
    .milla-recommendation__section {
        padding: 1.5rem;
    }
    
    .milla-recommendation__row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .milla-recommendation__actions {
        flex-direction: column;
        align-items: center;
    }
    
    .milla-button {
        width: 100%;
        max-width: 300px;
    }
    
    .milla-recommendation__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .milla-recommendation__card-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .milla-recommendation__header h3 {
        font-size: 1.5rem;
    }
    
    .milla-recommendation__header p {
        font-size: 1rem;
    }
    
    .milla-recommendation__section h4 {
        font-size: 1.1rem;
    }
    
    .milla-recommendation__form input,
    .milla-recommendation__form select,
    .milla-recommendation__form textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Accessibility */
.milla-recommendation__form input:focus,
.milla-recommendation__form select:focus,
.milla-recommendation__form textarea:focus,
.milla-button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .milla-recommendation__form input,
    .milla-recommendation__form select,
    .milla-recommendation__form textarea {
        border-width: 3px;
    }
    
    .milla-button {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .milla-recommendation__card,
    .milla-recommendation__card-image img,
    .milla-button,
    .milla-checkbox {
        transition: none;
    }
    
    .milla-spinner {
        animation: none;
    }
} 