/*============================================================================================*/
/* Your custom styles below */
/*============================================================================================*/

:root {
    --fb-theme: #204066;
    --fb-theme-light: #27507f;
    --fb-theme-dark: #1b3557;
    --fb-theme-rgb: 32, 64, 102;
}

/* Premium Segmented / Pill styled Yes-No & Social Engagement Radio Buttons */
.yesno-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 15px 0;
}

.yesno-label {
    cursor: pointer;
    display: inline-block;
    user-select: none;
    margin: 0;
}

.yesno-label input[type="radio"] {
    display: none;
}

.yesno-label .yesno-text {
    display: inline-block;
    min-width: 108px;
    text-align: center;
    padding: 10px 26px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    border: 2px solid #dde5ef;
    background-color: #ffffff;
    color: #4a5568;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.yesno-label:hover .yesno-text {
    border-color: rgba(var(--fb-theme-rgb), 0.45);
    background-color: #f6f9fd;
    color: var(--fb-theme);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(var(--fb-theme-rgb), 0.12);
}

.yesno-label input[type="radio"]:checked + .yesno-text,
.yesno-label .yesno-text.checked {
    background: linear-gradient(135deg, var(--fb-theme-light), var(--fb-theme-dark));
    color: #ffffff;
    border-color: var(--fb-theme-dark);
    box-shadow: 0 6px 16px rgba(var(--fb-theme-rgb), 0.35), 0 0 0 4px rgba(var(--fb-theme-rgb), 0.12);
    transform: translateY(-1px);
}

.yesno-label input[type="radio"]:focus-visible + .yesno-text {
    outline: 2px solid var(--fb-theme-light);
    outline-offset: 3px;
}

/* Emoji rating: make the selected face unmistakable, in the theme colour */
/* Extra room so the ring and halo of the selected face never touch the card edge */
.reaction_inner.emoji-inner,
.reaction_inner:has(.emoji) {
    padding: 22px 10px 18px;
}

.reaction_inner .emoji_img {
    position: relative;
    background-color: #ffffff;
}

.reaction_inner .emoji:hover .emoji_img {
    border-color: rgba(var(--fb-theme-rgb), 0.45);
    transform: scale(1.04);
}

.reaction_inner .emoji.active .emoji_img {
    border-color: var(--fb-theme);
    border-width: 5px;
    padding: 1px;
    background: #ffffff;
    transform: scale(1.06);
    box-shadow: 0 0 0 6px rgba(var(--fb-theme-rgb), 0.14), 0 10px 20px rgba(var(--fb-theme-rgb), 0.3);
}

/* Tick badge on the selected face */
.reaction_inner .emoji.active .emoji_img::after {
    content: "";
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fb-theme-light), var(--fb-theme-dark));
    box-shadow: 0 0 0 2px #ffffff;
    z-index: 1;
}

.reaction_inner .emoji.active .emoji_img::before {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 6px;
    width: 8px;
    height: 4px;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(-45deg);
    z-index: 2;
}

.reaction_inner .emoji.active span {
    color: var(--fb-theme);
    font-weight: 700;
}

/* Fade the faces that were not picked so the choice stands out */
.reaction_inner:has(.emoji.active) .emoji:not(.active) .emoji_img {
    opacity: 0.5;
}

.reaction_inner:has(.emoji.active) .emoji:not(.active):hover .emoji_img {
    opacity: 1;
}

@media (max-width: 480px) {
    .reaction_inner.emoji-inner,
    .reaction_inner:has(.emoji) {
        padding: 18px 6px 14px !important;
    }

    .reaction_inner.emoji-inner .emoji.active .emoji_img {
        border-width: 4px !important;
        padding: 1px !important;
        transform: scale(1.04) !important;
        box-shadow: 0 0 0 4px rgba(var(--fb-theme-rgb), 0.14), 0 6px 14px rgba(var(--fb-theme-rgb), 0.3) !important;
    }

    .reaction_inner .emoji.active .emoji_img::after {
        width: 16px;
        height: 16px;
        right: -2px;
        bottom: -2px;
    }

    .reaction_inner .emoji.active .emoji_img::before {
        right: 4px;
        bottom: 5px;
        width: 6px;
        height: 3px;
    }
}

@media (max-width: 380px) {
    .yesno-label .yesno-text {
        min-width: 96px;
        padding: 9px 20px;
    }
}

/* Language switcher + question language visibility */
html[data-lang="ml"] .question-en {
    display: none;
}

html[data-lang="en"] .question-ml,
html:not([data-lang]) .question-en {
    display: none;
}

.question-ml {
    font-family: 'Noto Sans Malayalam', sans-serif;
}

.question-num {
    font-weight: 800;
    margin-right: 2px;
}

.required-question-mark {
    color: #c01e3d;
    font-weight: 700;
    margin-left: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Global language switcher bar, shown at the top of every feedback page */
.lang-bar {
    display: flex;
    justify-content: center;
    padding: 0 0 14px;
    position: relative;
    z-index: 50;
}

/* Offset by the branding column width so the switch centres over the form card
   without pushing that card out of line with the branding card. */
@media (min-width: 769px) {
    .lang-bar {
        padding-left: 33.3333%;
    }
}

/* The thank-you card carries a much wider shadow, so it needs more room */
.thankyouPage .lang-bar {
    padding-left: 0;
    padding-bottom: 28px;
}

.lang-switch {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    padding: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(32, 64, 102, 0.08);
    box-shadow: 0 10px 30px rgba(32, 64, 102, 0.12);
    backdrop-filter: blur(8px);
}

.lang-switch-thumb {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 5px;
    width: calc(50% - 5px);
    border-radius: 999px;
    background: linear-gradient(135deg, #27507f, #1b3557);
    box-shadow: 0 6px 16px rgba(27, 53, 87, 0.35);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

html[data-lang="en"] .lang-switch-thumb {
    transform: translateX(100%);
}

.lang-switch-btn {
    position: relative;
    z-index: 1;
    flex: 1 1 50%;
    min-width: 104px;
    border: 0;
    background: transparent;
    color: #4a6485;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    padding: 9px 18px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.lang-switch-btn:hover {
    color: #204066;
}

.lang-switch-btn:focus-visible {
    outline: 2px solid #27507f;
    outline-offset: 3px;
}

.lang-switch-btn.is-active {
    color: #ffffff;
}

.lang-switch-btn[data-lang-set="ml"] .lang-switch-label {
    font-family: 'Noto Sans Malayalam', sans-serif;
}

html[data-lang="ml"] .product_review,
html[data-lang="ml"] .thankyouinner {
    font-family: 'Noto Sans Malayalam', sans-serif;
}

.review_title_row {
    width: 100%;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 15px;
    position: relative;
    z-index: 10;
}

.review_title_row .review_title {
    height: auto;
    padding-top: 0;
    width: auto;
    flex: 1 1 auto;
    display: block;
}

.patient-type-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: #204066;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    white-space: nowrap;
}

.thankyouinner .patient-type-badge {
    margin: 0 auto 16px;
}

@media (max-width: 575px) {
    .review_title_row {
        min-height: 65px;
        padding-top: 8px;
        gap: 8px;
    }

    .patient-type-badge {
        font-size: 12px;
        padding: 5px 10px;
    }
}

@media (max-width: 767px) {
    .lang-bar {
        padding-top: 12px;
    }

    .lang-switch-btn {
        min-width: 92px;
        font-size: 13px;
        padding: 8px 14px;
    }
}
