/* ===== Base resets specific to this widget ===== */
.entry-content ul { padding-left: 0; }

/* ===== Wrapper ===== */
.gtc-wrapper {
    max-width: 700px;
    padding: 1rem;
    border: 1px solid var(--ast-border-color, #ccc);
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    text-align: center;

    /* Colour tokens (dark, modern) */
    --ease-blue-bg:   #1565c0;
    --ease-blue-bd:   #0d47a1;
    --ease-blue-fg:   #ffffff;

    --ease-green-bg:  #2e7d32;
    --ease-green-bd:  #1b5e20;
    --ease-green-fg:  #ffffff;

    --ease-yellow-bg: #f9a825;
    --ease-yellow-bd: #f57f17;
    --ease-yellow-fg: #ffffff;

    --ease-orange-bg: #ef6c00;
    --ease-orange-bd: #e65100;
    --ease-orange-fg: #ffffff;

    --ease-red-bg:    #c62828;
    --ease-red-bd:    #8e0000;
    --ease-red-fg:    #ffffff;
}

/* ===== Clue list: two independent columns ===== */
.gtc-columns {
    display: flex;
    gap: 12px;
    margin: 1rem 0;
}
.gtc-col {
    flex: 1 1 0;
    list-style: none;
    padding: 0;
    margin: 0;
}
.gtc-col li { margin: 0 0 12px 0; }

/* ===== Buttons ===== */
.gtc-guess-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.gtc-guess-button:not(.gtc-clue-button) {
    background: var(--ast-global-color-2, #0073e6);
    color: #fff;
    display: none;
}

/* Clue button (colour-coded via tokens) */
.gtc-guess-button.gtc-clue-button {
    width: 100%;
    text-align: center;
    border: 1px solid var(--ast-border-color, #ddd);
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
    position: relative;
    overflow: hidden;
}

/* Colour the clue buttons */
button.gtc-clue-button.gtc--blue   { background: var(--ease-blue-bg)   !important; border-color: var(--ease-blue-bd)   !important; color: var(--ease-blue-fg)   !important; }
button.gtc-clue-button.gtc--green  { background: var(--ease-green-bg)  !important; border-color: var(--ease-green-bd)  !important; color: var(--ease-green-fg)  !important; }
button.gtc-clue-button.gtc--yellow { background: var(--ease-yellow-bg) !important; border-color: var(--ease-yellow-bd) !important; color: var(--ease-yellow-fg) !important; }
button.gtc-clue-button.gtc--orange { background: var(--ease-orange-bg) !important; border-color: var(--ease-orange-bd) !important; color: var(--ease-orange-fg) !important; }
button.gtc-clue-button.gtc--red    { background: var(--ease-red-bg)    !important; border-color: var(--ease-red-bd)    !important; color: var(--ease-red-fg)    !important; }

/* Subtle two-tone shading */
button.gtc-clue-button.gtc--blue,
button.gtc-clue-button.gtc--green,
button.gtc-clue-button.gtc--yellow,
button.gtc-clue-button.gtc--orange,
button.gtc-clue-button.gtc--red {
    box-shadow:
            inset 0 10px 12px rgba(0,0,0,0.10),
            inset 0 -10px 12px rgba(0,0,0,0.16);
}

/* ===== Reveal panel (under each clue) ===== */
.gtc-clue-value {
    display: none;      /* hidden until JS opens it */
    overflow: hidden;
    height: 0;          /* animated */
    opacity: 0;
    transform: translateY(-4px);
    transition:
            height 260ms cubic-bezier(.2,.8,.2,1),
            opacity 220ms ease,
            transform 220ms ease;
    margin: 0;          /* no offset from button */
    border: 1px solid var(--ast-border-color, #ddd);
    border-top: none;   /* seam with button */
    border-radius: 0 0 8px 8px;
    padding: 0 10px;    /* vertical padding added when open */
    background: rgba(0,0,0,0.03);
}
.gtc-col li.is-open .gtc-clue-button {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.gtc-col li.is-open .gtc-clue-value {
    opacity: 1;
    transform: translateY(0);
    padding: 8px 10px;
}

/* Flag colour swatches inside revealed values */
.colour-swatch {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    vertical-align: -3px;
}

/* ===== Results & chips ===== */
.gtc-result { margin-top: 1rem; font-weight: bold; }

.gtc-chip {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid transparent;
    vertical-align: middle;
    margin-right: 4px;
}
#gtc-scorebar .gtc-chip { margin-right: 4px; }

/* Coloured chips */
.gtc-chip.gtc--blue   { background: var(--ease-blue-bg);   border-color: var(--ease-blue-bd); }
.gtc-chip.gtc--green  { background: var(--ease-green-bg);  border-color: var(--ease-green-bd); }
.gtc-chip.gtc--yellow { background: var(--ease-yellow-bg); border-color: var(--ease-yellow-bd); }
.gtc-chip.gtc--orange { background: var(--ease-orange-bg); border-color: var(--ease-orange-bd); }

/* Strong red cross / tick / give up */
.gtc-chip.gtc--cross  { background: #c62828; border-color:#8e0000; position:relative; }
.gtc-chip.gtc--cross::after {
    content:"✕";
    position:absolute; inset:0;
    display:flex; align-items:center; justify-content:center;
    color:#fff; font-size:12px; font-weight:700; line-height:14px;
}
.gtc-chip.gtc--tick   { background: #2e7d32; border-color:#1b5e20; position:relative; }
.gtc-chip.gtc--tick::after  {
    content:"✓";
    position:absolute; inset:0;
    display:flex; align-items:center; justify-content:center;
    color:#fff; font-size:12px; font-weight:700; line-height:14px;
}
.gtc-chip.gtc--giveup { background:#888; border-color:#666; position:relative; }
.gtc-chip.gtc--giveup::after{
    content:"👎";
    position:absolute; inset:0;
    display:flex; align-items:center; justify-content:center;
    font-size:12px; line-height:14px;
}

/* ===== Search & dropdown ===== */
.gtc-select {
    display: flex;
    align-items: center;
    justify-content: center;   /* center the input + buttons */
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

/* make the input wrapper center itself if it ever wraps alone */
.gtc-input-wrap {
    position: relative;
    display: inline-block;
    width: auto;
    margin-inline: auto;        /* helps when it wraps to its own line */
}

.gtc-country-input {
    min-width: 260px;
    border-radius: 10px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    margin: 0; /* avoid gap above dropdown */
}
.gtc-input-wrap {
    position: relative;
    display: inline-block; /* anchors dropdown width to input */
    width: auto;
}
.gtc-ta-list {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;      /* flush to input */
    margin-top: 0;  /* no gap */
    max-height: 260px;
    overflow: auto;
    z-index: 9999;
    background: #fff;
    border: 1px solid #d1d5db;
    border-top: none;               /* seamless edge with input */
    border-radius: 0 0 10px 10px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.08);
}
.gtc-ta-item {
    padding: 12px 12px;
    font-size: 16px;  /* prevents iOS zoom on focus */
    cursor: pointer;
}
.gtc-ta-item:hover,
.gtc-ta-item[aria-selected="true"] { background: #f3f4f6; }
.gtc-ta-empty {
    padding: 10px 12px;
    color: #6b7280;
    font-size: 14px;
}

/* ===== Feedback wobble for invalid/duplicate ===== */
@keyframes gtc-shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}
.gtc-input-shake { animation: gtc-shake 400ms ease; }

/* ===== Mobile ===== */
@media (max-width: 640px) {

    /* Columns stack with NO inter-column gap */
    .gtc-columns {
        flex-direction: column;
        gap: 0;
        margin-top: 12px; /* gentle spacing below search */
    }

    .entry-content ul.gtc-col {
        margin-top: 0;
    }

    /* Search area: input full width; buttons on new lines */
    .gtc-select {
        display: grid;
        grid-template-columns: 1fr;
        row-gap: 8px;
        align-items: stretch;
    }
    .gtc-input-wrap,
    .gtc-country-input {
        width: 100%;
    }
    #gtc-submit,
    #gtc-giveup {
        width: 100%;
        justify-self: stretch;
    }

    /* Extra spacing between sections under the search */
    .gtc-select + .gtc-columns,
    .gtc-select + .gtc-result,
    .gtc-columns + .gtc-result {
        margin-top: 12px;
    }

    /* Ensure dropdown hugs the full-width input */
    .gtc-input-wrap .gtc-ta-list {
        left: 0;
        right: 0;
        top: 100%;
        margin-top: 0;
    }
}

/* kill the trailing gap at the end of each list */
.gtc-col li:last-child { margin-bottom: 0; }

/* on mobile, ensure no column gap AND no trailing gap from col 1 */
@media (max-width: 640px) {
    .gtc-columns { flex-direction: column; gap: 0; }
    .gtc-columns .gtc-col:first-child li:last-child { margin-bottom: 0; }
}

.gtc-guess-log {
    margin-top: 1em;
}


.result-notification {
    padding: 0.85em 1.2em;
    border-radius: 10px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.85em;
    opacity: 0;
    transform: translateY(-4px);
    animation: gtc-fade-in 320ms ease forwards;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    background-size: 100% 200%;
    background-position: top;
    max-width: 400px;
    margin: 0 auto;
}

.result-notification.success {
    background: linear-gradient(to bottom, #34d058, #22863a);
}

.result-notification.failure {
    background: linear-gradient(to bottom, #f05050, #b22222);
}

@keyframes gtc-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Layout inside result-notification */
.result-notification .result-flex {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}
.result-notification .result-copy {
    text-align: left;
}

/* Circular score badge */
/* Circular score badge */
.score-badge {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: #fff;
    /* remove border that looked grey on top */
    border: none;
    /* uniform outer ring instead of border */
    box-shadow: 0 0 0 2px rgba(255,255,255,0.35), inset 0 -6px 10px rgba(0,0,0,0.15), 0 2px 6px rgba(0,0,0,0.15);
    background-clip: padding-box; /* avoid artefacts */
}
.score-badge.success {
    background: linear-gradient(to bottom, #34d058, #22863a);
}
.score-badge.failure {
    background: linear-gradient(to bottom, #9aa0a6, #5f6368);
}
.score-badge__value { line-height: 1; }

/* Result layout remains the same */
.result-notification .result-flex {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}
.result-notification .result-copy { text-align: left; }

.gtc-share { margin-top: 20px; }
.gtc-share-inner { gap: 8px; justify-items: center; }
.gtc-share-preview {
    background: #0f172a; color: #e5e7eb; padding: 10px 12px; border-radius: 10px;
    white-space: pre-wrap; font: 600 14px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
    max-width: 420px; width: 100%; border: 1px solid rgba(255,255,255,0.15);
}
.gtc-share-buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.gtc-share-btn {
    appearance: none; border: 1px solid var(--ast-border-color, #d1d5db);
    background: var(--ast-global-color-2, #0073e6); color: #fff;
    padding: 8px 12px; border-radius: 8px; font: inherit; cursor: pointer; text-decoration: none;
}
.gtc-share-btn:hover { filter: brightness(0.95); }
.gtc-share-twitter { background: #0f1419; border-color: #0f1419; }

/* Tiny toast */
.gtc-toast {
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%) translateY(8px);
    background: rgba(0,0,0,0.85); color: #fff; padding: 8px 12px; border-radius: 8px;
    opacity: 0; transition: opacity .18s ease, transform .18s ease; z-index: 99999; font-size: 14px;
}
.gtc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }


/* Rating line under the sentence */
.rating-line {
    margin-top: 6px;
}
.rating-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
}

/* Share area layout */
.gtc-share { margin-top: 10px; }
.gtc-share-inner { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* Base button styles (anchor + button) */
.gtc-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;

    /* sizing */
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid transparent;

    /* typography */
    font: inherit;
    line-height: 1;           /* consistent vertical centering */
    text-decoration: none;    /* normalize <a> */
    cursor: pointer;

    /* normalize platform quirks */
    -webkit-appearance: none;
    appearance: none;
}

/* Color variants */
.gtc-share-btn--primary {
    background: var(--ast-global-color-2, #0073e6);
    border-color: rgba(0,0,0,0.08);
    color: #fff;
}
.gtc-share-btn--secondary {
    background: #6b7280;      /* neutral */
    border-color: rgba(0,0,0,0.08);
    color: #fff;
}
.gtc-share-btn--dark {
    background: #0f1419;      /* X / Twitter dark */
    border-color: rgba(255,255,255,0.12);
    color: #fff;
}

/* Hover / active / focus states (consistent) */
.gtc-share-btn:hover { filter: brightness(0.95); }
.gtc-share-btn:active { transform: translateY(0.5px); }
.gtc-share-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.gtc-header { margin-bottom: 1rem; }
.gtc-day-picker { display: flex; align-items: center; gap: .5rem; margin:.5rem 0 0; }
.gtc-day-label { font-size: .9rem; opacity: .8; }
.gtc-day-select {
    padding: .4rem .6rem; border: 1px solid var(--ast-border-color, #ddd);
    border-radius: 6px; background: var(--ast-global-color-5, #fff); font-size: .95rem;
}
.gtc-day-link { display:inline-block; margin-left:.5rem; font-size:.9rem; }
.colour-swatch { display:inline-block; width:14px; height:14px; border-radius:3px; border:1px solid rgba(0,0,0,.15); margin-right:4px; vertical-align:middle; }

.main-header-menu > .menu-item > .menu-link {
    height: auto;
}