/* Wheego country-specific Terms & Conditions — mobile-first. */

.wwwe-terms {
    --wwwe-accent: #e6007e;
    --wwwe-border: #e2e2e2;
    margin: 0 auto;
    max-width: 900px;
}

/* --- Country picker ------------------------------------------------------ */

.wwwe-terms-picker {
    margin: 0 0 1.5rem;
}

.wwwe-terms-picker-label {
    display: block;
    font-weight: 600;
    margin: 0 0 .4rem;
}

.wwwe-terms-select {
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23333' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px 8px;
    border: 1px solid var(--wwwe-border);
    border-radius: 6px;
    color: #1a1a1a;
    font-size: 1rem;
    /* Comfortably above the 44px touch-target minimum. */
    min-height: 52px;
    padding: 0 2.75rem 0 1rem;
    width: 100%;
}

/* The empty state has no document competing with it: the picker leads. */
.wwwe-terms-empty {
    background: #f7f7f8;
    border-radius: 10px;
    padding: 1.5rem;
}

.wwwe-terms-empty .wwwe-terms-picker {
    margin-bottom: 0;
}

.wwwe-terms-question {
    margin: 0 0 .5rem;
}

.wwwe-terms-hint {
    margin: 0 0 1.25rem;
    opacity: .8;
}

/* --- Selected-country banner --------------------------------------------- */

.wwwe-terms-banner {
    background: #f7f7f8;
    border-left: 4px solid var(--wwwe-accent);
    border-radius: 6px;
    font-size: .95rem;
    margin: 0 0 1.75rem;
    padding: .9rem 1.1rem;
}

.wwwe-terms-version {
    opacity: .75;
    white-space: nowrap;
}

.wwwe-terms-pdf {
    white-space: nowrap;
}

/* --- Document ------------------------------------------------------------ */

.wwwe-terms-doc {
    line-height: 1.7;
}

.wwwe-terms-doc h1,
.wwwe-terms-doc h2,
.wwwe-terms-doc h3 {
    line-height: 1.3;
    margin: 2.25rem 0 .75rem;
    scroll-margin-top: 90px; /* clears the sticky picker on anchor jumps */
}

.wwwe-terms-doc h1 { font-size: 1.6rem; }
.wwwe-terms-doc h2 { font-size: 1.35rem; }
.wwwe-terms-doc h3 { font-size: 1.1rem; }

.wwwe-terms-doc p {
    margin: 0 0 1rem;
}

.wwwe-terms-doc ul,
.wwwe-terms-doc ol {
    margin: 0 0 1rem;
    padding-left: 1.4rem;
}

.wwwe-terms-doc li {
    margin-bottom: .4rem;
}

/* --- Tables (fee schedules) --------------------------------------------- */

.wwwe-terms-table-wrap {
    margin: 0 0 1.5rem;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wwwe-terms-doc table {
    border-collapse: collapse;
    min-width: 480px;
    width: 100%;
}

.wwwe-terms-doc th,
.wwwe-terms-doc td {
    border: 1px solid var(--wwwe-border);
    padding: .6rem .75rem;
    text-align: left;
    vertical-align: top;
}

.wwwe-terms-doc th {
    background: #f2f2f3;
    font-weight: 600;
}

/* --- Sticky picker while scrolling a long document ----------------------- */

@media (min-width: 782px) {
    .wwwe-terms-picker {
        position: sticky;
        top: 0;
        background: #fff;
        padding: .75rem 0;
        z-index: 20;
    }

    .wwwe-terms-doc table {
        min-width: 0;
    }
}

/* Flag emoji alignment next to country names in the select. */
.wwwe-terms-select option {
    font-size: 1rem;
}