/* =====================================================
   Gluten-Free Meal Planner — WordPress Plugin Styles
   Brand: LetsGoGlutenFree.com | Color: #2F4F32
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Manrope:wght@400;500;700&display=swap');

/* Variables */
.gfmp-planner {
    --gfmp-brand: #2F4F32;
    --gfmp-brand-dark: #253f28;
    --gfmp-brand-light: #E8F0E9;
    --gfmp-accent: #E07A5F;
    --gfmp-cream: #F9F7F2;
    --gfmp-cream-dark: #EBE5DA;
    --gfmp-text: #3D4035;
    --gfmp-text-light: #8A8D85;
    --gfmp-border: #E5E7EB;
    --gfmp-white: #FFFFFF;
    --gfmp-radius: 12px;
    --gfmp-font-heading: 'Playfair Display', Georgia, serif;
    --gfmp-font-body: 'Manrope', -apple-system, sans-serif;

    font-family: var(--gfmp-font-body);
    color: var(--gfmp-text);
    background: var(--gfmp-cream);
    padding: 24px 16px;
    max-width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
}

.gfmp-planner *, .gfmp-planner *:before, .gfmp-planner *:after { box-sizing: border-box; }
.gfmp-planner h1, .gfmp-planner h2, .gfmp-planner h3 { font-family: var(--gfmp-font-heading); }
.gfmp-planner .hidden { display: none !important; }

/* Notice */
.gfmp-notice { padding: 12px 16px; border-radius: var(--gfmp-radius); margin-bottom: 16px; font-size: 14px; }
.gfmp-notice-warning { background: #FEF3C7; border-left: 3px solid #F59E0B; color: #92400E; }
.gfmp-notice-warning a { color: var(--gfmp-brand); }

/* Form wrapper */
.gfmp-form-wrapper {
    background: var(--gfmp-white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
}

/* Steps */
.gfmp-steps { margin-bottom: 20px; }
.gfmp-step-dots { display: flex; gap: 6px; margin-bottom: 8px; }
.gfmp-step-dot {
    height: 6px; border-radius: 3px; background: var(--gfmp-border);
    transition: all 0.3s ease; flex: 0 0 32px;
}
.gfmp-step-dot.active { background: var(--gfmp-brand); flex: 1; }
.gfmp-step-label { font-size: 11px; font-weight: 600; color: var(--gfmp-text-light); text-transform: uppercase; letter-spacing: 0.1em; margin: 0; }

/* Step content */
.gfmp-step-content { animation: gfmp-fade-in 0.3s ease; }
.gfmp-step-title { font-family: var(--gfmp-font-heading); font-size: 22px; font-weight: 700; color: var(--gfmp-brand); margin: 0 0 4px 0; }
.gfmp-step-desc { font-size: 13px; color: var(--gfmp-text-light); margin: 0 0 20px 0; }
.gfmp-field { margin-bottom: 20px; }
.gfmp-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gfmp-text-light); margin-bottom: 10px; }

/* Number grid (people selection) */
.gfmp-number-grid, .gfmp-days-grid, .gfmp-meals-grid, .gfmp-diet-grid, .gfmp-budget-grid, .gfmp-prep-grid {
    display: grid; gap: 8px;
}
.gfmp-number-grid { grid-template-columns: repeat(8, 1fr); }
.gfmp-days-grid { grid-template-columns: repeat(2, 1fr); }
.gfmp-meals-grid { grid-template-columns: repeat(2, 1fr); }
.gfmp-diet-grid { grid-template-columns: repeat(2, 1fr); }
.gfmp-budget-grid { grid-template-columns: repeat(2, 1fr); }
.gfmp-prep-grid { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 480px) {
    .gfmp-days-grid { grid-template-columns: repeat(4, 1fr); }
    .gfmp-meals-grid { grid-template-columns: repeat(4, 1fr); }
    .gfmp-diet-grid { grid-template-columns: repeat(4, 1fr); }
    .gfmp-budget-grid { grid-template-columns: repeat(3, 1fr); }
    .gfmp-prep-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Selectable cards */
.gfmp-select-card {
    background: var(--gfmp-white);
    border: 2px solid var(--gfmp-border);
    border-radius: var(--gfmp-radius);
    padding: 10px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--gfmp-font-body);
    text-align: left;
    width: 100%;
}
.gfmp-select-card:hover {
    border-color: rgba(47,79,50,0.4);
    background: var(--gfmp-white);
    color: var(--gfmp-text);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(47,79,50,0.1);
}
.gfmp-select-card.selected {
    border-color: var(--gfmp-brand) !important;
    background: var(--gfmp-brand-light) !important;
    color: var(--gfmp-text) !important;
}
.gfmp-select-card.selected:hover {
    background: var(--gfmp-brand-light) !important;
    color: var(--gfmp-text) !important;
}
.gfmp-card-number {
    display: flex; align-items: center; justify-content: center;
    height: 36px; font-size: 18px; font-weight: 700; color: var(--gfmp-text);
}
.gfmp-select-card.selected .gfmp-card-number { color: var(--gfmp-brand); }
.gfmp-card-title { font-size: 13px; font-weight: 700; color: var(--gfmp-text); margin: 0 0 2px 0; }
.gfmp-card-desc { font-size: 11px; color: var(--gfmp-text-light); margin: 0; }
.gfmp-card-icon { font-size: 20px; margin-bottom: 6px; display: block; }
.gfmp-select-card.selected .gfmp-card-title { color: var(--gfmp-brand); }

/* GF Badge */
.gfmp-gf-badge {
    display: flex; align-items: center; gap: 8px;
    background: var(--gfmp-brand-light); border-radius: 8px; padding: 8px 12px;
    margin: -12px 0 8px;
}
.gfmp-check-icon {
    width: 20px; height: 20px; background: var(--gfmp-brand); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: white; font-size: 11px;
    flex-shrink: 0; font-weight: bold;
}
.gfmp-gf-text { font-size: 13px; font-weight: 500; color: var(--gfmp-brand); }

/* Textarea */
.gfmp-textarea {
    width: 100%; padding: 12px 16px; border: 2px solid var(--gfmp-border);
    border-radius: var(--gfmp-radius); font-family: var(--gfmp-font-body);
    font-size: 13px; color: var(--gfmp-text); resize: vertical;
    background: var(--gfmp-white); transition: border-color 0.2s;
}
.gfmp-textarea:focus { border-color: var(--gfmp-brand); outline: none; }

/* Summary box */
.gfmp-summary {
    background: var(--gfmp-cream); border-radius: var(--gfmp-radius);
    padding: 16px; margin-bottom: 16px;
}
.gfmp-summary-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.gfmp-summary-label { color: var(--gfmp-text-light); }
.gfmp-summary-value { font-weight: 600; color: var(--gfmp-text); text-transform: capitalize; }

/* Buttons */
.gfmp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border-radius: 50px; font-family: var(--gfmp-font-body);
    font-size: 14px; font-weight: 600; cursor: pointer; border: none;
    transition: all 0.2s ease; text-decoration: none; white-space: nowrap;
}
.gfmp-btn:hover { transform: translateY(-1px); }
.gfmp-btn-primary { background: var(--gfmp-brand); color: #fff; }
.gfmp-btn-primary:hover { background: var(--gfmp-brand-dark); box-shadow: 0 6px 16px rgba(47,79,50,0.25); }
.gfmp-btn-outline { background: transparent; border: 2px solid var(--gfmp-brand); color: var(--gfmp-brand); }
.gfmp-btn-outline:hover { background: var(--gfmp-brand); color: #fff !important; }
.gfmp-btn-ghost { background: transparent; color: var(--gfmp-text-light); border: 2px solid var(--gfmp-border); }
.gfmp-btn-ghost:hover { color: var(--gfmp-brand); border-color: var(--gfmp-brand); background: var(--gfmp-brand-light); }
.gfmp-btn-pinterest { background: #E60023; color: #fff; }
.gfmp-btn-pinterest:hover { background: #c0001d; }
.gfmp-btn-full { width: 100%; }
.gfmp-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Nav */
.gfmp-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--gfmp-border); }
.gfmp-loading-msg { text-align: center; font-size: 12px; color: var(--gfmp-text-light); margin-top: 8px; animation: gfmp-pulse 2s infinite; }

/* Plan header */
.gfmp-plan-header {
    background: var(--gfmp-brand); color: white; border-radius: 16px 16px 0 0;
    padding: 24px; display: flex; flex-wrap: wrap; gap: 16px;
    justify-content: space-between; align-items: flex-end;
}
.gfmp-plan-title { font-family: var(--gfmp-font-heading); font-size: 22px; font-weight: 700; margin: 0 0 4px 0; color: white; }
.gfmp-plan-summary { font-size: 13px; color: rgba(255,255,255,0.7); margin: 0; }
.gfmp-plan-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gfmp-plan-actions .gfmp-btn { font-size: 12px; padding: 8px 14px; }
.gfmp-plan-actions .gfmp-btn-outline { border-color: rgba(255,255,255,0.6); color: white; }
.gfmp-plan-actions .gfmp-btn-outline:hover { background: rgba(255,255,255,0.2); border-color: white; color: white !important; }
.gfmp-plan-actions .gfmp-btn-ghost { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.8); }
.gfmp-plan-actions .gfmp-btn-ghost:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.6); color: white !important; }

/* Day tabs */
.gfmp-day-tabs { display: flex; gap: 8px; padding: 16px; overflow-x: auto; background: white; border-left: 1px solid var(--gfmp-border); border-right: 1px solid var(--gfmp-border); }
.gfmp-day-tab {
    flex-shrink: 0; padding: 8px 16px; border-radius: 50px; font-size: 13px; font-weight: 600;
    cursor: pointer; border: 2px solid var(--gfmp-border); background: white; color: var(--gfmp-text);
    transition: all 0.2s; font-family: var(--gfmp-font-body);
}
.gfmp-day-tab:hover { border-color: var(--gfmp-brand); color: var(--gfmp-brand); background: white; }
.gfmp-day-tab.active { background: var(--gfmp-brand); color: white; border-color: var(--gfmp-brand); }
.gfmp-day-tab.active:hover { background: var(--gfmp-brand-dark); color: white; border-color: var(--gfmp-brand-dark); }

/* Meals container */
.gfmp-meals-container {
    background: var(--gfmp-cream); padding: 16px;
    border-left: 1px solid var(--gfmp-border); border-right: 1px solid var(--gfmp-border);
    display: grid; grid-template-columns: 1fr; gap: 12px;
}
@media (min-width: 480px) { .gfmp-meals-container { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 700px) { .gfmp-meals-container { grid-template-columns: repeat(3, 1fr); } }

/* Meal card */
.gfmp-meal-card {
    background: var(--gfmp-white); border-radius: var(--gfmp-radius);
    overflow: hidden; cursor: pointer; border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.gfmp-meal-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(47,79,50,0.12); }
.gfmp-meal-card-img { width: 100%; height: 140px; object-fit: cover; display: block; }
.gfmp-meal-card-body { padding: 12px; }
.gfmp-meal-type-badge {
    display: inline-block; font-size: 10px; font-weight: 700; padding: 3px 8px;
    border-radius: 50px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em;
}
.gfmp-badge-breakfast { background: #FEF3C7; color: #92400E; }
.gfmp-badge-lunch { background: #D1FAE5; color: #065F46; }
.gfmp-badge-dinner { background: #E0E7FF; color: #3730A3; }
.gfmp-badge-snack { background: #FFEDD5; color: #9A3412; }
.gfmp-meal-name { font-family: var(--gfmp-font-heading); font-size: 14px; font-weight: 600; color: var(--gfmp-brand); margin: 0 0 4px 0; }
.gfmp-meal-desc { font-size: 11px; color: var(--gfmp-text-light); margin: 0 0 8px 0; }
.gfmp-meal-meta { display: flex; gap: 12px; font-size: 11px; color: var(--gfmp-text-light); }

/* Shopping list */
.gfmp-shopping-section {
    background: white; border: 1px solid var(--gfmp-border);
    border-top: none; border-radius: 0 0 16px 16px; overflow: hidden;
}
.gfmp-shopping-toggle {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; background: white; border: none; cursor: pointer;
    font-family: var(--gfmp-font-body); font-size: 15px; font-weight: 700;
    color: var(--gfmp-brand); transition: background 0.2s;
}
.gfmp-shopping-toggle:hover { background: var(--gfmp-cream); color: var(--gfmp-brand); }
.gfmp-shopping-content { padding: 0 20px 20px; display: none; }
.gfmp-shopping-content.open { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 480px) { .gfmp-shopping-content.open { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 700px) { .gfmp-shopping-content.open { grid-template-columns: repeat(3, 1fr); } }
.gfmp-shopping-category h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gfmp-brand); margin: 0 0 8px 0; }
.gfmp-shopping-category ul { list-style: none; padding: 0; margin: 0; }
.gfmp-shopping-category li { font-size: 13px; color: var(--gfmp-text); padding: 3px 0 3px 14px; position: relative; }
.gfmp-shopping-category li::before { content: '•'; position: absolute; left: 0; color: var(--gfmp-brand); }

/* Modal */
.gfmp-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99999;
    display: flex; align-items: center; justify-content: center; padding: 16px;
    animation: gfmp-fade-in 0.2s ease;
}
.gfmp-modal {
    background: white; border-radius: 16px; max-width: 600px; width: 100%;
    max-height: 90vh; overflow-y: auto; position: relative;
    animation: gfmp-slide-up 0.3s ease;
}
.gfmp-modal-close {
    position: sticky; top: 8px; left: calc(100% - 40px); display: block; float: right;
    width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,0.15);
    border: none; cursor: pointer; font-size: 18px; color: white; line-height: 32px;
    text-align: center; margin: 8px 8px 0 0; z-index: 1;
}
.gfmp-modal-close:hover { background: rgba(0,0,0,0.3); }
.gfmp-modal-hero { width: 100%; height: 200px; object-fit: cover; display: block; border-radius: 16px 16px 0 0; }
.gfmp-modal-body { padding: 20px; }
.gfmp-modal-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 50px; margin-bottom: 8px; }
.gfmp-modal-title { font-family: var(--gfmp-font-heading); font-size: 22px; font-weight: 700; color: var(--gfmp-brand); margin: 0 0 8px 0; }
.gfmp-modal-desc { font-size: 13px; color: var(--gfmp-text-light); margin: 0 0 16px 0; }
.gfmp-modal-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; font-size: 13px; color: var(--gfmp-text); }
.gfmp-nutrition-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; background: var(--gfmp-cream); border-radius: 10px; padding: 12px; margin-bottom: 16px; }
.gfmp-nutrition-item { text-align: center; }
.gfmp-nutrition-value { font-size: 15px; font-weight: 700; color: var(--gfmp-brand); }
.gfmp-nutrition-label { font-size: 10px; color: var(--gfmp-text-light); margin-top: 2px; }
.gfmp-section-title { font-family: var(--gfmp-font-heading); font-size: 15px; font-weight: 700; color: var(--gfmp-brand); margin: 0 0 10px 0; }
.gfmp-ingredients-list, .gfmp-instructions-list { padding: 0; margin: 0 0 16px 0; }
.gfmp-ingredients-list { list-style: none; }
.gfmp-ingredients-list li { font-size: 13px; color: var(--gfmp-text); padding: 4px 0 4px 14px; position: relative; }
.gfmp-ingredients-list li::before { content: '•'; position: absolute; left: 0; color: var(--gfmp-brand); }
.gfmp-instructions-list { list-style: none; counter-reset: steps; }
.gfmp-instructions-list li { display: flex; gap: 10px; font-size: 13px; color: var(--gfmp-text); margin-bottom: 10px; }
.gfmp-step-num { flex-shrink: 0; width: 24px; height: 24px; background: var(--gfmp-brand); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.gfmp-pinterest-btn { width: 100%; background: #E60023; color: white; border: none; padding: 12px; border-radius: 50px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: var(--gfmp-font-body); transition: background 0.2s; }
.gfmp-pinterest-btn:hover { background: #c0001d; }

/* Animations */
@keyframes gfmp-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gfmp-slide-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gfmp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Surprise banner */
.gfmp-surprise-banner {
    text-align: center; padding: 16px 20px; background: var(--gfmp-cream-dark);
    border-radius: var(--gfmp-radius); margin-bottom: 16px;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px;
}
.gfmp-surprise-text { margin: 0; font-size: 13px; color: var(--gfmp-text-light); }
.gfmp-btn-accent { background: #E07A5F; color: #fff; border: none; }
.gfmp-btn-accent:hover { background: #d16042; box-shadow: 0 6px 16px rgba(224,122,95,0.3); }
.gfmp-btn-accent:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Regenerate button on meal card */
.gfmp-regen-btn {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,0.9); border: none; cursor: pointer;
    font-size: 14px; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; line-height: 1;
}
.gfmp-regen-btn:hover { background: white; transform: scale(1.1); }
.gfmp-regen-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Shopping section header */
.gfmp-shopping-header { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 0; }
.gfmp-shopping-toggle { flex: 1; justify-content: flex-start; }

/* Saved plans */
.gfmp-saved-plans-wrapper { margin-top: 8px; }
.gfmp-saved-plans-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 8px; }
@media (min-width: 480px) { .gfmp-saved-plans-grid { grid-template-columns: repeat(2, 1fr); } }
.gfmp-saved-plan-card {
    background: var(--gfmp-white); border: 1px solid var(--gfmp-border);
    border-radius: var(--gfmp-radius); padding: 14px;
}
.gfmp-saved-plan-name { font-family: var(--gfmp-font-heading); font-size: 14px; font-weight: 700; color: var(--gfmp-brand); margin: 0 0 4px; }
.gfmp-saved-plan-meta { font-size: 12px; color: var(--gfmp-text-light); margin: 0 0 10px; }
.gfmp-saved-plan-actions { display: flex; gap: 8px; }

/* Print */
@media print {
    .gfmp-plan-actions, .gfmp-day-tabs, .gfmp-modal-overlay { display: none !important; }
    .gfmp-form-wrapper { display: none !important; }
    .gfmp-planner { background: white; }
    .gfmp-plan-header { background: white; color: var(--gfmp-brand); border: 2px solid var(--gfmp-brand); }
    .gfmp-plan-title { color: var(--gfmp-brand); }
}
