/**
 * Travel X PWA & Swipe Gesture Styles
 */

/* ===================================
   PWA Install Button
   =================================== */
.travel-x-install-pwa {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--color-primary, #f0473c), #ff6b5b);
    color: var(--white, #fff);
    border: none;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(240, 71, 60, 0.3);
}

.travel-x-install-pwa:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 71, 60, 0.4);
}

.travel-x-install-pwa i {
    font-size: 1rem;
}

/* ===================================
   PWA Update Notification
   =================================== */
.travel-x-pwa-update {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    animation: slideUp 0.4s ease;
}

.pwa-update-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--color-heding, #0d1013);
    color: var(--white, #fff);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.pwa-update-content span {
    font-size: 0.95rem;
}

.pwa-update-btn {
    padding: 8px 16px;
    background: var(--color-primary, #f0473c);
    color: var(--white, #fff);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pwa-update-btn:hover {
    background: #ff6b5b;
}

.pwa-dismiss-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--white, #fff);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pwa-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===================================
   Offline Notification
   =================================== */
.travel-x-offline-notice {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 20px;
    background: #ff9800;
    color: var(--white, #fff);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 99999;
    text-align: center;
}

.travel-x-offline-notice i {
    font-size: 1.1rem;
}

body.travel-x-offline {
    padding-top: 50px;
}

/* ===================================
   Gallery Swipe Indicators
   =================================== */
.travel-x-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 15px 0;
    margin-top: 10px;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot:hover {
    background: rgba(0, 0, 0, 0.4);
}

.gallery-dot.active {
    background: var(--color-primary, #f0473c);
    transform: scale(1.2);
}

/* ===================================
   Lightbox Styles
   =================================== */
.travel-x-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-container {
    max-width: 90%;
    max-height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--white, #fff);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--color-primary, #f0473c);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--white, #fff);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--color-primary, #f0473c);
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

/* ===================================
   Carousel Styles
   =================================== */
.post-carousel,
.related-posts-carousel {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease;
}

.carousel-track > * {
    flex: 0 0 25%;
    padding: 0 10px;
    box-sizing: border-box;
}

@media (max-width: 991px) {
    .carousel-track > * {
        flex: 0 0 33.333%;
    }
}

@media (max-width: 767px) {
    .carousel-track > * {
        flex: 0 0 50%;
    }
}

@media (max-width: 575px) {
    .carousel-track > * {
        flex: 0 0 100%;
    }
}

.carousel-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 5px;
}

.carousel-prev,
.carousel-next {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white, #fff);
    border: none;
    border-radius: 50%;
    color: var(--color-primary, #f0473c);
    font-size: 1rem;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-prev:hover,
.carousel-next:hover {
    background: var(--color-primary, #f0473c);
    color: var(--white, #fff);
}

/* ===================================
   Touch Feedback
   =================================== */
@media (hover: none) and (pointer: coarse) {
    .gallery-item img,
    .wp-block-image img {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .gallery-item img:active,
    .wp-block-image img:active {
        opacity: 0.8;
    }
}

/* ===================================
   Swipe Hint Animation
   =================================== */
.swipe-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white, #fff);
    border-radius: 20px;
    font-size: 0.85rem;
    animation: swipeHint 2s ease-in-out infinite;
}

@keyframes swipeHint {
    0%, 100% {
        transform: translateX(-50%);
    }
    50% {
        transform: translateX(-60%);
    }
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* ===================================
   Responsive Adjustments
   =================================== */
@media (max-width: 575px) {
    .pwa-update-content {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .lightbox-prev,
    .lightbox-next,
    .lightbox-close {
        width: 44px;
        height: 44px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}
