/**
 * MSW Recipe Finder - Styles
 * Culinary-themed, warm, inviting design
 */

.msw-recipe-finder {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'Verdana', 'Arial', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #333333;
}

.msw-calculator__header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #D4772A;
}

.msw-calculator__title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 36px;
    font-weight: 600;
    color: #B8621B;
    margin: 0 0 15px 0;
}

.msw-calculator__subtitle {
    font-size: 20px;
    color: #666666;
    margin: 0;
}

.msw-calculator__instructions {
    background: #FFF8F0;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
    border-left: 4px solid #D4772A;
}

.msw-logged-in-notice {
    display: inline-block;
    padding: 8px 16px;
    background: #F0F9F5;
    color: #2E5F3A;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
}

.msw-form-section {
    background: #FFFFFF;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    border: 2px solid #E8E8E8;
}

.msw-form-section__title {
    font-size: 24px;
    font-weight: 600;
    color: #B8621B;
    margin: 0 0 20px 0;
}

.msw-form-row { margin-bottom: 20px; }

.msw-form-group { margin-bottom: 15px; }

.msw-form-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
}

.msw-form-select,
.msw-form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #CCCCCC;
    border-radius: 6px;
    background: #FFFFFF;
    font-family: 'Verdana', 'Arial', sans-serif;
    box-sizing: border-box;
}

.msw-form-select:focus,
.msw-form-input:focus {
    outline: 3px solid #D4772A;
    outline-offset: 2px;
    border-color: #B8621B;
}

.msw-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.msw-dietary-filters {
    background: #F9F9F9;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.msw-filter-title {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.msw-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.msw-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 16px;
}

.msw-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.msw-filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #E8E8E8;
}

.msw-results-count {
    font-size: 18px;
    font-weight: 600;
    color: #B8621B;
}

.msw-button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.msw-button--primary {
    background: #D4772A;
    color: #FFFFFF;
    border: 2px solid #D4772A;
}

.msw-button--primary:hover {
    background: #B8621B;
    border-color: #B8621B;
}

.msw-button--secondary {
    background: #FFFFFF;
    color: #B8621B;
    border: 2px solid #B8621B;
}

.msw-button--secondary:hover {
    background: #FFF8F0;
}

/* Recipe Grid */
#msw-recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.msw-recipe-card {
    background: #FFFFFF;
    border: 2px solid #E8E8E8;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.msw-recipe-card:hover {
    border-color: #D4772A;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.msw-recipe-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.msw-recipe-card__header h4 {
    font-size: 18px;
    font-weight: 600;
    color: #B8621B;
    margin: 0;
    flex: 1;
}

.msw-recipe-tag {
    background: #F0F0F0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.msw-recipe-card__meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666666;
}

.msw-recipe-card__tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.msw-diet-tag {
    background: #E8F5E9;
    color: #2E7D32;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.msw-no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 20px;
    color: #999999;
}

/* Recipe Modal */
.msw-recipe-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.msw-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}

.msw-modal-content {
    position: relative;
    max-width: 800px;
    max-height: 90vh;
    margin: 5vh auto;
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.msw-modal-header {
    padding: 20px 30px;
    background: #FFF8F0;
    border-bottom: 2px solid #D4772A;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.msw-modal-header h3 {
    margin: 0;
    color: #B8621B;
    font-size: 24px;
}

.msw-modal-close,
.msw-shopping-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #999999;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.msw-modal-close:hover,
.msw-shopping-close:hover {
    color: #B8621B;
}

.msw-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.msw-recipe-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    padding: 20px;
    background: #F9F9F9;
    border-radius: 6px;
    margin-bottom: 25px;
}

.msw-serving-adjuster {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    padding: 15px;
    background: #FFF8F0;
    border-radius: 6px;
}

.msw-serving-btn {
    padding: 8px 16px;
    border: 2px solid #D4772A;
    background: #FFFFFF;
    color: #B8621B;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.msw-serving-btn:hover {
    background: #FFF8F0;
}

.msw-serving-active {
    background: #D4772A;
    color: #FFFFFF;
}

.msw-recipe-section {
    margin-bottom: 25px;
}

.msw-recipe-section h4 {
    font-size: 20px;
    color: #B8621B;
    margin: 0 0 15px 0;
}

.msw-ingredient-list,
.msw-instruction-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.msw-ingredient-list li {
    padding: 10px 0;
    border-bottom: 1px solid #F0F0F0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.msw-ingredient-check,
.msw-shopping-check {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.msw-instruction-list {
    counter-reset: step-counter;
    list-style: none;
}

.msw-instruction-list li {
    counter-increment: step-counter;
    padding: 12px 0 12px 40px;
    position: relative;
    border-bottom: 1px solid #F0F0F0;
}

.msw-instruction-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 12px;
    width: 28px;
    height: 28px;
    background: #D4772A;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.msw-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.msw-modal-footer {
    padding: 20px 30px;
    background: #F9F9F9;
    border-top: 1px solid #E8E8E8;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Shopping List */
.msw-shopping-list {
    list-style: none;
    padding: 0;
}

.msw-shopping-list li {
    padding: 12px 0;
    border-bottom: 1px solid #F0F0F0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* Favorites */
.msw-favorites-section {
    background: #FFF8F0;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    border: 2px solid #D4772A;
}

#msw-favorites-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.msw-favorites-actions {
    text-align: center;
}

.msw-calc-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.msw-calc-actions__save {
    background: #6B9F78;
    color: #FFFFFF;
    border: 2px solid #6B9F78;
}

.msw-calc-actions__save:hover {
    background: #5A8A67;
    border-color: #5A8A67;
}

/* Tips */
.msw-tips {
    background: #F9F9F9;
    padding: 30px;
    border-radius: 8px;
    border: 2px solid #E8E8E8;
}

.msw-tips__title {
    font-size: 24px;
    font-weight: 600;
    color: #B8621B;
    margin: 0 0 20px 0;
}

.msw-tips__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.msw-tips__list li {
    padding: 12px 0 12px 35px;
    position: relative;
    border-bottom: 1px solid #E8E8E8;
}

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

.msw-tips__list li::before {
    content: "🍳";
    position: absolute;
    left: 0;
    font-size: 20px;
}

@media print {
    .msw-calculator__instructions,
    .msw-form-section,
    .msw-calc-actions,
    .msw-tips,
    .msw-modal-footer,
    .msw-modal-close { display: none !important; }
}

@media (max-width: 768px) {
    .msw-recipe-finder { padding: 20px 15px; }
    .msw-filter-grid { grid-template-columns: 1fr; }
    #msw-recipe-grid { grid-template-columns: 1fr; }
    .msw-modal-content { margin: 2vh auto; max-height: 96vh; }
    .msw-nutrition-grid { grid-template-columns: 1fr 1fr; }
}

*:focus-visible {
    outline: 3px solid #D4772A;
    outline-offset: 2px;
}
