/* Modal Manager Component Styles */
/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    box-sizing: border-box;
    overflow-y: auto;
    backdrop-filter: blur(2px);
}

.modal {
    background: white;
    border-radius: 15px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.modal p {
    margin-bottom: 20px;
    color: #34495e;
}

.modal ul {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
}

.modal li {
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
    color: #2c3e50;
}

.modal li:last-child {
    border-bottom: none;
}

.sufficient {
    color: #27ae60;
    font-weight: bold;
}

.insufficient {
    font-weight: bold;
}

.insufficient-recipe {
    color: #e74c3c;
    font-weight: bold;
}

.insufficient-ingredient {
    color: #e74c3c;
    font-weight: bold;
}

.inventory-status {
    font-size: 0.9em;
    color: #7f8c8d;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-buttons button:first-child {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.modal-buttons button:last-child {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.modal-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Edit Modal Styles */
.edit-modal {
    max-width: 800px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
}

/* Cook Modal Styles */
.cook-modal {
    max-width: 700px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
}

.cook-method {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cook-method h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.cook-method ol {
    padding-left: 20px;
    margin: 0;
}

.method-step {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #34495e;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.method-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Data Management Modal Styles */
.data-modal {
    max-width: 600px;
    width: 95%;
    max-height: 80vh;
    overflow-y: auto;
}

.data-status {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.data-status h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.data-status p {
    margin: 5px 0;
    color: #34495e;
    font-size: 0.95rem;
}

.data-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.data-actions h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-btn {
    padding: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 60px;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.data-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.data-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.load-common {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.reset-sample {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.export {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.import {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
}

.cleanup {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.btn-description {
    margin: 5px 0 0 0;
    font-size: 0.85rem;
    color: #7f8c8d;
    font-style: italic;
}

.import-section {
    position: relative;
}

.import-section input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.status-message {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
}

.status-message:contains("✅") {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.status-message:contains("❌") {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

/* Paste Modal Styles */
.paste-modal {
    max-width: 600px;
    width: 95%;
}

.paste-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-family: monospace;
    font-size: 14px;
    resize: vertical;
    min-height: 300px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

.paste-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

/* LLM Configuration Styles */
.llm-config {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.llm-config .setting-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.llm-config .setting-row label {
    min-width: 120px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.llm-config .setting-row select,
.llm-config .setting-row input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

.llm-config .setting-row select:focus,
.llm-config .setting-row input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

.settings-hint {
    font-size: 0.8rem;
    color: #7f8c8d;
    font-style: italic;
    margin-left: 10px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .modal-overlay {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .modal {
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .modal-buttons button {
        width: 100%;
        min-height: 44px;
    }

    .llm-config .setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .llm-config .setting-row label {
        min-width: auto;
        margin-bottom: 2px;
    }
}

.recipe-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .recipe-options {
        grid-template-columns: 1fr;
    }
}
