/* 
 * TTM Reviews One Widget Styles
 */

/* Grid Layout */
.ttrv1-mode-grid .ttrv1-grid {
    display: grid;
    grid-template-columns: repeat(var(--ttrv1-cols, 3), 1fr);
    gap: 28px;
}

/* Base Card */
.ttrv1-card {
    position: relative;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}
.ttrv1-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Banner */
.ttrv1-card__banner {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.ttrv1-card__banner--empty {
    background-color: #f5f5f5;
}

/* Content Wrap */
.ttrv1-card__content-wrap {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Identity Row (Name + Avatar) */
.ttrv1-card__identity {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    position: relative;
}
.ttrv1-avatar--left .ttrv1-card__identity {
    flex-direction: row-reverse;
}

/* Avatar */
.ttrv1-avatar-wrap {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #db861e;
    margin-top: -60px; /* Pull it up over the banner */
    z-index: 2;
    flex-shrink: 0;
    background: #fff;
    overflow: hidden;
    box-sizing: border-box;
}
.ttrv1-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.ttrv1-avatar--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
    font-size: 28px;
    font-weight: 700;
    color: #555;
}

/* Text next to Avatar */
.ttrv1-identity__text {
    flex: 1;
    padding-top: 5px;
}
.ttrv1-avatar--right .ttrv1-identity__text {
    padding-right: 15px;
}
.ttrv1-avatar--left .ttrv1-identity__text {
    padding-left: 15px;
}

.ttrv1-author-name {
    margin: 0 0 5px 0;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.2;
}

/* Rating */
.ttrv1-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ttrv1-stars {
    display: inline-flex;
    color: #ffb400;
}
.ttrv1-star {
    width: 16px;
    height: 16px;
}
.ttrv1-rating-num {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

/* Trip Name */
.ttrv1-trip-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #555;
    margin-bottom: 15px;
    font-weight: 500;
}
.ttrv1-trip-icon {
    width: 18px;
    height: 18px;
    stroke: #ada185;
}

/* Divider */
.ttrv1-divider {
    height: 1px;
    background: #eaeaea;
    margin: 15px 0;
}

/* Review Text */
.ttrv1-review-body {
    margin-bottom: 25px;
    flex: 1;
}
.ttrv1-text {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}
.ttrv1-wrapper button.ttrv1-readmore {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    text-decoration: underline;
    display: inline-block;
    transition: color 0.2s;
}
.ttrv1-readmore:hover {
    color: #ada185;
}

/* Footer (Duration & Date) */
.ttrv1-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}
.ttrv1-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ttrv1-meta-icon {
    width: 18px;
    height: 18px;
    stroke: #ada185;
}
.ttrv1-meta-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Slider Controls */
.ttrv1-wrapper.swiper-container {
    padding: 20px 50px; /* space for arrows */
    margin: -20px -50px;
    position: relative;
}
.ttrv1-slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #a4864b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
    margin-top: -22px; /* Center perfectly */
}
.ttrv1-slider__arrow::after {
    display: none !important; /* Hide swiper default icons */
}
.ttrv1-slider__arrow:hover {
    background: #8b6d39;
}
.ttrv1-slider__arrow svg {
    width: 20px;
    height: 20px;
}
.ttrv1-modal-close svg {
    color:red;
}
.ttrv1-slider__prev {
    left: 0;
}
.ttrv1-slider__next {
    right: 0;
}

.ttrv1-slider__pagination {
    position: relative;
    margin-top: 30px;
    text-align: center;
}
.ttrv1-slider__pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ccc;
    opacity: 1;
    margin: 0 5px;
    transition: all 0.3s;
}
.ttrv1-slider__pagination .swiper-pagination-bullet-active {
    background: #a4864b;
    width: 20px;
    border-radius: 5px;
}

/* Modals */
.ttrv1-readmore--popup {
    text-decoration: underline;
}

/* Override Swiper overflow issue */
body .swiper-container:not(.swiper-container-initialized) > .swiper-wrapper,
body .swiper:not(.swiper-initialized) > .swiper-wrapper,
.ttrv1-wrapper.swiper-container:not(.swiper-container-initialized) > .swiper-wrapper,
.ttrv1-wrapper.swiper:not(.swiper-initialized) > .swiper-wrapper {
    overflow: visible !important;
}

/* Default Modal Fallback Styles */
.ttrv1-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.ttrv1-modal-overlay.ttrv1-modal-active {
    opacity: 1;
    visibility: visible;
}
.ttrv1-modal-box {
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 8px;
    padding: 40px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.ttrv1-modal-active .ttrv1-modal-box {
    transform: translateY(0);
}
.ttrv1-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent !important;
    border: none !important;
    font-size: 28px;
    line-height: 1;
    color: red;
    cursor: pointer;
    padding: 0;
    box-shadow: none !important;
    z-index: 10;
}
.ttrv1-modal-close svg {
    pointer-events: none;
}
.ttrv1-modal-close:hover {
    color: darkred;
}
.ttrv1-modal-author {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #1a1a1a;
}
.ttrv1-modal-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}
