/* Base Variables & Container */
:root {
    --ot-primary: #4285F4;
    --ot-star: #fbbf24;
    --ot-bg: #ffffff;
    --ot-text: #2d3748;
    --ot-text-muted: #718096;
    --ot-border: #edf2f7;
    --ot-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.ot-reviews-slider-wrapper {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--ot-text);
}

/* Themes */
.ot-theme-dark {
    --ot-bg: #1a202c;
    --ot-text: #f7fafc;
    --ot-text-muted: #a0aec0;
    --ot-border: #2d3748;
    --ot-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.ot-theme-dark .ot-review-card {
    background: #2d3748;
}

.ot-theme-glass {
    --ot-bg: rgba(255, 255, 255, 0.7);
    --ot-border: rgba(255, 255, 255, 0.3);
    --ot-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.ot-theme-glass .ot-review-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: var(--ot-bg);
}

/* Admin UI Styles */
.ot-admin-wrap {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: var(--ot-shadow);
}

.ot-admin-title {
    color: #4285F4;
    font-weight: 800;
    margin-bottom: 25px;
}

.ot-info-card {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #4285F4;
}

/* Admin Table Action Buttons */
.ot-delete-btn {
    color: #e53e3e !important;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 8px;
    border-radius: 4px;
    vertical-align: middle;
    cursor: pointer;
}

.ot-delete-btn:hover {
    color: #c53030 !important;
    background: #fff5f5;
    transform: scale(1.15);
}

.dashicons-edit {
    color: #4a5568 !important;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 8px;
    border-radius: 4px;
    vertical-align: middle;
}

.dashicons-edit:hover {
    color: #2d3748 !important;
    background: #edf2f7;
    transform: scale(1.15);
}

.wp-list-table td {
    vertical-align: middle !important;
}

.ot-shortcode-display {
    background: #edf2f7;
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1.2em;
    margin: 10px 0;
    user-select: all;
}

/* Frontend Header */
.ot-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 10px;
}

.ot-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
}

.ot-google-brand {
    font-size: 1.25em;
    font-weight: 700;
    color: #4285F4;
    line-height: 1 !important;
}

.rating-num {
    font-weight: 800;
    font-size: 1.3em;
    color: #1a202c;
    line-height: 1 !important;
}

.ot-stars-wrap {
    display: inline-flex !important;
    align-items: center !important;
    gap: 1px !important;
    line-height: 1 !important;
}

.ot-stars-wrap .star {
    font-size: 1em;
    color: #f6ad55;
    /* Warm gold */
}

.total-reviews {
    color: #718096;
    font-size: 0.9em;
    margin-left: 5px;
    line-height: 1 !important;
}

.ot-write-review {
    background: #4285F4;
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9em;
    transition: all 0.2s;
}

.ot-write-review:hover {
    background: #3367d6;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .ot-reviews-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* Swiper Styles */
.ot-reviews-swiper {
    padding: 20px 0 60px !important;
}

/* Review Card Content */
.ot-review-card {
    background: var(--ot-bg);
    border: 1px solid var(--ot-border);
    border-radius: 16px;
    padding: 25px;
    height: 320px;
    /* Fixed height for consistency */
    display: flex;
    flex-direction: column;
    box-shadow: var(--ot-shadow);
}

.ot-review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.ot-review-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    position: relative;
}

.ot-review-user img,
.ot-avatar-initial {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.ot-avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.2em;
}

.ot-user-info {
    display: flex;
    flex-direction: column;
}

.ot-user-info strong {
    font-size: 0.95em;
    display: block;
}

.ot-user-info span {
    font-size: 0.8em;
    color: var(--ot-text-muted);
}

.ot-google-icon {
    position: absolute;
    right: 0;
    top: 5px;
    color: var(--ot-primary);
    font-weight: 900;
}

.ot-review-stars {
    margin-bottom: 12px;
}

.ot-review-stars .star {
    font-size: 1em;
}

.ot-review-content {
    flex-grow: 1;
    margin-bottom: 15px;
}

.ot-review-text {
    font-size: 0.95em;
    line-height: 1.6;
    color: var(--ot-text);
    overflow: hidden;
}

.ot-review-text a {
    color: var(--ot-primary);
    text-decoration: none;
    font-weight: 600;
}


.ot-review-footer {
    border-top: 1px solid var(--ot-border);
    padding-top: 15px;
    margin-top: auto;
}

.ot-view-google {
    font-size: 0.85em;
    color: var(--ot-text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ot-view-google:hover {
    color: var(--ot-primary);
}

.ot-reviews-slider-wrapper {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    padding: 20px;
    max-width: 1300px;
    /* Increased max-width */
    margin: 0 auto;
    color: var(--ot-text);
    position: relative;
    /* Anchor for arrows */
}

/* Swiper Controls */
.ot-reviews-swiper {
    padding: 20px 0 60px !important;
    margin: 0 50px;
    /* Create gutter for arrows */
    position: static;
    /* Let buttons be absolute to wrapper */
}

.swiper-button-next {
    right: 0 !important;
}

.swiper-button-prev {
    left: 0 !important;
}

.swiper-button-next,
.swiper-button-prev {
    position: absolute !important;
    top: 55% !important;
    /* Position centered to cards */
    color: var(--ot-primary) !important;
    background: var(--ot-bg);
    width: 46px !important;
    height: 46px !important;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 20;
    margin-top: 0 !important;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px !important;
    font-weight: 800;
}

.swiper-pagination {
    bottom: 20px !important;
}

.swiper-pagination-bullet-active {
    background: var(--ot-primary) !important;
}

@media (max-width: 768px) {
    .ot-reviews-header {
        flex-direction: column;
        text-align: center;
    }

    .ot-reviews-stats {
        flex-direction: column;
    }
}