/* SafariOffice Accommodation Card widget — self-contained styles, inlined into
   the JS embed output and enqueued by the WordPress plugin, so the card renders
   consistently on any external site. */

/* General styling for all cards */
.soac {
    display: flex;
    flex-wrap: wrap; /* Ensures proper layout on smaller screens */
    margin-bottom: 16px;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
    color: #1a1a1a;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    line-height: 1.5;
}

.soac * {
    box-sizing: border-box;
}

.soac .soac-image {
    margin: 0;
}

.soac .soac-image img {
    display: block;
    border: 0;
}

.soac .soac-content h3.soac-title {
    margin: 0 0 4px;
    font-size: 22px;
    line-height: 1.25;
    color: #1a1a1a;
}

.soac .soac-content .soac-meta {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.4;
    color: #6b6b6b;
}

.soac .soac-content p.soac-intro {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

/* The CTA button ships unstyled on purpose: it carries the host site's own
   button classes (sostc_button btn button button-primary), so it inherits that
   site's button styling instead of a SafariOffice look. Mirrors the Share Tour
   card. */

/* No intro → the button follows the meta/detail rows directly and rides up
   against them (the intro's bottom margin would otherwise separate them). Add a
   little top spacing — layout only, so the host still owns the button's look. */
.soac .soac-meta + a,
.soac .soac-details + a {
    margin-top: 8px;
}

/* No gallery image — content fills the whole card in every layout. */
.soac-noimage .soac-content {
    flex: 1 1 100%;
    width: 100%;
}

/* Default soac-card layout (image on top, content below) */
.soac-card {
    display: block;
}

.soac-card .soac-image img {
    width: 100%; /* Ensure the image spans the container */
    height: auto;
}

.soac-card .soac-content {
    padding: 18px;
    text-align: left;
}

/* soac-left layout (image left, content right) */
.soac-left {
    flex-direction: row; /* Align items horizontally */
    align-items: stretch;
}

.soac-left .soac-image {
    flex: 1 1 38%;
    flex-grow: 0;
}

.soac-left .soac-content {
    flex: 1 1 62%;
    flex-grow: 1;
    padding: 18px;
    align-self: center;
}

/* soac-right layout (content first, image second) */
.soac-right {
    flex-direction: row-reverse; /* Reverse the order of items */
    align-items: stretch;
}

.soac-right .soac-image {
    flex: 1 1 38%;
    flex-grow: 0;
}

.soac-right .soac-content {
    flex: 1 1 62%;
    flex-grow: 1;
    padding: 18px;
    align-self: center;
}

/* In the side-by-side layouts the image fills its column height */
.soac-left .soac-image img,
.soac-right .soac-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------------------------------------------------------------------------
   Photo carousel (opt-in). Replaces the single image with the first photos of
   the accommodation's main gallery: arrows, an n / total counter, the photo
   caption, a thumbnail strip and a "+N Photos" tile through to the digital
   page. Behaviour lives in soac.js — CSS only styles the states it toggles.
   --------------------------------------------------------------------------- */
.soac .soac-carousel {
    width: 100%;
}

.soac .soac-carousel__frame {
    position: relative;
    overflow: hidden;
}

.soac .soac-carousel__slide {
    display: none;
}

.soac .soac-carousel__slide.is-active {
    display: block;
}

.soac .soac-carousel__slide img {
    display: block;
    width: 100%;
    height: auto;
}

.soac .soac-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}

.soac .soac-carousel__nav:hover {
    background: rgba(0, 0, 0, 0.55);
}

.soac .soac-carousel__nav--prev {
    left: 10px;
}

.soac .soac-carousel__nav--next {
    right: 10px;
}

/* Chevrons drawn in CSS — no glyph, so nothing depends on the embed's charset */
.soac .soac-carousel__nav:before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    margin: 0 auto;
    border-top: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
}

.soac .soac-carousel__nav--prev:before {
    transform: translateX(2px) rotate(-135deg);
}

.soac .soac-carousel__nav--next:before {
    transform: translateX(-2px) rotate(45deg);
}

.soac .soac-carousel__count {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    font-size: 12px;
    line-height: 18px;
}

.soac .soac-carousel__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 14px 10px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6));
    color: #ffffff;
    font-size: 13px;
    line-height: 18px;
}

.soac .soac-carousel__thumbs {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.soac .soac-carousel__thumb {
    flex: 1 1 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.2s ease-in-out;
}

.soac .soac-carousel__thumb:hover,
.soac .soac-carousel__thumb.is-active {
    opacity: 1;
}

.soac .soac-carousel__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* The last tile counts the photos this card doesn't show and links through */
.soac .soac-carousel__more {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #333333;
    color: #ffffff;
    font-size: 13px;
    line-height: 16px;
    text-align: center;
    text-decoration: none;
}

.soac .soac-carousel__more strong {
    font-size: 16px;
}

/* Narrow embeds keep the frame but drop the strip — the tiles get unreadable */
@media (max-width: 480px) {
    .soac .soac-carousel__thumbs {
        display: none;
    }
}

/* ---------------------------------------------------------------------------
   soac-directory layout — the shape of our own directory card: image left,
   name over a rule, then icon rows (no text labels) with the location on its
   own line and type + class beside each other, and the intro below.
   --------------------------------------------------------------------------- */
.soac-directory {
    flex-direction: row;
    align-items: stretch;
}

.soac-directory .soac-image {
    flex: 1 1 38%;
    flex-grow: 0;
}

.soac-directory .soac-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.soac-directory .soac-content {
    flex: 1 1 62%;
    padding: 14px 18px 16px;
    text-align: left;
}

.soac-directory .soac-title {
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dedede;
}

.soac .soac-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    margin: 0 0 10px;
}

.soac .soac-detail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    line-height: 20px;
    color: #333333;
}

.soac .soac-detail__icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    color: #6b6b6b;
}

.soac-directory .soac-intro {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
}

/* A thumbnail strip next to a column of rows is too busy — frame only */
.soac-directory .soac-carousel__thumbs {
    display: none;
}

@media (max-width: 600px) {
    .soac-directory {
        display: block;
    }

    .soac-directory .soac-image img {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 768px) {
    .soac-left, .soac-right {
        display: block;
    }

    .soac-image img {
        width: 100%; /* Ensure the image spans the container */
        height: auto;
    }

    .soac-left .soac-content, .soac-right .soac-content {
        padding: 18px;
        text-align: left;
    }
}
