/* Delivery address confirmation modal (js/delivery-address-modal.js), in the Travessia theme's colours and fonts. */

html.tdam-locked,
html.tdam-locked body {
    overflow: hidden;
}

.tdam-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(45, 45, 45, 0.55);
    animation: tdam-fade 0.2s ease-out;
}

.tdam-dialog {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 40px 32px 32px;
    border-radius: 2rem;
    background: var(--color-base-bg, #F7F4EF);
    color: var(--color-heading, #2D2D2D);
    font-family: 'Sweet Sans Pro', sans-serif;
    box-shadow: 0 24px 64px rgba(45, 45, 45, 0.25);
    animation: tdam-rise 0.25s ease-out;
}

.tdam-close {
    position: absolute;
    top: 16px;
    right: 20px;
    padding: 4px 8px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 28px;
    line-height: 1;
    opacity: 0.4;
    cursor: pointer;
}

.tdam-close:hover,
.tdam-close:focus-visible {
    opacity: 1;
}

.tdam-dialog .tdam-title {
    margin: 0 0 12px;
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 34px;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--color-heading, #2D2D2D);
}

.tdam-intro {
    margin: 0 0 24px;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--color-body, #4A4A4A);
}

.tdam-address {
    margin-bottom: 28px;
    padding: 20px 24px;
    border-radius: 1.25rem;
    background: #fff;
}

.tdam-label {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.45;
}

.tdam-address address {
    font-family: 'Fraunces', serif;
    font-style: normal;
    font-size: 19px;
    line-height: 1.5;
}

.tdam-address address span {
    display: block;
}

.tdam-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 480px) {
    .tdam-actions {
        flex-direction: row;
    }

    .tdam-actions .tdam-button {
        flex: 1;
    }
}

.tdam-dialog .tdam-button {
    padding: 16px 24px;
    border: 1px solid var(--color-primary, #525E42);
    border-radius: 9999px;
    font-family: 'Sweet Sans Pro', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.tdam-dialog .tdam-continue {
    background: var(--color-primary, #525E42);
    color: #fff;
}

.tdam-dialog .tdam-continue:hover {
    transform: scale(1.03);
}

.tdam-dialog .tdam-correct {
    background: transparent;
    color: var(--color-primary, #525E42);
}

.tdam-dialog .tdam-correct:hover {
    background: var(--color-primary, #525E42);
    color: #fff;
}

.tdam-dialog .tdam-button:focus-visible,
.tdam-close:focus-visible {
    outline: 2px solid var(--color-accent, #B07156);
    outline-offset: 3px;
}

/* Transparent cover over the Apple Pay / Google Pay buttons until the address is confirmed */
.tdam-express-host {
    position: relative;
}

.tdam-express-cover {
    position: absolute;
    inset: 0;
    z-index: 10;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.tdam-express-ready {
    margin: 12px 0 0;
    font-size: 14px;
    text-align: center;
    color: var(--color-success, #60704B);
}

@keyframes tdam-fade {
    from { opacity: 0; }
}

@keyframes tdam-rise {
    from { opacity: 0; transform: translateY(12px); }
}

@media (prefers-reduced-motion: reduce) {
    .tdam-backdrop,
    .tdam-dialog {
        animation: none;
    }
}
