/* Styles for the Recipes Modal - Based on modalInventory.css */
:root {
    --recipes-primary-font: 'Roboto Mono', monospace;
    --recipes-accent-font: 'Press Start 2P', cursive;
    --recipes-glow-color: #00FFDC;
    --recipes-secondary-glow: #00A2FF;
    --recipes-text-primary: #E0F0FF;
    --recipes-text-secondary: #A0C0E0;
    --recipes-background-start: rgba(5, 20, 35, 0.98);
    --recipes-background-end: rgba(15, 30, 50, 0.98);
    --recipes-border-color: rgba(0, 255, 220, 0.6);
    --recipes-border-accent-low: rgba(0, 255, 220, 0.2);
    --recipes-border-accent-medium: rgba(0, 255, 220, 0.4);
    --recipes-card-background: rgba(0,0,0,0.15);
    --recipes-card-hover-background: rgba(0, 255, 220, 0.1);
    --recipes-ingredient-background: rgba(0,0,0,0.25);
}

.recipes-modal {
    position: fixed;
    z-index: 1050; /* Higher than inventory modal (1000) but reasonable */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
    backdrop-filter: blur(8px);
}

.recipes-modal.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease;
}

.recipes-modal.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.recipes-modal-content {
    background: linear-gradient(145deg, var(--recipes-background-start), var(--recipes-background-end));
    margin: auto;
    padding: 0;
    border: 1px solid var(--recipes-border-color);
    border-radius: 15px;
    width: 95%;
    max-width: 1000px;
    height: 85vh;
    box-shadow: 0 15px 60px rgba(0, 255, 220, 0.8), 0 0 25px rgba(0,0,0,0.5);
    color: var(--recipes-text-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--recipes-primary-font);
}

.recipes-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background-color: rgba(0,0,0,0.4);
    border-bottom: 1px solid var(--recipes-border-accent-medium);
    flex-shrink: 0;
}

.recipes-modal-header h3 {
    font-family: var(--recipes-accent-font);
    color: var(--recipes-glow-color);
    margin: 0;
    font-size: 1.6em;
    font-weight: normal;
    text-shadow: 0 0 8px rgba(0, 255, 220, 0.9);
}

.recipes-modal-close-button {
    background: none;
    border: none;
    color: var(--recipes-text-secondary);
    font-size: 2.5em;
    font-weight: bold;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.recipes-modal-close-button:hover {
    color: var(--recipes-glow-color);
    transform: scale(1.1);
}

.recipes-modal-body {
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    font-size: 0.9rem;
}

.recipes-search-bar {
    flex-shrink: 0;
}

.recipes-search-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--recipes-border-accent-medium);
    border-radius: 8px;
    background-color: var(--recipes-card-background);
    color: var(--recipes-text-primary);
    font-family: var(--recipes-primary-font);
    font-size: 1em;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.recipes-search-input:focus {
    outline: none;
    border-color: var(--recipes-glow-color);
    background-color: var(--recipes-card-hover-background);
    box-shadow: 0 0 10px rgba(0, 255, 220, 0.3);
}

.recipes-search-input::placeholder {
    color: var(--recipes-text-secondary);
}

.recipes-list-container {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    padding-right: 10px;
}

.recipe-card {
    background-color: var(--recipes-card-background);
    border: 1px solid var(--recipes-border-accent-low);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recipe-card:hover {
    background-color: var(--recipes-card-hover-background);
    border-color: var(--recipes-border-accent-medium);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 255, 220, 0.2);
}

.recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.recipe-name {
    font-family: var(--recipes-accent-font);
    color: var(--recipes-glow-color);
    margin: 0;
    font-size: 0.9em;
    font-weight: normal;
    text-shadow: 0 0 5px rgba(0, 255, 220, 0.6);
    line-height: 1.3;
    flex: 1;
}

.recipe-duration {
    background: linear-gradient(135deg, var(--recipes-glow-color), var(--recipes-secondary-glow));
    color: rgba(0, 0, 0, 0.9);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

.recipe-description {
    color: var(--recipes-text-secondary);
    font-size: 0.85em;
    line-height: 1.4;
    font-style: italic;
}

.recipe-crafting-info {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: space-between;
}

.recipe-ingredients,
.recipe-result {
    flex: 1;
}

.recipe-ingredients h5,
.recipe-result h5 {
    margin: 0 0 10px 0;
    color: var(--recipes-text-primary);
    font-size: 0.9em;
    font-weight: bold;
    text-transform: uppercase;
}

.recipe-ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recipe-ingredient,
.recipe-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background-color: var(--recipes-ingredient-background);
    border-radius: 6px;
    border: 1px solid var(--recipes-border-accent-low);
}

.recipe-ingredient-image,
.recipe-result-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.recipe-ingredient-name,
.recipe-result-name {
    font-size: 0.8em;
    color: var(--recipes-text-primary);
    font-weight: 500;
}

.recipe-arrow {
    font-size: 2em;
    color: var(--recipes-glow-color);
    font-weight: bold;
    text-shadow: 0 0 8px rgba(0, 255, 220, 0.6);
    flex-shrink: 0;
}

.recipes-modal-footer {
    padding: 20px 30px;
    background-color: rgba(0,0,0,0.3);
    border-top: 1px solid var(--recipes-border-accent-medium);
    text-align: center;
    flex-shrink: 0;
}

.back-to-crafting-button {
    background: linear-gradient(145deg, rgba(0, 255, 220, 0.1), rgba(0, 255, 220, 0.2));
    border: 1px solid var(--recipes-border-accent-medium);
    color: var(--recipes-text-primary);
    font-family: var(--recipes-primary-font);
    font-size: 1em;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 4px rgba(0, 255, 220, 0.5);
}

.back-to-crafting-button:hover {
    background: linear-gradient(145deg, rgba(0, 255, 220, 0.2), rgba(0, 255, 220, 0.3));
    border-color: var(--recipes-border-color);
    box-shadow: 0 0 15px rgba(0, 255, 220, 0.4);
    transform: translateY(-2px);
}

.no-recipes-message {
    text-align: center;
    color: var(--recipes-text-secondary);
    font-size: 1.2em;
    font-style: italic;
    margin: 50px;
    grid-column: 1 / -1;
}

/* Custom scrollbar for recipes list */
.recipes-list-container::-webkit-scrollbar {
    width: 10px;
}

.recipes-list-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 5px;
}

.recipes-list-container::-webkit-scrollbar-thumb {
    background: var(--recipes-border-accent-medium);
    border-radius: 5px;
}

.recipes-list-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--recipes-glow-color);
}

/* --- Responsive Design for Mobile & Tablet --- */
@media (max-width: 768px) {
    .recipes-modal-content {
        width: 98%;
        height: 90vh;
    }

    .recipes-modal-header {
        padding: 15px 20px;
    }

    .recipes-modal-header h3 {
        font-size: 1.2em;
    }

    .recipes-modal-close-button {
        font-size: 2em;
    }

    .recipes-modal-body {
        padding: 15px 20px;
        gap: 15px;
    }

    .recipes-list-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .recipe-card {
        padding: 15px;
        gap: 12px;
    }

    .recipe-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .recipe-name {
        font-size: 0.8em;
    }

    .recipe-duration {
        font-size: 0.7em;
        padding: 4px 8px;
    }

    .recipe-crafting-info {
        flex-direction: column;
        gap: 15px;
    }

    .recipe-arrow {
        font-size: 1.5em;
        transform: rotate(90deg);
    }

    .recipe-ingredient,
    .recipe-result-item {
        padding: 6px;
        gap: 8px;
    }

    .recipe-ingredient-image,
    .recipe-result-image {
        width: 28px;
        height: 28px;
    }

    .recipe-ingredient-name,
    .recipe-result-name {
        font-size: 0.75em;
    }

    .recipes-modal-footer {
        padding: 15px 20px;
    }

    .back-to-crafting-button {
        font-size: 0.9em;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .recipes-modal-header h3 {
        font-size: 1em;
    }

    .recipe-name {
        font-size: 0.7em;
    }

    .recipe-description {
        font-size: 0.8em;
    }

    .recipe-ingredients h5,
    .recipe-result h5 {
        font-size: 0.8em;
    }
} 