/**
 * PCOS Food Suitability & Smart Swaps Checker Stylesheet
 * PCOS Ferticure Clinic — PF-199
 */

/* Hero Banner */
.food-checker-hero {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 32px auto;
    border-radius: var(--radius-md, 18px);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(92, 53, 70, 0.08);
    background: #fdf2f4;
}

.food-checker-hero picture,
.food-checker-hero img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 2 / 1;
    object-fit: cover;
}

/* Header & Intro */
.checker-header-section {
    padding-bottom: 32px;
}

.checker-header-section .breadcrumb {
    font-size: 13px;
    color: var(--muted, #705c66);
    margin-bottom: 16px;
}

.checker-header-section .breadcrumb a {
    color: var(--pink, #a83d70);
    text-decoration: none;
}

.checker-header-section .breadcrumb a:hover {
    text-decoration: underline;
}

.checker-header-section h1 {
    font-family: var(--font-heading, "Playfair Display", Georgia, serif);
    font-size: clamp(2.2rem, 3.8vw, 3.4rem);
    color: var(--plum, #5c3546);
    line-height: 1.2;
    margin-bottom: 16px;
    font-weight: 600;
}

.checker-header-section .lead-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--ink, #38232e);
    max-width: 880px;
    margin-bottom: 24px;
}

/* Highlights Grid */
.trust-highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.trust-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #ffffff;
    border: 1px solid var(--line, #e9dce0);
    border-radius: var(--radius-sm, 8px);
    padding: 16px;
    box-shadow: 0 2px 8px rgba(92, 53, 70, 0.04);
}

.trust-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--blush, #f6dce7);
    color: var(--pink, #a83d70);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.trust-card strong {
    display: block;
    font-size: 14px;
    color: var(--plum, #5c3546);
    margin-bottom: 4px;
}

.trust-card span {
    font-size: 12.5px;
    color: var(--muted, #705c66);
    line-height: 1.5;
}

/* Interactive Search Bar */
.checker-search-section {
    background: #ffffff;
    border: 1px solid var(--line, #e9dce0);
    border-radius: var(--radius-md, 18px);
    padding: 24px;
    box-shadow: 0 8px 30px rgba(92, 53, 70, 0.06);
    margin-bottom: 32px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-icon-left {
    position: absolute;
    left: 18px;
    color: var(--pink, #a83d70);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.food-search-field {
    width: 100%;
    padding: 16px 48px 16px 52px;
    font-size: 1.1rem;
    border: 2px solid #e2d3da;
    border-radius: var(--radius-pill, 999px);
    background: #faf6f8;
    color: var(--ink, #38232e);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.food-search-field:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--pink, #a83d70);
    box-shadow: 0 0 0 4px rgba(168, 61, 112, 0.12);
}

.btn-clear-search {
    position: absolute;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--muted, #705c66);
    cursor: pointer;
    padding: 6px 10px;
    line-height: 1;
    display: none;
}

.btn-clear-search:hover {
    color: var(--plum, #5c3546);
}

/* Autocomplete Dropdown */
.search-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--line, #e9dce0);
    border-radius: var(--radius-sm, 8px);
    box-shadow: 0 12px 35px rgba(92, 53, 70, 0.15);
    max-height: 340px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid #f7eff3;
    cursor: pointer;
    transition: background 0.15s ease;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover,
.search-suggestion-item.active {
    background: #fdf2f6;
}

.search-suggestion-item .sugg-name {
    font-weight: 600;
    color: var(--plum, #5c3546);
    font-size: 15px;
}

.search-suggestion-item .sugg-cat {
    font-size: 12px;
    color: var(--muted, #705c66);
    background: #f2e7eb;
    padding: 3px 8px;
    border-radius: var(--radius-pill, 999px);
}

.search-no-results {
    padding: 18px;
    text-align: center;
    color: var(--muted, #705c66);
}

.search-no-results p {
    margin-bottom: 6px;
    color: var(--plum, #5c3546);
}

/* Category Filter Tabs */
.category-tabs-row {
    margin-top: 18px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.cat-tab {
    background: #f7eff3;
    border: 1px solid transparent;
    color: var(--plum, #5c3546);
    padding: 6px 14px;
    border-radius: var(--radius-pill, 999px);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cat-tab:hover {
    background: #edd8e1;
}

.cat-tab.active {
    background: var(--plum, #5c3546);
    color: #ffffff;
    border-color: var(--plum, #5c3546);
}

/* Quick Select Popular Chips */
.quick-chips-row {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.chips-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted, #705c66);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quick-chip {
    background: #ffffff;
    border: 1px solid #dcccd3;
    color: var(--pink, #a83d70);
    padding: 4px 12px;
    border-radius: var(--radius-pill, 999px);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.quick-chip:hover {
    background: var(--blush, #f6dce7);
    border-color: var(--pink, #a83d70);
}

/* Personalization Section */
.checker-preferences-card {
    background: #faf6f8;
    border: 1px solid var(--line, #e9dce0);
    border-radius: var(--radius-md, 18px);
    padding: 16px 20px;
    margin-bottom: 32px;
}

.preferences-toggle-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: var(--font-heading, serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--plum, #5c3546);
    text-align: left;
}

.preferences-toggle-btn .toggle-icon {
    font-size: 22px;
    color: var(--pink, #a83d70);
    font-weight: bold;
}

.preferences-content {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eadbe2;
}

.preferences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.pref-group {
    background: #ffffff;
    border: 1px solid #ede3e7;
    border-radius: var(--radius-sm, 8px);
    padding: 14px;
}

.pref-group legend,
.pref-group label.group-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--plum, #5c3546);
    margin-bottom: 10px;
    display: block;
}

.pref-options-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pref-option-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--ink, #38232e);
    background: #fbf8f9;
    padding: 6px 10px;
    border: 1px solid #e5d8dd;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
}

.pref-option-label:hover {
    background: #f4eaef;
}

.pref-option-label input[type="radio"],
.pref-option-label input[type="checkbox"] {
    margin: 0;
    accent-color: var(--pink, #a83d70);
}

.pref-select-field {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5d8dd;
    border-radius: 6px;
    font-size: 13px;
    background: #ffffff;
    color: var(--ink, #38232e);
}

.preferences-actions-row {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

/* Results Section & Food Card */
.food-card {
    background: #ffffff;
    border: 1px solid var(--line, #e9dce0);
    border-radius: var(--radius-md, 18px);
    padding: 28px;
    box-shadow: 0 10px 40px rgba(92, 53, 70, 0.08);
    margin-bottom: 40px;
}

.food-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    border-bottom: 1px solid #f2e5ea;
    padding-bottom: 18px;
    margin-bottom: 20px;
}

.food-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.food-category-badge {
    align-self: flex-start;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--blush, #f6dce7);
    color: var(--pink-dark, #87305a);
    padding: 4px 10px;
    border-radius: var(--radius-pill, 999px);
}

.food-name {
    font-family: var(--font-heading, "Playfair Display", Georgia, serif);
    font-size: clamp(1.8rem, 2.5vw, 2.3rem);
    color: var(--plum, #5c3546);
    margin: 0;
    font-weight: 600;
}

/* Preparation Variant Selector */
.food-variant-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fdf6f9;
    padding: 10px 14px;
    border-radius: var(--radius-sm, 8px);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.variant-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--plum, #5c3546);
}

.variant-pills {
    display: flex;
    gap: 8px;
}

.variant-pill {
    background: #ffffff;
    border: 1px solid #dcccd3;
    color: var(--ink, #38232e);
    padding: 5px 12px;
    border-radius: var(--radius-pill, 999px);
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.variant-pill:hover {
    border-color: var(--pink, #a83d70);
}

.variant-pill.active {
    background: var(--pink, #a83d70);
    color: #ffffff;
    border-color: var(--pink, #a83d70);
    font-weight: 600;
}

/* Alerts and Clinical Banners */
.food-alert-banner,
.food-clinical-banner,
.food-diet-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm, 8px);
    margin-bottom: 16px;
    font-size: 13.5px;
    line-height: 1.5;
}

.food-alert-banner.alert-critical {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #9b2c2c;
}

.food-alert-banner.alert-warning {
    background: #fffaf0;
    border: 1px solid #feebc8;
    color: #7b341e;
}

.food-clinical-banner.note-safety,
.food-clinical-banner.note-override {
    background: #f0f7ff;
    border: 1px solid #bee3f8;
    color: #2b6cb0;
}

.food-diet-banner {
    background: #fefcbf;
    border: 1px solid #faf089;
    color: #744210;
}

.alert-icon,
.clinical-icon,
.diet-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.food-alert-banner strong,
.food-clinical-banner strong,
.food-diet-banner strong {
    display: block;
    margin-bottom: 2px;
}

.food-alert-banner p,
.food-clinical-banner p,
.food-diet-banner p {
    margin: 0;
    color: inherit;
    font-size: 13px;
}

/* Results Content Grid */
.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.result-section {
    background: #faf6f8;
    border: 1px solid #f0e1e7;
    border-radius: var(--radius-sm, 8px);
    padding: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.section-title h3 {
    font-family: var(--font-heading, "Playfair Display", Georgia, serif);
    font-size: 1.25rem;
    color: var(--plum, #5c3546);
    margin: 0;
    font-weight: 600;
}

.guidance-text {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ink, #38232e);
    margin-bottom: 16px;
}

.clinical-tip,
.portion-guide,
.prep-guide {
    background: #ffffff;
    border: 1px solid #ede3e7;
    border-radius: 6px;
    padding: 12px 14px;
    margin-top: 12px;
}

.clinical-tip strong,
.portion-guide strong,
.prep-guide strong {
    display: block;
    font-size: 12.5px;
    color: var(--pink-dark, #87305a);
    margin-bottom: 4px;
}

.clinical-tip p,
.portion-guide p,
.prep-guide p {
    margin: 0;
    font-size: 13px;
    color: var(--ink, #38232e);
    line-height: 1.5;
}

/* Smart Swaps Box */
.smart-swaps-box {
    background: #f3f9f5;
    border: 1px solid #d4ece0;
    border-radius: var(--radius-sm, 8px);
    padding: 20px;
    margin-bottom: 24px;
}

.smart-swaps-box .section-title h3 {
    color: #23543d;
}

.swaps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.swap-item {
    background: #ffffff;
    border: 1px solid #c8e4d6;
    border-radius: 6px;
    padding: 12px 14px;
}

.swap-alt {
    font-size: 14px;
    color: #1e4620;
    margin-bottom: 4px;
}

.swap-caveat {
    font-size: 12px;
    color: #4a6b52;
}

/* Footer Disclosures */
.food-card-footer {
    border-top: 1px solid #f2e5ea;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: var(--muted, #705c66);
}

.nutrition-disclosure-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.nutrition-disclosure-note svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--pink, #a83d70);
}

.no-bans-note {
    line-height: 1.5;
}

/* Compare Mode Section */
.food-compare-modal {
    background: #ffffff;
    border: 2px solid var(--pink, #a83d70);
    border-radius: var(--radius-md, 18px);
    padding: 24px;
    box-shadow: 0 16px 50px rgba(92, 53, 70, 0.15);
    margin-bottom: 40px;
    display: none;
}

.compare-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f2e5ea;
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.compare-modal-header h3 {
    font-family: var(--font-heading, serif);
    font-size: 1.4rem;
    color: var(--plum, #5c3546);
    margin: 0;
}

.btn-close-modal {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--muted, #705c66);
    cursor: pointer;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.compare-col {
    background: #faf6f8;
    border: 1px solid #f0e1e7;
    border-radius: var(--radius-sm, 8px);
    padding: 18px;
}

.compare-header {
    border-bottom: 1px solid #f0e1e7;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.compare-header h3 {
    margin: 4px 0 0 0;
    font-size: 1.2rem;
    color: var(--plum, #5c3546);
}

.compare-row {
    margin-bottom: 12px;
}

.compare-row strong {
    display: block;
    font-size: 12px;
    color: var(--pink-dark, #87305a);
    margin-bottom: 2px;
}

.compare-row p {
    margin: 0;
    font-size: 13px;
    color: var(--ink, #38232e);
    line-height: 1.5;
}

.compare-footer-note {
    margin-top: 16px;
    font-size: 12px;
    color: var(--muted, #705c66);
    border-top: 1px solid #f2e5ea;
    padding-top: 12px;
}

/* FAQ Accordion */
.faq-section {
    padding-block: 40px;
    border-top: 1px solid var(--line, #e9dce0);
}

.faq-section h2 {
    font-family: var(--font-heading, serif);
    font-size: clamp(1.8rem, 2.5vw, 2.4rem);
    color: var(--plum, #5c3546);
    margin-bottom: 24px;
}

.faq-list details {
    border-bottom: 1px solid var(--line, #e9dce0);
    padding: 16px 0;
}

.faq-list summary {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--plum, #5c3546);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    content: '+';
    font-size: 20px;
    color: var(--pink, #a83d70);
    font-weight: bold;
}

.faq-list details[open] summary::after {
    content: '−';
}

.faq-list details p {
    margin-top: 10px;
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--ink, #38232e);
}

/* Category-Specific Food Dropdown (PF-199A) */
.category-dropdown-wrapper {
    margin-top: 14px;
    margin-bottom: 18px;
    background: #ffffff;
    border: 1px solid #ebdbe2;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(92, 53, 70, 0.04);
}

.category-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.category-dropdown-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--plum, #5c3546);
    margin: 0;
    cursor: pointer;
}

.category-count-badge {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--pink, #a83d70);
    background: #fbf0f4;
    padding: 2px 10px;
    border-radius: 20px;
    border: 1px solid #f2dbe5;
}

.category-food-select {
    width: 100%;
    padding: 11px 16px;
    font-size: 14.5px;
    font-family: inherit;
    color: #33222a;
    background-color: #fdfbfb;
    border: 1.5px solid #dfc7d2;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a83d70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

.category-food-select:focus {
    border-color: var(--pink, #a83d70);
    box-shadow: 0 0 0 3px rgba(168, 61, 112, 0.15);
    background-color: #ffffff;
}

/* Consultation Options Section (PF-199B: Repositioned after Food Results) */
.consult-options-section {
    margin-block: 48px 36px;
    padding-top: 10px;
}

.consult-options-section .section-heading h2 {
    font-family: var(--font-heading, "Playfair Display", Georgia, serif);
    font-size: 2rem;
    color: var(--plum, #5c3546);
    margin-block: 8px 10px;
}

.consult-options-section .section-heading p {
    color: var(--muted, #6f5863);
    font-size: 14.5px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.consult-options-section .link-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.consult-options-section .link-card {
    display: block;
    padding: 24px 26px;
    background: #ffffff;
    border: 1px solid #ebdbe2;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 10px rgba(92, 53, 70, 0.04);
}

.consult-options-section .link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(92, 53, 70, 0.08);
    border-color: var(--pink, #a83d70);
}

.consult-options-section .link-card h3 {
    font-family: var(--font-heading, "Playfair Display", Georgia, serif);
    font-size: 1.35rem;
    color: var(--plum, #5c3546);
    margin-bottom: 8px;
}

.consult-options-section .link-card p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted, #6f5863);
    margin-bottom: 14px;
}

.consult-options-section .link-card strong {
    display: inline-block;
    color: var(--pink, #a83d70);
    font-size: 14px;
    font-weight: 600;
}

.consult-options-section .consult-text-links {
    text-align: center;
    font-size: 13.5px;
    color: var(--muted, #6f5863);
    margin-top: 20px;
}

.consult-options-section .consult-text-links a {
    color: var(--pink, #a83d70);
    text-decoration: none;
}

.consult-options-section .consult-text-links a:hover {
    text-decoration: underline;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .result-grid,
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 700px) {
    .consult-options-section .link-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .food-card {
        padding: 18px 14px;
    }

    .checker-search-section {
        padding: 16px 12px;
    }

    .food-search-field {
        font-size: 15px;
        padding: 12px 38px 12px 42px;
    }

    .search-icon-left {
        left: 14px;
    }

    .food-name {
        font-size: 1.6rem;
    }

    .category-dropdown-wrapper {
        padding: 10px 12px;
    }

    .category-food-select {
        font-size: 13.5px;
        padding: 10px 14px;
        padding-right: 36px;
    }
}

