/* The sign-in wall a redeem code runs into.

   One thing to do, two ways to do it, and four translations that should be
   findable without being in the way. Written from #text.redeem-signin down:
   the page sits inside #content, whose rules for the bare elements —
   #content h1, #content p, #content ul, #content li, #content a — carry an
   id each and would beat a class on its own. */

#text.redeem-signin {
    max-width: 520px;
    padding-top: 70px;
    padding-bottom: 140px;
    text-align: center;
}

#text.redeem-signin h1 {
    font-size: 2.6em;
    margin-bottom: 18px;
}

#text.redeem-signin .redeem-signin-lede {
    margin: 0 auto;
    max-width: 44ch;
    color: var(--lv14);
    line-height: 155%;
}

/* The sentence names the same two things the buttons below do, which is how
   it has always read. Its links are drawn in the writing's own colour so
   they stay part of a sentence: royal blue and underlined, directly over two
   buttons saying the same words, is the page asking twice in the same voice. */
#text.redeem-signin .redeem-signin-lede a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--lv7);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.12s;
}

#text.redeem-signin .redeem-signin-lede a:hover,
#text.redeem-signin .redeem-signin-lede a:focus-visible {
    text-decoration-color: currentColor;
}

/* ---- the two ways on ---------------------------------------------------- */

#text.redeem-signin .redeem-signin-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

#text.redeem-signin .redeem-signin-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 28px;
    border-radius: 100px;
    font-size: 16px;
    line-height: 22px;
    font-variation-settings: "wght" 700, "ital" 0;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

/* making an account is the longer way round and the one most people taking
   a code off a reseller will need, so it is the one that is filled in */
#text.redeem-signin .redeem-signin-go {
    background: seagreen;
    color: var(--slab-ink);
}

#text.redeem-signin .redeem-signin-go:hover,
#text.redeem-signin .redeem-signin-go:focus-visible {
    background: #2f7d57;
    color: var(--slab-ink);
}

#text.redeem-signin .redeem-signin-alt {
    background: var(--lv3);
    color: var(--lv15);
}

#text.redeem-signin .redeem-signin-alt:hover,
#text.redeem-signin .redeem-signin-alt:focus-visible {
    background: var(--lv5);
    color: var(--lv18);
}

/* ---- and the same thing in four other languages ------------------------- */

#text.redeem-signin .redeem-langs {
    margin: 46px auto 0;
    max-width: 430px;
    text-align: left;
}

/* The disclosure's own arrow is dropped and drawn here instead: the stock
   one is set in the browser's font and sits at the browser's size, which on
   a line of Korean and Japanese reads as something left behind. */
#text.redeem-signin .redeem-langs summary {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 9px 14px;
    border: 1px solid var(--lv5);
    border-radius: 8px;
    list-style: none;
    cursor: pointer;
    color: var(--lv12);
    transition: background-color 0.12s, border-color 0.12s;
}

#text.redeem-signin .redeem-langs summary::-webkit-details-marker {
    display: none;
}

#text.redeem-signin .redeem-langs summary:hover,
#text.redeem-signin .redeem-langs summary:focus-visible {
    background: var(--lv1);
    border-color: var(--lv6);
}

#text.redeem-signin .redeem-langs-say {
    font-size: 14px;
    font-variation-settings: "wght" 650, "ital" 0;
    color: var(--lv15);
    white-space: nowrap;
}

/* the four in their own scripts, which is the line a reader who does not
   have English will recognise */
#text.redeem-signin .redeem-langs-names {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: var(--lv10);
}

/* the arrow, after everything, turning as it opens */
#text.redeem-signin .redeem-langs summary::after {
    content: "";
    flex: 0 0 auto;
    margin-left: auto;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.15s;
}

#text.redeem-signin .redeem-langs[open] summary::after {
    transform: translateY(1px) rotate(225deg);
}

#text.redeem-signin .redeem-langs-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#text.redeem-signin .redeem-langs-list li {
    margin: 0;
    padding: 16px 14px;
    border-bottom: 1px solid var(--lv3);
    font-size: 14px;
    line-height: 1.6;
    color: var(--lv14);
}

#text.redeem-signin .redeem-langs-list li:last-child {
    border-bottom: none;
}

/* font-weight as well as the axis: these two lines are Chinese, which
   PolymathWeb has no glyphs for, so they are set in whatever the system
   hands over — and a font without a weight axis hears nothing from
   font-variation-settings. */
#text.redeem-signin .redeem-langs-list b {
    display: inline-block;
    margin-bottom: 2px;
    font-weight: 700;
    font-variation-settings: "wght" 700, "ital" 0;
    color: var(--lv15);
}

@media (max-width: 520px) {
    #text.redeem-signin { padding-top: 40px; }

    #text.redeem-signin .redeem-signin-actions a {
        flex: 1 1 100%;
    }

    /* the native names are the first thing to go: the label beside them
       says what the row is, and a line of them cut in half says nothing */
    #text.redeem-signin .redeem-langs-names { display: none; }
}
