/* Copy Link Toast Notification */
.recipe-copy-toast {
    position: fixed !important;
    background: #2E7D32;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 999999 !important;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    display: block !important;
    min-width: 200px;
    text-align: center;
}

.recipe-copy-toast.show {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.recipe-copy-toast::before {
    content: '✓ ';
    margin-right: 5px;
    font-weight: bold;
}

/* Copy link cursor */
.recipe-link-icon.copy-link {
    cursor: pointer;
    position: relative;
}

.recipe-link-icon.copy-link:hover svg {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Animation for copy action */
@keyframes copyPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.recipe-link-icon.copy-link.copying svg {
    animation: copyPulse 0.3s ease;
}

/* Responsive toast positioning */
@media (max-width: 640px) {
    .recipe-copy-toast {
        bottom: 20px !important;
        left: 50% !important;
        top: auto !important;
        transform: translate(-50%, 10px) !important;
        margin: 0 !important;
    }
    
    .recipe-copy-toast.show {
        transform: translate(-50%, 0) !important;
    }
}

/*************Start Ajax Load********************/
/* Load More Button */
.recipe-load-more-wrapper {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
}

.recipe-load-more-btn {
    display: inline-block;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: #6B8E6F;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(107, 142, 111, 0.2);
}

.recipe-load-more-btn:hover {
    background-color: #5a7a5e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 142, 111, 0.3);
}

.recipe-load-more-btn:active {
    transform: translateY(0);
}

.recipe-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading state for button */
/*.recipe-load-more-btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}*/

@media (max-width: 640px) {
    .recipe-load-more-btn {
        padding: 12px 32px;
        font-size: 15px;
    }
}

/*************End Ajax Load********************/
.recipe-cards-wrapper {
    width: 100%;
    margin: 0 auto;
    position: relative;
}

/* Search Box */
.recipe-search-wrapper {
    max-width: 680px;
    margin: 0 auto 40px;
}

.recipe-search-input {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    background: #f8f8f8;
    transition: all 0.3s ease;
}

.recipe-search-input:focus {
    outline: none;
    border-color: #6B8E6F;
    background: #fff;
    box-shadow: 0 2px 8px rgba(107, 142, 111, 0.1);
}

/* Category Tabs */
.recipe-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.recipe-tab {
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.recipe-tab:hover {
    background: #f5f5f5;
    border-color: #6B8E6F;
}

.recipe-tab.active {
    background: #6B8E6F;
    color: #fff;
    border-color: #6B8E6F;
}

/* Grid Layout */
.recipe-cards-grid {
    display: grid;
    gap: 30px;
    margin-top: 30px;
    transition: opacity 0.3s ease;
}

.recipe-cards-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

.recipe-cards-grid.columns-1 {
    grid-template-columns: 1fr;
}

.recipe-cards-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.recipe-cards-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.recipe-cards-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .recipe-cards-grid.columns-3,
    .recipe-cards-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .recipe-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .recipe-tabs {
        gap: 8px;
    }
    
    .recipe-tab {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Recipe Card */
.recipe-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.recipe-card-inner {
    position: relative;
}

/* Badges */
.protein-badge-wrapper {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
}

.protein-badge {
    display: inline-block;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background-color: #6B8E6F;
    border-radius: 50px;
}

.difficulty-badge-wrapper {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}

.difficulty-badge {
    display: inline-block;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 50px;
}

.difficulty-badge.easy {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.difficulty-badge.medium {
    background-color: #FFF3E0;
    color: #E65100;
}

.difficulty-badge.hard {
    background-color: #FFEBEE;
    color: #C62828;
}

/* Image */
.recipe-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #f0f0f0;
}

.recipe-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recipe-card:hover .recipe-card-image img {
    transform: scale(1.05);
}

/* Content */
.recipe-card-content {
    padding: 20px;
}

.recipe-card-title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.recipe-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recipe-card-title a:hover {
    color: #6B8E6F;
}

.recipe-card-description {
    margin: 0 0 16px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    height: 41px;
}

/* Meta */
.recipe-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
}

.meta-item svg {
    flex-shrink: 0;
}

.recipe-link-icon {
    margin-left: auto;
    color: #333;
    transition: all 0.3s ease;
}

.recipe-link-icon:hover {
    color: #6B8E6F;
    transform: translateX(4px);
}

/* Star Rating */
.star-rating {
    display: inline-flex;
    gap: 2px;
    font-size: 14px;
}

.star-rating .star {
    color: #E0E0E0;
    font-size: 21px;    
}

.star-rating .star.filled {
    color: #2F6B3F;
    font-size: 21px;
}



/* Loading Spinner */
.recipe-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6B8E6F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results */
.no-recipes-found {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #999;
    grid-column: 1 / -1;
}