/**
 * AIM7 External Content Guard — Styles
 *
 * TUI BLUE–inspired placeholder for Google Maps.
 * All selectors prefixed with aim7- to avoid conflicts with Avada or theme CSS.
 * No global selectors. No Avada class dependencies.
 */

/* -------------------------------------------------------------------------- */
/* Map wrapper                                                                 */
/* -------------------------------------------------------------------------- */

.aim7-map-guard {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #f0f4f8;
    font-family: TUIType, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* -------------------------------------------------------------------------- */
/* Placeholder                                                                 */
/* -------------------------------------------------------------------------- */

.aim7-map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1.75rem;
    min-height: 260px;
    height: 100%;
    box-sizing: border-box;
    gap: .75rem;
    color: #1a2e40;
}

.aim7-map-placeholder__icon {
    color: #005ea8;
    opacity: .7;
    margin-bottom: .25rem;
    flex-shrink: 0;
}

.aim7-map-placeholder__hotel {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    color: #1a2e40;
}

.aim7-map-placeholder__address {
    font-size: .9rem;
    margin: 0;
    color: #4a6278;
}

.aim7-map-placeholder__text {
    font-size: .875rem;
    line-height: 1.55;
    margin: 0;
    max-width: 520px;
    color: #4a6278;
}

.aim7-map-placeholder__hint {
    font-size: .8rem;
    margin: 0;
    color: #6b8499;
}

.aim7-map-placeholder__privacy {
    font-size: .8rem;
    margin: 0;
}

.aim7-map-placeholder__privacy a {
    color: #005ea8;
    text-decoration: underline;
}

.aim7-map-placeholder__privacy a:hover {
    color: #003d70;
}

/* -------------------------------------------------------------------------- */
/* Action buttons                                                              */
/* -------------------------------------------------------------------------- */

.aim7-map-placeholder__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: center;
    justify-content: center;
    margin-top: .5rem;
}

.aim7-map-load-btn {
    display: inline-block;
    padding: .7rem 1.6rem;
    background: #005ea8;
    color: #fff;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.3;
    transition: background .15s ease;
}

.aim7-map-load-btn:hover,
.aim7-map-load-btn:focus {
    background: #003d70;
    color: #fff;
    outline: 2px solid #003d70;
    outline-offset: 2px;
}

.aim7-map-route-btn {
    display: inline-block;
    padding: .65rem 1.4rem;
    background: transparent;
    color: #005ea8;
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    border: 2px solid #005ea8;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.3;
    transition: background .15s ease, color .15s ease;
}

.aim7-map-route-btn:hover,
.aim7-map-route-btn:focus {
    background: #005ea8;
    color: #fff;
    outline: 2px solid #003d70;
    outline-offset: 2px;
}

/* -------------------------------------------------------------------------- */
/* Avada original map container (hidden until consent)                         */
/* -------------------------------------------------------------------------- */

.aim7-avada-map-original {
    width: 100%;
    height: 100%;
}

/* Avada sets its own height via --awb-height; override to fill our wrapper */
.aim7-avada-map-original .fusion-google-map {
    width: 100% !important;
    height: 100% !important;
}

/* -------------------------------------------------------------------------- */
/* Canvas (rendered map)                                                       */
/* -------------------------------------------------------------------------- */

.aim7-map-canvas {
    width: 100%;
    height: 100%;
}

/* Loaded state */
.aim7-map-guard--loaded {
    background: #e8ecf0;
}

/* -------------------------------------------------------------------------- */
/* YouTube guard extras                                                        */
/* -------------------------------------------------------------------------- */

/* Local thumbnail overlay — sits behind the placeholder text.
   Never loads from ytimg.com — only used with thumbnail_id (local media). */
.aim7-yt-thumb {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Darken slightly so placeholder text remains readable */
    filter: brightness(.55);
}

/* When a thumbnail is present, lighten placeholder text for contrast */
.aim7-yt-guard .aim7-map-placeholder {
    position: relative; /* stack above thumbnail */
    z-index: 1;
}

.aim7-yt-guard .aim7-map-placeholder__text,
.aim7-yt-guard .aim7-map-placeholder__hint,
.aim7-yt-guard .aim7-map-placeholder__hotel,
.aim7-yt-guard .aim7-map-placeholder__address {
    color: inherit;
}

/* Thumbnail present: force light text */
.aim7-yt-guard:has(.aim7-yt-thumb) .aim7-map-placeholder__icon,
.aim7-yt-guard:has(.aim7-yt-thumb) .aim7-map-placeholder__text,
.aim7-yt-guard:has(.aim7-yt-thumb) .aim7-map-placeholder__hint,
.aim7-yt-guard:has(.aim7-yt-thumb) .aim7-map-placeholder__hotel {
    color: #fff;
}

/* YouTube placeholder icon: inherit from wrapper (TUI BLUE) */
.aim7-yt-placeholder .aim7-map-placeholder__icon {
    color: #005ea8;
}
.aim7-yt-guard:has(.aim7-yt-thumb) .aim7-yt-placeholder .aim7-map-placeholder__icon {
    color: #fff;
}

/* -------------------------------------------------------------------------- */
/* Revoke button (shortcode)                                                   */
/* -------------------------------------------------------------------------- */

.aim7-revoke-maps-consent {
    display: inline-block;
    padding: .4rem .9rem;
    font-family: inherit;
    font-size: .8rem;
    color: #6b8499;
    background: transparent;
    border: 1px solid #c0cdd8;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease;
}

.aim7-revoke-maps-consent:hover,
.aim7-revoke-maps-consent:focus {
    color: #1a2e40;
    border-color: #6b8499;
    outline: none;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                  */
/* -------------------------------------------------------------------------- */

@media ( max-width: 600px ) {
    .aim7-map-placeholder {
        padding: 2rem 1rem;
        min-height: 200px;
    }

    .aim7-map-placeholder__text {
        font-size: .825rem;
    }

    .aim7-map-load-btn {
        width: 100%;
        text-align: center;
    }

    .aim7-map-route-btn {
        width: 100%;
        text-align: center;
    }
}
