/* ==========================================================================
   Modena IGP - Dynamic Nutritional Comparison Tool Styles
   ========================================================================== */

.modena-nutritional-comparison-wrapper {
    width: 100%;
    max-width: 490px;
    margin: 0px auto;
    padding: 0px 0px 100px;
    background: transparent; /* Soft light cyan background */
    border-radius: 0px;
    box-sizing: border-box;
    font-family: "Poppins", Sans-serif;
    color: #011688;
}

.nutritional-comparison-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

/* Header Section */
/* .nutritional-header {
    max-width: 100%;
    margin-bottom: 75px;
    display: flex;
    flex-direction: column;
    align-items: center;
} */
.nutritional-header{order:1;}
.nutritional-section-title {
    font-size: 40px;
    font-weight: 500;
    color: #0A2B78;
    margin: 0 0 85px 0;
    letter-spacing: 0;
    line-height: 1.6;
    font-family: "Poppins", Sans-serif;
}

.nutritional-category-badge-container {
    min-height: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0px;
    order:2;
}

.nutritional-category-badge-img {
    max-height: 60px;
    width: 350px;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
    filter: brightness(0) saturate(100%) invert(76%) sepia(99%) saturate(1267%) hue-rotate(359deg) brightness(102%) contrast(105%);
    max-width: unset !important;
    object-position: top center;
}

.nutritional-category-badge-img.is-updating {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
}

/* Dropdown Pill Button */
.nutritional-dropdown-wrapper {
    position: relative;
    margin-bottom: 40px;
    z-index: 50;
    order:4;
}

.nutritional-dropdown-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #007AFF;
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0;
    padding: 18px 102px;
    border-radius: 0;
    border: none;
    cursor: pointer;
    /* box-shadow: 0 6px 16px rgba(50, 123, 204, 0.3); */
    /* transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease; */
    transition:all 0.3s;
    font-family: "Poppins", Sans-serif;
}

.nutritional-dropdown-btn:hover {
    background-color: #183c79;
   
}

.nutritional-dropdown-btn:active {
    transform: translateY(0);
}

.nutritional-dropdown-btn .dropdown-chevron {
    transition: transform 0.3s ease;
}

.nutritional-dropdown-btn[aria-expanded="true"] .dropdown-chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu Popup */
.nutritional-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(10, 43, 120, 0.18);
    border: 1px solid rgba(10, 43, 120, 0.08);
    padding: 12px;
    text-align: left;
    z-index: 100;
    animation: fadeInDropdown 0.25s ease forwards;
}

.nutritional-dropdown-menu[hidden] {
    display: none !important;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.nutritional-dropdown-search {
    margin-bottom: 8px;
}

.nutritional-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #D1DBE8;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    box-sizing: border-box;
    color: #0A2B78;
}

.nutritional-search-input:focus {
    border-color: #327BCC;
    box-shadow: 0 0 0 3px rgba(50, 123, 204, 0.15);
}

.nutritional-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}

.nutritional-dropdown-list::-webkit-scrollbar {
    width: 6px;
}
.nutritional-dropdown-list::-webkit-scrollbar-track {
    background: #F0F4F8;
    border-radius: 10px;
}
.nutritional-dropdown-list::-webkit-scrollbar-thumb {
    background: #B4C6DF;
    border-radius: 10px;
}

.nutritional-dropdown-group-label {
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #6B8CB3;
    background: #F8FAFC;
    position: sticky;
    top: 0;
    z-index: 2;
}

.nutritional-dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #1A365D;
    transition: background-color 0.15s ease, color 0.15s ease;
    gap: 10px;
}

.nutritional-dropdown-item:hover {
    background-color: #EBF3FC;
    color: #327BCC;
}

.nutritional-dropdown-item.is-selected {
    background-color: #327BCC;
    color: #FFFFFF;
    font-weight: 700;
}

.nutritional-dropdown-item-thumb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nutritional-dropdown-item-name {
    flex: 1;
}

.nutritional-dropdown-item .item-tag {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(10, 43, 120, 0.08);
    color: currentColor;
    white-space: nowrap;
}

.nutritional-dropdown-item.is-selected .item-tag {
    background: rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
}

.nutritional-dropdown-empty {
    padding: 15px;
    text-align: center;
    color: #6B8CB3;
    font-size: 0.9rem;
}

/* Stage Area with Plate & Side Values */
.nutritional-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 850px;
    position: relative;
    margin-bottom: 70px;
    order:3;
    margin-top:-15px;
}

.nutritional-value-display {
    flex: 1;
    display: flex;
    align-items: center;
}

.nutritional-value-display.value-left {
    justify-content: flex-end;
}

.nutritional-value-display.value-right {
    justify-content: flex-start;
}

.val-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: #052865;
    line-height: 1;
    letter-spacing: -0.03em;
    white-space: nowrap;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.val-number.is-updating {
    opacity: 0;
    transform: scale(0.9);
}

/* Half-Moon Circular Plate */
.nutritional-plate-container {
    position: relative;
    width: 380px;
    height: 380px;
    flex-shrink: 0;
    perspective: 1000px;
}

/* .nutritional-plate-circle {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(10, 43, 120, 0.22);
    transform: rotate(45deg);
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: #FFFFFF;
} */
.plate-right .plate-img {    
    transform: rotate(-45deg);
    padding: 0px;
    margin-left: -28px;
}

/* .nutritional-plate-circle.is-revolving {
    animation: revolvePlate 3s;
}

@keyframes revolvePlate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.05); }
    100% { transform: rotate(360deg) scale(1); }
} */

/* Plate Halves */
.plate-half {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    height: 100%;
    /* overflow: hidden; */
}

.plate-half.plate-left {
    left: 0;
    background-color: #052865; /* Dark Blue Plate */
}

.plate-half.plate-right {
    right: unset;
    background-color: #052865; /* Soft light background for compared item */
}
.nutritional-plate-circle .plate-half.plate-right{right:0px;}

.plate-image-holder {
    position: absolute;
    width: 480px;
    height: 480px;
    top: -72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plate-left .plate-image-holder {
    left: -48px;
}

.plate-right .plate-image-holder {
    right: -44px;
    top: -66px;
}

.plate-img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transform: rotate(0deg); /* Counter-rotate food image so it stays level */
    transition: opacity 0.3s ease;
    padding: 0px;
    box-sizing: border-box;
}

.plate-img.is-animating {
    opacity: 0.4;
}

.plate-seam-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.6);
    transform: translateX(-50%);
    z-index: 10;
    display:none;
}

/* Source Notes */
.nvt-source-note,
.nvt-quantity-note {
    font-size: 0.85rem;
    color: #6B8CB3;
    margin: 5px 0;
    display: none;
}


/* shankar css start*/
.nutritional-stage .val-number {
    position: relative;
    height: 100px;
    width: 100%;    
    display: inline-block;
    white-space: nowrap;
    --arc-angle: 13deg;    /* har character ke beech ka angle */
    --arc-radius: 180px;   /* curve ka radius */
}

.nutritional-stage .val-number > span {
    position: absolute;
    left: 50%;
    top: 0;
    transform-origin: center var(--arc-radius);
    transform: translateX(-50%) rotate(calc(var(--i) * var(--arc-angle)));
    font-weight: bold;
    display: inline-block;
    font-family: "Poppins", Sans-serif;

}
.nutritional-stage .value-left .val-number {
    transform: rotate(-90deg);
}
.nutritional-stage .value-right .val-number {
    transform: rotate(90deg);
}

.plate-half.plate-right:not(:has(img[src]:not([src=""]))) {
    position: static;
    overflow: visible;
}

.plate-half.plate-right:has(img[src]:not([src=""])) {
    position: absolute;
    overflow: hidden;
}
/* shankar css end */



/* =========================================================
   PRODUCT IMAGE ROTATION FIX
   Added to fix the one-time 360° rotation after
   selecting a product in the Cotechino Modena IGP section.
   ========================================================= */

.nutritional-plate-circle {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(10, 43, 120, 0.22);
    transform: rotate(45deg);
    transition: none !important;
    background: #FFFFFF;
}

.nutritional-plate-circle.is-revolving {
    animation: revolvePlateFix 0.74s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
    transition: none !important;
}

@keyframes revolvePlateFix {
    0% {
        transform: rotate(45deg);
    }
    100% {
        transform: rotate(405deg);
    }
}


/* Responsive Breakpoints */
@media(max-width:1024px){
    .nutritional-dropdown-btn{font-size: 18px;padding: 15px 50px;}
    .nutritional-section-title {
        font-size: 32px;
        font-weight:700;
        margin:0 0 45px 0;
    }
}

@media (max-width: 768px) {

    .nutritional-value-display {
        width: 100%;
        justify-content: center !important;
    }

}

@media (max-width: 767px) {
    
    .nutritional-plate-container{width:230px;height:230px;}
    .plate-image-holder {
        width: 330px;
        height: 330px;
        top: -70px;
    }
    .plate-left .plate-image-holder {
        left: -35px;
    }
    .nutritional-stage{gap:0px;}
    .val-number {
        font-size: 2.6rem;
        letter-spacing: -11px;
    }
    .nutritional-stage .val-number {height:50px;--arc-angle: 11deg;--arc-radius: 170px;}
    .nutritional-dropdown-btn{padding:15px 30px;font-size:16px;}
    
}