/* Design Press, info dialog: where the dictionaries come from */

.info-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.info-overlay[hidden] {
    display: none;
}

.info-card {
    width: min(640px, 100%);
    max-height: min(78vh, 700px);
    display: flex;
    flex-direction: column;
    background: var(--dark);
    border: 1px solid var(--accentTransparent);
    border-radius: var(--fp-radius);
    box-shadow: 0 0 14px var(--glow), 0 18px 50px rgba(0, 0, 0, .5);
    animation: fp-info-in .22s cubic-bezier(.2, .85, .3, 1.1) both;
}

@keyframes fp-info-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.info-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--fp-edge);
}

.info-head h2 {
    margin: 0;
    font-family: var(--fp-display);
    font-weight: 600;
    font-size: .8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accentColor);
}

.info-close {
    background: none;
    border: 1px solid var(--fp-edge);
    border-radius: var(--fp-radius);
    width: 30px;
    height: 30px;
    cursor: pointer;
    color: var(--fp-muted);
    font-size: 1rem;
    line-height: 1;
    transition: color .15s, border-color .15s;
}

.info-close:hover {
    color: var(--accentColor);
    border-color: var(--accentTransparent);
}

.info-body {
    overflow-y: auto;
    padding: 6px 20px 22px;
}

.info-intro {
    font-family: var(--fp-ui);
    font-size: .82rem;
    line-height: 1.7;
    color: var(--textColor);
    border-bottom: 1px solid var(--fp-edge);
    padding-bottom: 14px;
}

.info-intro p {
    margin: 0 0 12px;
}

.feedback-btn {
    font-size: .66rem;
    padding: .45rem .85rem;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* display:flex above would defeat the hidden attribute without this */
.feedback-form[hidden] {
    display: none;
}

.feedback-form textarea {
    width: 100%;
    box-sizing: border-box;
    background: var(--backgroundColor-Transparent);
    border: 1px solid var(--fp-edge-strong);
    border-radius: var(--fp-radius);
    color: var(--textColor);
    font-family: var(--fp-ui);
    font-size: .78rem;
    line-height: 1.5;
    padding: 8px 10px;
    resize: vertical;
    min-height: 64px;
}

.feedback-form textarea:focus {
    outline: none;
    border-color: var(--accentTransparent);
    box-shadow: 0 0 8px var(--glow);
}

/* Honeypot, invisible to people, tempting to bots */
#feedbackTrap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.feedback-actions {
    display: flex;
    gap: 8px;
}

.feedback-actions .btn {
    font-size: .66rem;
    padding: .45rem .85rem;
}

.info-body h3 {
    margin: 20px 0 6px;
    font-family: var(--fp-display);
    font-weight: 600;
    font-size: .72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--textColor);
}

.info-body h3 span {
    color: var(--fp-muted);
    font-size: .62rem;
    letter-spacing: 1.5px;
    margin-left: 6px;
}

/* Sits between an h3 and its list, for a section that needs a line of framing
   before the sources. */
.info-note {
    margin: 0 0 8px;
    font-family: var(--fp-ui);
    font-size: .74rem;
    line-height: 1.55;
    color: var(--fp-muted);
}

.info-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.info-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 4px 0;
    font-family: var(--fp-ui);
    font-size: .76rem;
    line-height: 1.55;
    color: color-mix(in srgb, var(--textColor) 80%, transparent);
}

.info-list b {
    flex: 0 0 9em;
    font-weight: 500;
    color: var(--textColor);
}

.info-src {
    flex: 1;
    min-width: 0;
}

.info-list a {
    color: var(--accentColor) !important;
    text-decoration: none;
}

.info-list a:hover {
    text-decoration: underline;
}

.info-list i {
    font-style: normal;
    color: var(--fp-muted);
}

@media (max-width: 480px) {
    .info-list li {
        flex-direction: column;
        gap: 0;
        padding: 6px 0;
    }

    .info-list b {
        flex: none;
    }
}
