/* OT Customer Reviews Styles */

.ot-cr-container {
    font-family: inherit;
    max-width: 1200px;
    margin: 0 auto;
}

.ot-cr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 30px;
}

.ot-cr-overall {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ot-cr-stars {
    color: #FFC107;
    font-size: 28px;
    letter-spacing: 2px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.ot-cr-count {
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ot-cr-arrow {
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.ot-cr-summary-dropdown.open .ot-cr-arrow {
    transform: rotate(180deg);
}

.ot-cr-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ot-cr-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0 16px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0 !important;
    /* Force no margin from theme */
    line-height: 1;
}

.ot-cr-btn:hover {
    background: #f8fafc;
}

.ot-cr-btn-icon {
    padding: 0 12px;
}

/* JS Masonry Layout */
.ot-cr-grid {
    position: relative;
    width: 100%;
    margin-bottom: 40px;
    min-height: 200px;
}

.ot-cr-card {
    position: absolute;
    width: calc(25% - 15px);
    margin: 0;
    background: #fff !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 8px !important;
    padding: 16px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    transition: transform 0.4s ease, opacity 0.4s ease;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .ot-cr-card {
        width: calc(33.333% - 14px);
    }
}

@media (max-width: 768px) {
    .ot-cr-card {
        width: calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .ot-cr-card {
        width: calc(50% - 8px);
        padding: 12px !important;
    }

    .ot-cr-header {
        flex-wrap: wrap;
        align-items: center;
        row-gap: 15px;
    }

    .ot-cr-actions {
        display: contents;
    }

    .ot-cr-overall {
        order: 1;
        margin-right: auto;
        display: flex;
        align-items: center;
    }

    .ot-cr-sort-dropdown-container {
        order: 2;
        display: flex;
        align-items: center;
    }

    #ot-cr-btn-write {
        order: 3;
        width: 100%;
        margin-top: 20px;
        background: #f1f5f9;
        border-color: #cbd5e1;
        color: #0f172a;
    }

    .ot-cr-stars {
        font-size: 24px;
    }

    .ot-cr-count {
        font-size: 14px;
    }

    .ot-cr-modal-content,
    .ot-cr-detail-content {
        width: calc(100% - 30px) !important;
        margin: 0 15px;
    }
}

.ot-cr-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.ot-cr-verified {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #475569;
}

.ot-cr-card-stars {
    color: #FFC107;
    font-size: 16px;
    margin-bottom: 12px;
}

.ot-cr-card-content {
    font-size: 14px;
    line-height: 1.5;
    color: #334155;
    margin-bottom: 12px;
}

.ot-cr-card-media {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ot-cr-card-media img,
.ot-cr-video-thumbnail {
    width: 100%;
    border-radius: 6px;
    object-fit: cover;
    overflow: hidden;
    position: relative;
    line-height: 0;
}

.ot-cr-video-thumbnail video {
    width: 100%;
    height: auto;
    object-fit: cover;
    pointer-events: none;
    /* Disable interaction in list */
}

.ot-cr-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    border: 2px solid #fff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}


/* Modal */
.ot-cr-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ot-cr-modal-content {
    background: #fff;
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    position: relative;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 90vh;
    overflow-y: auto;
}

.ot-cr-modal-content .ot-cr-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    z-index: 10;
}

.ot-cr-step {
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.ot-cr-step h2 {
    font-size: 24px;
    margin-bottom: 24px;
    font-weight: 600;
}

/* Step 1: Rating */
.ot-cr-rating-select {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 40px;
    color: #FFC107;
    cursor: pointer;
}

.ot-cr-rating-select span {
    transition: transform 0.2s;
}

.ot-cr-rating-select span:hover {
    transform: scale(1.1);
}

.ot-cr-rating-labels {
    display: flex;
    justify-content: center;
    gap: 120px;
    margin-top: 10px;
    font-size: 14px;
    color: #64748b;
}

/* Step 2: Upload */
.ot-cr-upload-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.ot-cr-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #000;
    color: #fff;
    padding: 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
}

.ot-cr-upload-btn:hover {
    background: #222;
}

.ot-cr-media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.ot-cr-media-preview img,
.ot-cr-media-preview video {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

/* Step 3: Content */
#ot-cr-content {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
}

/* Step 4: User info */
.ot-cr-form-group {
    margin-bottom: 16px;
}

.ot-cr-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
}

.ot-cr-consent-text {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    margin: 20px 0;
}

.ot-cr-consent-text a {
    color: #0f172a;
    text-decoration: underline;
}

/* Footer Steps */
.ot-cr-step-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
}

.ot-cr-btn-back,
.ot-cr-btn-skip,
.ot-cr-btn-next {
    background: none;
    border: none;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

.ot-cr-btn-next {
    background: #e2e8f0;
    padding: 8px 24px;
    border-radius: 4px;
    color: #94a3b8;
}

.ot-cr-btn-next.active {
    background: #000;
    color: #fff;
}

.ot-cr-dots {
    display: flex;
    gap: 6px;
}

.ot-cr-dots span {
    width: 30px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
}

.ot-cr-dots span.active {
    background: #0f172a;
}

#ot-cr-form-msg {
    margin-top: 15px;
    font-size: 14px;
}

/* Card Hover for clicking */
.ot-cr-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ot-cr-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ot-cr-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.ot-cr-verified {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #1e293b;
    font-weight: 500;
}

/* Dropdowns */
.ot-cr-summary-dropdown,
.ot-cr-sort-dropdown-container {
    position: relative;
    cursor: pointer;
}

.ot-cr-summary-popup,
.ot-cr-sort-popup {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 16px;
    z-index: 100;
    min-width: 250px;
    margin-top: 10px;
}

.ot-cr-summary-dropdown .ot-cr-summary-popup {
    left: 0;
    right: auto;
}

/* Rating Summary Popup */
.ot-cr-summary-avg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}

.ot-cr-summary-avg-star {
    color: #FFC107;
}

.ot-cr-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.ot-cr-bar-stars {
    color: #FFC107;
    width: 60px;
    text-align: right;
}

.ot-cr-bar-track {
    flex-grow: 1;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.ot-cr-bar-fill {
    height: 100%;
    background: #64748b;
    border-radius: 4px;
}

.ot-cr-bar-count {
    width: 30px;
    color: #64748b;
}

/* Sort Popup */
.ot-cr-sort-header {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 16px;
}

.ot-cr-sort-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ot-cr-sort-list li {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 14px;
}

.ot-cr-sort-list li:hover {
    background: #f8fafc;
}

/* Detail Modal Split View */
.ot-cr-detail-content {
    background: #fff;
    width: 100%;
    max-width: 900px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 90vh;
    display: flex;
    overflow: hidden;
}

.ot-cr-detail-split {
    display: flex;
    width: 100%;
    height: 600px;
    /* Fixed height or max height */
}

.ot-cr-detail-left {
    flex: 1.5;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ot-cr-detail-left img,
.ot-cr-detail-left video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ot-cr-detail-right {
    flex: 1;
    padding: 40px 30px;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .ot-cr-detail-split {
        flex-direction: column;
        height: auto;
        max-height: 90vh;
    }

    .ot-cr-detail-left {
        flex: none;
        height: 300px;
    }

    .ot-cr-detail-right {
        flex: none;
    }
}

/* Detail Modal Additions */
.ot-cr-detail-topbar {
    display: none;
}

.ot-cr-detail-content.no-media {
    max-width: 480px;
    flex-direction: column;
}

.ot-cr-detail-content.no-media .ot-cr-detail-topbar {
    display: block;
    height: 56px;
    border-bottom: 1px solid #e2e8f0;
    width: 100%;
}

.ot-cr-detail-content.no-media .ot-cr-detail-split {
    height: auto;
}

.ot-cr-detail-content.no-media .ot-cr-detail-right {
    padding: 30px;
}

.ot-cr-close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: background 0.2s, color 0.2s;
    padding: 0 !important;
    box-sizing: border-box !important;
    line-height: 0 !important;
}

.ot-cr-close:hover {
    background: rgba(0, 0, 0, 0.6);
}

.ot-cr-detail-content.no-media .ot-cr-close {
    top: 12px;
    left: 16px;
    background: #f1f5f9;
    color: #0f172a;
}

.ot-cr-detail-content.no-media .ot-cr-close:hover {
    background: #e2e8f0;
}

/* Load More Pagination */
.ot-cr-load-more-container {
    text-align: center;
    margin-top: 40px;
    width: 100%;
    clear: both;
}

#ot-cr-load-more {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

#ot-cr-load-more:hover {
    border-color: #cbd5e1;
    color: #1e293b;
    background: #f8fafc;
}

.ot-cr-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ot-cr-detail-header strong {
    font-size: 18px;
}

.ot-cr-detail-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.ot-cr-info-icon {
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
}

.ot-cr-info-popup {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    width: 320px;
    z-index: 100;
    margin-top: 10px;
    font-size: 14px;
    color: #1e293b;
    line-height: 1.5;
}

.ot-cr-info-popup p {
    margin: 0 0 16px 0;
}

.ot-cr-info-popup p:last-child {
    margin: 0;
}

.ot-cr-learn-more {
    color: #0f172a;
    text-decoration: underline;
    font-weight: 500;
}

/* Star Filter */
.ot-cr-filter-star {
    cursor: pointer;
    transition: background 0.2s;
    padding: 4px;
    border-radius: 4px;
}

.ot-cr-filter-star:hover {
    background: #f8fafc;
}

.ot-cr-filter-star.active-filter {
    background: #f1f5f9;
    font-weight: 600;
}

/* Scroll Highlight Effect */
.ot-cr-sentence {
    display: inline;
}

.ot-cr-target {
    background-image: linear-gradient(120deg, #fff2d3 0%, #fff2d3 100%);
    background-repeat: no-repeat;
    background-size: 0% 100%;
    background-position: 0 100%;
    transition: background-size 1.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.ot-cr-target.highlight-active {
    background-size: 100% 100%;
}