/*
 * Booking nudges in the One Take trial (homepage). Loaded only when the
 * welcome_video or result_card_v2 flag is on, see manualto_otm_flag().
 * Plain CSS, like otm-share-modal.css.
 */

.otm-wv [hidden],
.otm-wv[hidden],
.otm-result-card--v2 [hidden] {
    display: none !important;
}

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

/* ---- A. Welcome video in the processing card ---- */

.otm-wv {
    max-width: 720px;
    margin: 0 auto;
}

.otm-wv__ready {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.otm-wv__ready-btn {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    border: 0;
    border-radius: 0.625rem;
    background: #111827;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

.otm-wv__ready-btn:hover {
    background: #1f2937;
}

.otm-wv__player {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: #111827;
}

.otm-wv__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.otm-wv__caption {
    /* left/right 0 + auto margins: centred without capping the width at 50%
       of the player, which left: 50% + translateX would do. */
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4rem;
    width: fit-content;
    max-width: calc(100% - 2rem);
    margin: 0 auto;
    padding: 0.375rem 0.875rem;
    border-radius: 0.5rem;
    background: rgba(17, 24, 39, 0.78);
    color: #ffffff;
    font-size: 1.125rem;
    line-height: 1.35;
    text-align: center;
    white-space: pre-line;
    pointer-events: none;
}

.otm-wv__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(to top, rgba(17, 24, 39, 0.85), rgba(17, 24, 39, 0));
    color: #ffffff;
}

.otm-wv__icon-btn,
.otm-wv__sound {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0 0.25rem;
    border: 0;
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
}

.otm-wv__icon-btn svg,
.otm-wv__sound svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.otm-wv__icon-btn:focus-visible,
.otm-wv__sound:focus-visible,
.otm-wv__replay:focus-visible {
    outline: 2px solid #FFCC00;
    outline-offset: 2px;
    border-radius: 0.375rem;
}

.otm-wv__icon-play,
.otm-wv--paused .otm-wv__icon-pause,
.otm-wv__icon-sound,
.otm-wv--muted .otm-wv__icon-sound {
    display: none;
}

.otm-wv--paused .otm-wv__icon-play,
.otm-wv:not(.otm-wv--muted) .otm-wv__icon-sound {
    display: block;
}

.otm-wv:not(.otm-wv--muted) .otm-wv__icon-muted {
    display: none;
}

.otm-wv__track {
    flex: 1;
    height: 4px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    position: relative;
}

/* Taller hit area than the visible line. */
.otm-wv__track::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    bottom: -12px;
}

.otm-wv__fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: #FFCC00;
}

.otm-wv__time {
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.otm-wv__row,
.otm-wv__collapsed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.otm-wv__row {
    margin-top: 1.25rem;
}

.otm-wv__note {
    margin: 0;
    color: #4b5563;
    font-size: 0.9375rem;
}

.otm-wv__book {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    border-radius: 0.625rem;
    background: #FFCC00;
    color: #111827;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.otm-wv__book:hover {
    background: #facc15;
    color: #111827;
}

/* ---- B. Collapsed row once the video ended ---- */

.otm-wv__collapsed {
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #fafafa;
}

.otm-wv__collapsed-text p {
    margin: 0 0 0.25rem;
    color: #111827;
    font-weight: 600;
    font-size: 0.9375rem;
}

.otm-wv__replay {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #4b5563;
    font: inherit;
    font-size: 0.875rem;
    text-decoration: underline;
    cursor: pointer;
}

.otm-wv__replay:hover {
    color: #111827;
}

@media (max-width: 640px) {
    .otm-wv__row,
    .otm-wv__collapsed {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .otm-wv__book {
        width: 100%;
    }

    /* The processing card keeps its p-8 padding; the video and row B reach
       closer to its edges so the player gets the width of the card. */
    .otm-wv {
        margin-left: -1rem;
        margin-right: -1rem;
    }

    .otm-wv__row {
        padding: 0 1rem;
    }

    .otm-wv__caption {
        bottom: 3rem;
        font-size: 0.875rem;
        padding: 0.25rem 0.625rem;
    }

    .otm-wv__bar {
        gap: 0.5rem;
        padding: 0 0.5rem;
    }

    .otm-wv__time {
        display: none;
    }

    .otm-wv__track {
        min-width: 2.5rem;
    }

    .otm-wv__sound {
        font-size: 0.8125rem;
        white-space: nowrap;
    }
}

/* ---- C. Result card v2 ---- */

.otm-result-card--v2 {
    padding: 1.5rem;
}

@media (min-width: 640px) {
    .otm-result-card--v2 {
        padding: 2rem;
    }
}

.otm-result-card--v2 .otm-result-card__body {
    padding: 0;
}

.otm-result-card__title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.otm-result-card__title-row h2 {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
    color: #111827;
}

.otm-result-card__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-left: auto;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.otm-result-card__pill svg {
    width: 1rem;
    height: 1rem;
}

.otm-result-card--v2[data-otm-state="shared"] .otm-result-card__pill {
    display: none;
}

.otm-result-card__lead {
    margin: 0 0 1.25rem;
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.5;
}

.otm-result-card__links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
}

.otm-result-card__links--end {
    justify-content: center;
}

.otm-result-card--v2 .otm-result-card__open {
    color: #111827;
    font-weight: 700;
    text-decoration: none;
}

.otm-result-card--v2 .otm-result-card__create-new-link {
    color: #6b7280;
    text-decoration: none;
}

.otm-result-card--v2 .otm-result-card__open:hover,
.otm-result-card--v2 .otm-result-card__create-new-link:hover {
    text-decoration: underline;
}

.otm-result-card__book {
    margin: 1.25rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
}

.otm-result-card__book a {
    color: #111827;
    font-weight: 700;
    text-decoration: underline;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .otm-result-card__title-row h2 {
        font-size: 1.25rem;
    }
}
