/**
 * Recipe Search Module - Styles
 */

.recipe-search-module {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.module-description {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.search-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.recipe-input {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.recipe-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.recipe-search-btn {
    padding: 12px 30px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    white-space: nowrap;
    transition: background-color 0.3s, transform 0.2s;
}

.recipe-search-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.recipe-search-btn:active {
    transform: translateY(0);
}

.recipe-search-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.65;
}

.loading-indicator {
    text-align: center;
    padding: 20px;
}

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

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

.recipe-result {
    margin-top: 20px;
}

.recipe-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-in;
}

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

.recipe-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: bold;
}

.recipe-meta {
    background: #e9ecef;
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
}

.alert {
    padding: 15px;
    margin: 15px 0;
    border-radius: 6px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert a {
    color: inherit;
    font-weight: bold;
    text-decoration: underline;
}

.alert a:hover {
    opacity: 0.8;
}

/* Responsive design */
@media (max-width: 576px) {
    .search-wrapper {
        flex-direction: column;
    }
    
    .recipe-input,
    .recipe-search-btn {
        width: 100%;
    }
    
    .recipe-card {
        padding: 15px;
    }
    
    .recipe-title {
        font-size: 20px;
    }
}
