/* ============================================================
   Country Explorer Widget Styles
   ============================================================ */

.togo-country-explorer-wrapper {
    display: block;
    position: relative;
}

/* Placeholder div that holds space when nav becomes fixed */
.togo-ce-nav-placeholder {
    display: block;
}

/* ─── Sticky Nav ─────────────────────────────────────────────────────────── */
.togo-ce-nav-top {
    position: relative;
    margin-bottom: 30px;
    z-index: 100;
}

.togo-ce-sticky-nav {
    position: sticky;
    top: 0;
    padding: 12px 20px;
    border-radius: 0 0 20px 20px;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Offset for WP admin bar */
body.admin-bar .togo-ce-sticky-nav {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .togo-ce-sticky-nav {
        top: 46px;
    }
}

/* Nav list */
.togo-ce-list.horizontal {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.togo-ce-item {
    margin: 0;
    cursor: pointer;
}

.togo-ce-item a {
    display: flex;
    align-items: center;
    padding: 7px 18px;
    border-radius: 30px;
    color: #333;
    text-decoration: none;
    background: #f5f5f5;
    transition: all 0.25s ease;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.togo-ce-item.active a,
.togo-ce-item:hover a {
    background: #fde0d4;
    color: #ca2603;
    box-shadow: 0 2px 8px rgb(202 38 3 / 22%);
}

.togo-ce-icon {
    width: 30px;
    height: 30px !important;
    margin-right: 7px;
    object-fit: cover;
    border-radius: 3px;
}

/* ─── Search Input ───────────────────────────────────────────────────────── */
.togo-ce-search-wrap {
    position: relative;
    max-width: 280px;
    width: 100%;
}

.togo-ce-search-input {
    width: 100%;
    padding: 8px 16px 8px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    font-size: 0.9rem;
    color: #333;
    background: #fdfdfd;
    transition: all 0.25s ease;
}

.togo-ce-search-input:focus {
    outline: none;
    border-color: var(--togo-primary-color, #ec2424);
    box-shadow: 0 0 0 3px rgba(243, 111, 33, 0.15);
    background: #fff;
}

.togo-ce-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

/* ─── Content area / loader ──────────────────────────────────────────────── */
.togo-ce-content-area {
    min-height: 300px;
    position: relative;
}

.togo-ce-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.55);
    z-index: 20;
    font-size: 1rem;
    color: #888;
}

.togo-ce-no-tours {
    padding: 40px 20px;
    text-align: center;
    color: #888;
}

/* ─── Outer tour Swiper ──────────────────────────────────────────────────── */
.togo-ce-swiper-container {
    width: 100%;
    padding-bottom: 50px;
    /* room for pagination */
    overflow: hidden;
    position: relative;
}

.togo-ce-swiper-container .swiper-wrapper {
    align-items: stretch;
}

.togo-ce-swiper-container .swiper-slide {
    height: auto;
    box-sizing: border-box;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--togo-primary-color, #ec2424);
}

.swiper-pagination-bullet-active {
    background: var(--togo-primary-color, #ec2424);
}

/* ─── Trip Card ──────────────────────────────────────────────────────────── */
.togo-trip-card-explorer {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.togo-trip-card-explorer:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

/* Framework-rendered card image wrapper */
.togo-ce-card-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
    aspect-ratio: 3 / 2;
}

.togo-ce-card-img-wrap .trip-thumbnail,
.togo-ce-card-img-wrap .trip-gallery {
    width: 100%;
    height: 100%;
}

.togo-ce-card-img-wrap .trip-thumbnail a,
.togo-ce-card-img-wrap .trip-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.togo-trip-card-explorer:hover .trip-thumbnail img {
    transform: scale(1.04);
}

.togo-ce-card-img-wrap .trip-gallery-slider {
    height: 100%;
}

.togo-ce-card-img-wrap .trip-gallery-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.togo-ce-card-img-wrap .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.togo-ce-card-img-wrap .swiper-pagination-bullet-active {
    background: #fff;
}

.togo-card-img-swiper .swiper-slide {
    width: 100%;
    height: 100%;
}

.togo-card-img-swiper .swiper-slide img,
.togo-card-img-swiper .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.togo-card-img-swiper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.togo-trip-card-explorer:hover .togo-card-img-swiper img {
    transform: scale(1.04);
}

/* Dots pagination for card carousel */
.togo-card-img-pagination {
    bottom: 8px !important;
}

.togo-card-img-pagination .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.togo-card-img-pagination .swiper-pagination-bullet-active {
    background: #fff;
    width: 8px;
    height: 8px;
}

/* Card Content */
.togo-ce-card-content {
    padding: 16px 18px 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.togo-ce-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.82rem;
    color: #666;
}

.togo-ce-duration {
    font-weight: 500;
}

/* framework .trip-review element */
.togo-ce-meta .trip-review {
    display: flex;
    align-items: center;
    gap: 3px;
    margin: 0;
}

.togo-ce-meta .trip-review svg {
    width: 14px;
    height: 14px;
    fill: #ffc107;
    color: #ffc107;
}

.togo-ce-meta .trip-review-score {
    font-weight: 700;
    color: #1aab71;
}

.togo-ce-meta .trip-review-count {
    font-size: 0.78rem;
    color: #999;
}

.rating-score {
    font-weight: 700;
    color: #1aab71;
}

.review-count {
    font-size: 0.78rem;
    color: #999;
}

.togo-ce-title {
    margin: 0 0 8px;
    font-size: 1rem !important;
    line-height: 1.4;
    font-weight: 600;
    flex-grow: 1;
}

.togo-ce-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 24px;

}

.togo-ce-title a:hover {
    color: var(--togo-primary-color, #ec2424);
}

.togo-ce-route {
    font-size: 0.82rem;
    color: #555;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.togo-ce-route .separator {
    color: #ccc;
    margin: 0 3px;
}

/* Price block */
.togo-ce-price-wrap {
    margin-bottom: 14px;
}

.togo-ce-price-original {
    font-size: 0.82rem;
    color: #999;
    text-decoration: line-through;
}

.togo-ce-price-main {
    font-size: 1.3rem;
    font-weight: 700;
    color: #222;
    display: block;
}

.togo-ce-save-badge {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
}

/* Actions */
.togo-ce-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.togo-ce-btn-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    color: #ec2424;
    transition: all 0.25s;
    text-decoration: none;
}

.togo-ce-btn-icon:hover {
    background: #fff3e0;
    border-color: #ec2424;
}

.togo-ce-btn-icon svg {
    width: 18px;
    height: 18px;
}

.togo-ce-btn-primary {
    flex-grow: 1;
    background: #ec2424;
    color: #fff;
    text-align: center;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.togo-ce-btn-primary:hover {
    background: #ffffff;
    color: #ec2424;
}

.togo-ce-title {
    font-size: 1.125rem !important;
}

input.togo-ce-search-input {
    padding: 0 45px !important;
}

.trip-search-form .field-location__result {
    z-index: 900 !important;
}

/* ─── Visa CTA ───────────────────────────────────────────────────────────── */
.togo-visa-cta-box {
    background: #fff9f0;
    border: 1px solid #ffeeba;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
    text-align: center;
}

.togo-visa-title {
    color: #ec2424;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 600;
}

.togo-visa-content {
    color: #666;
    margin-bottom: 20px;
}

.togo-visa-cta-box .togo-button {
    background-color: #ec2424;
    color: #fff;
    padding: 10px 25px;
    border-radius: 5px;
    display: inline-block;
}

.togo-visa-cta-box .togo-button:hover {
    background-color: #ec2424;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .togo-ce-list.horizontal {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .togo-ce-list.horizontal::-webkit-scrollbar {
        display: none;
    }

    .togo-ce-sticky-nav {
        border-radius: 0 0 12px 12px;
        padding: 8px 12px;
    }
}

/* ─── Callback Modal ─────────────────────────────────────────────────────── */
.togo-callback-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.togo-callback-modal {
    background: #fff;
    width: 90%;
    max-width: 450px;
    padding: 30px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: togoModalSlideUp 0.3s ease-out;
}

@keyframes togoModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.togo-callback-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.togo-callback-close:hover {
    color: #ec2424;
}

.togo-callback-header {
    margin-bottom: 25px;
    text-align: center;
}

.togo-callback-header h3 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #333;
}

.togo-callback-header p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.togo-callback-form .form-group {
    margin-bottom: 15px;
}

.togo-callback-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

.togo-callback-form input,
.togo-callback-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.togo-callback-form input:focus,
.togo-callback-form textarea:focus {
    border-color: #ec2424;
    outline: none;
}

.togo-callback-submit {
    width: 100%;
    background: #ec2424;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.togo-callback-submit:hover {
    background: #d11d1d;
}

.togo-callback-submit:disabled {
    cursor: not-allowed;
}

.form-result {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.form-result.success {
    background: #e6f7ed;
    color: #1e7e34;
    border: 1px solid #c3e6cb;
}

.form-result.error {
    background: #fdf2f2;
    color: #dc3545;
    border: 1px solid #f5c6cb;
}

/* Spinner */
.btn-loader .spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
    margin-left: 10px;
}

.btn-loader .path {
    stroke: #fff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

body.modal-open {
    overflow: hidden;
}

/* ─── Search Form Widget: AJAX Trip Search Dropdown ──────────────────────── */
.togo-ajax-tour-container {
    position: relative;
}

.togo-ajax-tour-container .field-tour__input input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 500;
    color: #222;
}

.togo-ajax-tour-container .field-tour__input input:focus {
    outline: none;
}

.field-tour__remove {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #f5f5f5;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    transition: all 0.2s;
}

.field-tour__remove:hover {
    background: #ffeded;
    color: #ec2424;
}

.field-tour__remove svg {
    width: 14px;
    height: 14px;
}

.togo-ajax-tour-results {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    width: 380px;
    max-height: 480px;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    padding: 15px;
}

/* Adjust grid for the search modal context */
.togo-ajax-trip-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.togo-ajax-trip-results .togo-trip-card-explorer {
    margin: 0;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.togo-ajax-trip-results .togo-ce-card-img-wrap {
    aspect-ratio: 16 / 9;
}

.togo-ajax-trip-results .togo-ce-title {
    font-size: 18px !important;
}

/* Responsive adjustment for dropdown */
@media (max-width: 768px) {
    .togo-ajax-tour-results {
        width: 100%;
        left: 0;
        right: 0;
    }
}