/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Modal animations */
.modal-enter {
    animation: scaleIn 0.3s ease-out;
}

/* Card hover effects */
.recipe-card {
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    background-color: (90deg, #2cf540 25%, #e0e0e0 50%, #f0f0f0 75%);
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Smooth transitions */
.btn-transition {
    transition: all 0.2s ease-out;
}

/* Loading skeleton animation */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton {
    background: linear-gradient(90deg, #a8f35d 25%, #c5e55e 50%, #9bf5bc 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    
    .auth-modal {
        width: 90%;
        margin: 1rem;
    }
    
    .recipe-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Button hover effects */
.btn-primary {
    transition: all 0.2s ease-out;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #22c55e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem;
    border-radius: 0.5rem;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
    z-index: 1000;
}

/* Improved focus states */
:focus {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Skip to content for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    padding: 8px;
    background: #22c55e;
    color: white;
    transition: top 0.2s;
}



.skip-link:focus {
    top: 0;
}

/* Button expansion animation */
.btn-expand {
    transform: scale(1);
    transition: transform 0.2s ease-out;
}

.btn-expand:hover {
    transform: scale(1.05);
}

/* Ensure buttons maintain their shape */
.btn-expand:active {
    transform: scale(0.98);
}

/* Disable expansion for disabled buttons */
.btn-expand:disabled {
    transform: scale(1);
}

/* Custom dropdown styling */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.dropdown-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* Style the datalist dropdown */
input::-webkit-calendar-picker-indicator {
    display: none !important;
}

/* Custom suggestions list */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 50;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.suggestions-list.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    background: #f3f4f6;
    color: #22c55e;
}

.suggestion-item.selected {
    background: #dcfce7;
    color: #22c55e;
}

/* Scrollbar styling */
.suggestions-list::-webkit-scrollbar {
    width: 8px;
}

.suggestions-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.suggestions-list::-webkit-scrollbar-thumb {
    background: #22c55e;
    border-radius: 4px;
}

.suggestions-list::-webkit-scrollbar-thumb:hover {
    background: #1da052;
}

/* Error message animation */
#searchError {
    animation: slideIn 0.2s ease-out;
}

.userSection{
    background-color: #689f38;
    background-image: repeating-linear-gradient(
      -25deg,
      transparent,
      transparent 40px,
      #aed581 40px,
      #aed581 50px
    );
}
