/* === GENERAL VARIABLES === */
:root {
      /* The star color is defined inline by the controller, with a fallback here */
      --ctrw-star-color: #fbbc04;
}

/* === CTRW FORM STYLES === */
.customer-reviews-form-container {
      padding: 0px;
      border-radius: 8px;
      margin-top: -17px;
      position: relative;
      z-index: 1;
}

/* Sort Controls */
.ctrw-sort-controls {
      margin-bottom: 15px;
      text-align: left;
}

.ctrw-sort-controls label {
      font-size: 14px;
      color: #666;
      margin-right: 6px;
}

.ctrw-sort-controls select {
      font-family: "Open Sans", Arial, Helvetica, sans-serif;
      font-size: 11pt;
      font-weight: 400;
      line-height: normal;
      padding: 5px 0px 5px 10px;
      margin: 0;
      border: 1px solid #bababa;
      border-radius: 3px;
      background: #fff;
      background-image: none;
      color: #6e6e6e;
      height: auto;
      min-height: 0;
      box-sizing: border-box;
      text-transform: none;
      letter-spacing: normal;
      box-shadow: inset .5px 1px 4px rgba(0, 0, 0, 0.11);
      -webkit-appearance: menulist;
      -moz-appearance: menulist;
      appearance: menulist;
}

#customer-reviews-form {
      padding-top: 10px;
      position: relative;
      z-index: 1;
}

#customer-reviews-form h3 {
      text-align: center;
      font-size: 18px;
      margin-bottom: 15px;
}

.ctrw-form-heading {
    font-size: 16pt;
    line-height: 1.3;
}

#customer-reviews-form .form-group {
      margin-bottom: 5px;
}

#customer-reviews-form .form-group label {
      display: block;
      margin-bottom: 1px;
      margin-top: 8px;
      font-size: 11pt;
}

/* Rating field label (span instead of label for accessibility) */
#customer-reviews-form .form-group .ctrw-field-label {
      display: inline-block;
      margin-right: 10px;
      margin-bottom: 0;
      vertical-align: middle;
      margin-top: 5px;
      font-size: 11pt;
}

/* Terms checkbox - inline layout */
#customer-reviews-form #terms-checkbox-label {
      display: flex;
      align-items: center;
      gap: 8px;
}

#customer-reviews-form #terms-checkbox-label input[type="checkbox"] {
      width: auto;
      margin: 0;
}

#customer-reviews-form #terms-checkbox-label .ctrw-tooltip {
      display: inline-flex;
      align-items: center;
      margin-left: 5px;
}

#customer-reviews-form #terms-checkbox-label .ctrw-tooltip .dashicons {
      cursor: help;
}

.customer-reviews-form-container .form-group input,
.customer-reviews-form-container .form-group textarea {
      width: 100%;
      border: 1px solid #b8b8b8;
      border-radius: 4px;
      box-shadow: inset .5px 1px 3px rgba(0, 0, 0, 0.11);
      padding: 8px 10px;
      line-height: 17pt;
      height: 35px;
      font-size: 12pt;
      color: #5f5f5f;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.customer-reviews-form-container textarea {
      min-height: 260px;
      font-size: 14px;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
      line-height: 1.6;
}

/* Error/success messages */
.customer-reviews-form-container #review-message {
      font-size: 15px;
      line-height: 1.6;
      margin-top: 10px;
}

#customer-reviews-form .rating {
      font-size: 24px;
      color: #ccc;
      direction: rtl;
      unicode-bidi: bidi-override;
      display: inline-block;
      margin-top: -5px;
      margin-bottom: -10px;
      vertical-align: middle;
}

#customer-reviews-form .rating input {
      display: none;
}

#customer-reviews-form .rating label {
      cursor: pointer;
      transition: color 0.2s;
      font-size: 32px;
      display: inline;
      margin: 0;
      padding: 0 0px;
}

#customer-reviews-form .rating input:checked ~ label,
#customer-reviews-form .rating label:hover,
#customer-reviews-form .rating label:hover ~ label {
    color: var(--ctrw-star-color);
}

#customer-reviews-form .review-author {
      font-size: 16px;
      font-weight: bold;
}

/* === CTRW REVIEWS LIST STYLES === */
#reviews-container .ctrw-review-item {
    padding: 15px 28px 10px 28px;
    margin-top: 15px;
    border: 1px solid #bababa;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 1px 3px 10px rgba(0, 0, 0, 0.08);
}

#reviews-container .review-header {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
}

#reviews-container .review-title {
    padding-left: 10px;
    padding-top: 1px;
}

#reviews-container .review-content {
    padding-top: 1%;
}

#reviews-container .review-content p {
    margin: 0px 10px 10px 0px;
}

#reviews-container .review-date {
    font-size: 14px;
    line-height: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Likes Feature */
.ctrw-review-likes {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
}

.ctrw-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.ctrw-like-btn:hover {
    background: none !important;
    background-color: transparent !important;
}

.ctrw-like-btn:focus {
    outline: none;
}

.ctrw-like-icon {
    fill: #ccc;
    transition: fill 0.2s;
}

.ctrw-review-likes.liked .ctrw-like-icon {
    fill: var(--ctrw-star-color, #fbbc04);
}

.ctrw-like-btn:hover .ctrw-like-icon {
    fill: var(--ctrw-star-color, #fbbc04);
}

.ctrw-like-count {
    font-weight: normal;
}

.ctrw-like-text {
    /* inherits color from button */
}

#reviews-container .review-actions {
    font-size: 14px;
    display: flex;
    gap: 10px;
}

#reviews-container .admin-response {
    background: #f7f7f7;
    padding: 2px 10px 0px 10px;
    border-left: 3px solid #96c1ef;
    margin-top: 12px;
    font-size: 14px;
    font-style: italic;
    line-height: 23px;
}

#reviews-container .stars {
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    line-height: 32px;
}

#reviews-container .star {
    font-size: 28px;
    transition: color 0.2s ease-in-out;
}

#reviews-container .star.filled {
    color: var(--ctrw-star-color);
}

#reviews-container .star.empty {
    color: lightgray;
}

#reviews-container .review-author {
    font-size: 16px;
    font-weight: bold;
}

#reviews-container .review-location {
    font-size: 14px;
    font-weight: normal;
}

#reviews-container .no-reviews-message {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

#reviews-container .reviews-pagination {
    text-align: center;
    padding: 10px 0;
}

#reviews-container .reviews-pagination a,
#reviews-container .reviews-pagination span {
    display: inline-block;
    padding: 5px 8px 5px 8px;
    margin: 0 2px;
    border: 1px solid #bababa;
    text-decoration: none;
    color: #8a8a8a;
    border-radius: 5px;
    box-shadow: 0 0px 4px rgba(0, 0, 0, 0.1);
    font-size: 11pt;
    font-weight: 400;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
}

#reviews-container .reviews-pagination a:hover {
    background: #f5f5f5;
}

#reviews-container span.page-numbers.current {
    border-radius: 5px;
    border: 1px solid #bababa;
    padding: 5px 8px 5px 8px;
    display: inline-block;
    margin: 0 2px;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    font-size: 11pt;
    font-weight: 600;
    color: #0052aa;
    background-image: linear-gradient(170deg,rgb(255, 255, 255) 0%, rgb(240, 245, 250) 80%, rgb(208, 225, 247) 100%);
    box-shadow: 0 0px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

/* Arrow navigation buttons */
#reviews-container .reviews-pagination a.page-nav-arrow {
    font-size: 18pt;
    font-weight: 400;
    padding: 2px 10px 1px 6px;
    line-height: 22pt;
    vertical-align: top;
    color: #0073aa;
    letter-spacing: -2px;
    border: 0px solid #bababa;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

#reviews-container .reviews-pagination a.page-nav-arrow:hover {
    color: #005177;
    background: transparent;
}

/* === CTRW FLOATING WIDGET STYLES === */

.ctrw-floating-widget {
    position: fixed;
    right: 20px;
    bottom: 0px;
    z-index: 999999;
    transform: translateZ(0);
    will-change: transform;
    isolation: isolate;
    --ctrw-primary: var(--ctrw-star-color);
    --ctrw-text: #333333;
    --ctrw-text-light: #666666;
    --ctrw-text-lighter: #999999;
    --ctrw-bg: #FFFFFF;
    --ctrw-border: #F0F0F0;
    --ctrw-card-bg: #F9F9F9;
}

.ctrw-floating-tab {
    background: var(--ctrw-primary);
    color: white;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    padding: 0;
    overflow: hidden;
    position: relative;
    z-index: 999999;
}

.ctrw-floating-tab:hover {
    filter: brightness(0.9);
}

.ctrw-tab-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
}

.ctrw-tab-icon {
    font-size: 18px;
    margin-right: 8px;
    line-height: 1;
}

.ctrw-tab-text {
    font-weight: 600;
    font-size: 15px;
}

.ctrw-tab-count {
    background: rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    margin-left: 8px;
}

.ctrw-floating-content {
    display: none;
    background: var(--ctrw-bg);
    border-radius: 0px 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    width: 380px;
    max-height: 70vh;
    overflow: hidden;
    transform-origin: bottom right;
    animation: ctrw-fadeIn 0.3s ease forwards;
    position: relative;
    z-index: 999999;
}

.ctrw-floating-widget.active .ctrw-floating-content {
    display: flex;
    flex-direction: column;
}

.ctrw-reviews-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow:auto;
}

.ctrw-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--ctrw-bg);
    border-bottom: 1px solid var(--ctrw-border);
    position: relative;
    margin-bottom: 10px;
    box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2);
}

.ctrw-reviews-title {
    margin: 0;
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0px;
    color: #25282a;
    display: flex;
    align-items: center;
}

/* Ensure card titles inherit theme font, not Oswald from h4 */
.ctrw-floating-widget .ctrw-review-card .ctrw-review-title,
.ctrw-floating-widget .ctrw-review-card h4.ctrw-review-title {
    font-family: unset !important;
}

.ctrw-title-icon {
    color: var(--ctrw-primary);
    margin-right: 8px;
    font-size: 20px;
}

.ctrw-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ctrw-text-light);
    padding: 4px;
    margin: -4px -4px -4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ctrw-close-btn:hover {
    background: rgba(0,0,0,0.05);
    color: var(--ctrw-text);
}

.ctrw-reviews-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
}

.ctrw-review-card {
    padding: 16px 0;
    border-bottom: 1px solid var(--ctrw-border);
    margin-bottom: 10px;
}

.ctrw-review-card:last-child {
    border-bottom: none;
}

.ctrw-review-card .ctrw-review-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.ctrw-review-rating {
    color: var(--ctrw-primary);
    font-size: 16px;
    letter-spacing: 1px;
}

.ctrw-review-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ctrw-review-author {
    font-size: 14px;
    color: var(--ctrw-text);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.ctrw-author-name {
    font-weight: 600;
}

.ctrw-review-location {
    color: #888;
    font-size: 13px;
    font-weight: normal;
}

.ctrw-review-date {
    font-size: 12px;
    color: #888;
}

.ctrw-review-body {
    margin-left: 0;
}

.ctrw-review-title {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: var(--ctrw-text);
    font-weight: 600;
    line-height: 1.4;
}

.ctrw-review-content {
    font-size: 14px;
    color: #404040;
    line-height: 1.5;
    margin-bottom: 0px;
    padding-bottom: 5px;
}

.ctrw-admin-reply {
    padding: 12px;
    background: #F1F1F1;
    border-radius: 6px;
    margin-top: 0px;
}

.ctrw-reply-header {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
    color: var(--ctrw-text);
}

.ctrw-reply-header svg {
    margin-right: 6px;
}

.ctrw-reply-header svg path {
    stroke: var(--ctrw-primary);
}

.ctrw-reply-content {
    font-size: 13px;
    color: var(--ctrw-text-light);
    line-height: 1.5;
}

.ctrw-reviews-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--ctrw-border);
    text-align: center;
}

.ctrw-view-all-btn {
    background: var(--ctrw-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.ctrw-view-all-btn:hover {
    filter: brightness(0.9);
    transform: translateY(-1px);
}

.ctrw-view-all-btn svg {
    margin-left: 6px;
    transition: transform 0.3s ease;
}

.ctrw-view-all-btn:hover svg {
    transform: translateY(2px);
}

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

.ctrw-reviews-list::-webkit-scrollbar {
    width: 6px;
}

.ctrw-reviews-list::-webkit-scrollbar-track {
    background: transparent;
}

.ctrw-reviews-list::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
}

.ctrw-reviews-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.2);
}

@media (max-width: 480px) {
    .ctrw-floating-widget {
        right: 10px;
        bottom: 0px;
        left: 10px;
    }
    
    .ctrw-floating-content {
        width: auto;
        max-height: 60vh;
    }
    
    .ctrw-reviews-header,
    .ctrw-reviews-list {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* === CTRW SLIDER STYLES === */
/* ==================== REVIEW SLIDER (SWIPER.JS) ==================== */

.ctrw-slider-container {
   width: 100%;
   margin: 5px auto;
   position: relative;
   box-sizing: border-box;
   overflow: hidden;
   padding-bottom: 10px;
}

.ctrw-reviews-swiper {
   padding: 10px 3px 0px 3px;
   overflow: hidden;
   position: relative;
   width: 100%;
   max-width: 100%;
   box-sizing: border-box;
   margin-bottom: 0px;
}

.ctrw-reviews-swiper .swiper-wrapper {
   align-items: stretch;
   width: 100%;
   display: flex;
   box-sizing: border-box;
}

.ctrw-reviews-swiper .swiper-slide {
   height: auto;
   display: flex;
   position: relative;
   flex-shrink: 0;
   isolation: isolate;
   z-index: 1;
   background: transparent;
}

.ctrw-reviews-swiper .swiper-slide .ctrw-review-card {
   flex: 1;
}

.ctrw-review-card {
   background: #fff;
   border-radius: 12px;
   border: 1px solid #d1d5db;
   box-shadow: 0 2px 8px rgba(0,0,0,0.05);
   padding: 24px;
   display: flex;
   flex-direction: column;
   gap: 12px;
   width: 100%;
   box-sizing: border-box;
   transition: all 0.3s ease;
   min-height: 280px;
   min-width: 0;
   cursor: pointer;
   position: relative;
}

.ctrw-review-card:hover {
   box-shadow: 0 4px 16px rgba(0,0,0,0.1);
   transform: translateY(-2px);
   border-color: #9ca3af;
}

.ctrw-review-card.expanded {
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   min-height: auto;
   height: auto;
   z-index: 1000;
   box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.ctrw-card-spacer {
   visibility: hidden;
   pointer-events: none;
}

/* Header Section */
.ctrw-review-card .ctrw-review-header {
   display: flex;
   flex-direction: column;
   gap: 10px;
   align-items: flex-start;
   margin-bottom: 0px;
}

.ctrw-review-avatar {
   flex-shrink: 0;
}

.ctrw-review-avatar img {
   border-radius: 50%;
   width: 48px;
   height: 48px;
   object-fit: cover;
}

.ctrw-review-meta {
   flex: 1;
   min-width: 0;
}

.ctrw-review-name {
   font-weight: 600;
   font-size: 16px;
   color: #111;
   margin: 0 0 2px 0;
   line-height: 1.3;
}

.ctrw-location-text {
   font-weight: normal;
   font-size: 13px;
   color: #888;
}

.ctrw-review-date {
   font-size: 13px;
   color: #888;
   margin: 0;
   line-height: 1.3;
}

.ctrw-review-location {
   font-size: 13px;
   color: #888;
   margin: 2px 0 0 0;
   line-height: 1.3;
}

/* Rating Stars */
.ctrw-review-rating {
   font-size: 25px;
   line-height: 1;
   letter-spacing: 2px;
   margin: 0;
}

.ctrw-review-rating .star {
   display: inline-block;
}

.ctrw-review-rating .star.filled {
   opacity: 1;
}

.ctrw-review-rating .star.empty {
   color: #ddd;
   opacity: 0.6;
}

/* Review Title */
.ctrw-review-title {
   font-weight: 600;
   font-size: 15px;
   color: #111;
   margin: 0;
   line-height: 1.4;
}

/* Review Content - Styles in inline stylesheet */
.ctrw-review-content {
   flex: 1;
   overflow: hidden;
   position: relative;
   z-index: 1;
   min-height: 120px;
   font-size: 15px;
   color: var(--ctrw-text-light);
   line-height: 1.6;
}

.ctrw-review-content p {
   margin: 0;
   display: -webkit-box;
   -webkit-line-clamp: 6;
   -webkit-box-orient: vertical;
   overflow: hidden;
   text-overflow: ellipsis;
}

.ctrw-review-card.expanded .ctrw-review-content p {
   display: block;
   -webkit-line-clamp: unset;
}

.ctrw-review-content::after {
   content: 'Click to read more...';
   position: absolute;
   bottom: 0;
   left: 5px;
   background: linear-gradient(to left, rgba(255,255,255,0), rgba(255, 255, 255, 0.58) 20%, #ffffffa6 40%);
   padding-right: 70px;
   padding-left: 10px;
   padding-top: 4px;
   padding-bottom: 4px;
   color: #0073aa;
   font-weight: 500;
   font-size: 13px;
   pointer-events: none;
   display: var(--hide-read-more, block);
   z-index: 2;
   border-radius: 8px;
}

/* Review Modal */
.ctrw-review-modal {
   display: none;
   position: fixed;
   z-index: 9999;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
   background-color: rgba(0,0,0,0.6);
   animation: fadeIn 0.2s ease;
}

.ctrw-review-modal.active {
   display: flex;
   align-items: center;
   justify-content: center;
}

.ctrw-review-modal-content {
   background-color: #fff;
   padding: 40px;
   border-radius: 12px;
   max-width: 600px;
   width: 90%;
   max-height: 80vh;
   overflow-y: auto;
   position: relative;
   animation: slideUp 0.3s ease;
   box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.ctrw-review-modal-close {
   position: absolute;
   top: 16px;
   right: 16px;
   font-size: 28px;
   font-weight: bold;
   color: #666;
   cursor: pointer;
   background: none;
   border: none;
   padding: 4px 8px;
   line-height: 1;
}

.ctrw-review-modal-close:hover {
   color: #000;
}

@keyframes fadeIn {
   from { opacity: 0; }
   to { opacity: 1; }
}

@keyframes slideUp {
   from { transform: translateY(50px); opacity: 0; }
   to { transform: translateY(0); opacity: 1; }
}

.ctrw-review-modal .ctrw-slider-card {
   cursor: default;
   box-shadow: none;
   border: none;
   min-height: auto;
}

.ctrw-review-modal .ctrw-slider-content::after {
   display: none;
}

.ctrw-review-modal .ctrw-slider-content p {
   -webkit-line-clamp: unset;
   display: block;
   overflow: visible;
   padding-bottom: 0;
}

.ctrw-review-content[style*="--hide-read-more"]::after {
   display: none;
}

.ctrw-review-card.expanded .ctrw-review-content::after {
   content: '';
   display: none;
}

/* Swiper Navigation Buttons */
.ctrw-slider-nav {
   display: none;
}

/* Swiper Pagination */
.ctrw-reviews-swiper .swiper-pagination {
   bottom: -30px;
   left: 50%;
   transform: translateX(-50%);
   position: absolute;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   width: auto;
}

.ctrw-reviews-swiper .swiper-pagination-bullet {
   width: 10px;
   height: 10px;
   background: #ccc;
   opacity: 1;
   transition: all 0.3s ease;
   margin: 0;
}

.ctrw-reviews-swiper .swiper-pagination-bullet-active {
   background: #0073aa;
   width: 24px;
   border-radius: 5px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
   .ctrw-review-card {
       padding: 20px;
   }
}

@media (max-width: 480px) {
   .ctrw-review-card {
       padding: 16px;
   }
   
   .ctrw-review-name {
       font-size: 15px;
   }
   
   .ctrw-review-rating {
       font-size: 18px;
   }
}


/* === CTRW SUMMARY WIDGET STYLES === */
.ctrw-summary-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.ctrw-review-widget-container {
    background-color: #ffffff;
    border: 1px solid #bababa;
    border-radius: 8px;
    box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.08);
    padding: 20px 25px 25px 25px;
    width: 550px;
    max-width: 100%;
    margin: 0px 0px 30px 0px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    box-sizing: border-box;
}

.ctrw-summary-wrapper .ctrw-review-widget-container .ctrw-review-header {
    text-align: center;
    font-size: 16pt;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding: 0;
    line-height: 1.3;
    display: block;
    flex-direction: initial;
    gap: initial;
    align-items: initial;
}

.ctrw-review-widget-container .ctrw-review-content {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.ctrw-review-widget-container .ctrw-rating-summary-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 170px;
    border: 1px solid #bababa;
    border-radius: 8px;
    padding: 10px 5px 15px 5px;
    background-color: #f6f6f6;
    box-sizing: border-box;
    margin: 0;
}

.ctrw-review-widget-container .ctrw-average-rating-score {
    font-size: 38pt;
    font-weight: bold;
    line-height: 1;
    margin: 0;
    padding: 0;
    color: #333;
}

.ctrw-review-widget-container .ctrw-average-rating-score .ctrw-max-score {
    font-size: 24pt;
    color: #9e9e9e;
    font-weight: normal;
    margin-left: 4px;
}

.ctrw-review-widget-container .ctrw-star-display {
    font-size: 1.5rem;
    margin: 2px 0 0 0;
    padding: 0;
    letter-spacing: 0px;
    line-height: 1;
}

.ctrw-review-widget-container .ctrw-star-display .ctrw-star-filled,
.ctrw-review-widget-container .ctrw-star-display .ctrw-star-half:after {
    color: var(--ctrw-star-color);
}

.ctrw-review-widget-container .ctrw-star-display .ctrw-star-half {
    position: relative;
    color: #e0e0e0;
}

.ctrw-review-widget-container .ctrw-star-display .ctrw-star-half:after {
    content: '★';
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
}

.ctrw-review-widget-container .ctrw-star-display .ctrw-star-empty {
    color: #e0e0e0;
}

.ctrw-review-widget-container .ctrw-total-reviews-text {
    font-size: 0.875rem;
    color: #757575;
    margin: 2px 0 0 0;
    padding: 0;
    line-height: 1.3;
}

.ctrw-review-widget-container .ctrw-rating-breakdown-block {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0px;
    margin: 0;
    padding: 0;
}

.ctrw-review-widget-container .ctrw-rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.ctrw-review-widget-container .ctrw-star-label {
    font-size: 1.3rem;
    flex-shrink: 0;
    letter-spacing: 0px;
    color: var(--ctrw-star-color);
    line-height: 1;
    margin: 0;
    padding: 0;
}

.ctrw-review-widget-container .ctrw-bar-background {
    flex-grow: 1;
    height: 8px;
    background-color: #f1f1f1;
    border-radius: 4px;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.ctrw-review-widget-container .ctrw-bar-foreground {
    height: 100%;
    background-color: var(--ctrw-star-color);
    border-radius: 4px;
    transition: width 0.6s ease;
    margin: 0;
    padding: 0;
}

.ctrw-review-widget-container .ctrw-review-count {
    font-size: 0.875rem;
    color: #757575;
    min-width: 20px;
    text-align: right;
    margin: 0;
    padding: 0;
    line-height: 1;
}

@media (max-width: 480px) {
    .ctrw-review-widget-container {
        padding: 16px;
        width: 100%;
    }

    .ctrw-review-widget-container .ctrw-review-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .ctrw-review-widget-container .ctrw-rating-summary-block {
        width: 100%;
        align-items: center;
    }

    .ctrw-review-widget-container .ctrw-rating-breakdown-block {
        width: 100%;
    }

    .ctrw-review-widget-container .ctrw-star-label {
        width: 70px;
    }

    .ctrw-review-widget-container .ctrw-rating-bar-row {
        gap: 8px;
    }
}

/* Tooltip Styles for Frontend Form */
.ctrw-tooltip {
    position: relative;
    display: inline-block;
}

.ctrw-tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: left;
    font-size: 13px;
    line-height: 16px;
    border-radius: 3px;
    padding: 8px 12px;
    position: absolute;
    z-index: 999;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.ctrw-tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

.ctrw-tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.ctrw-tooltip .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    cursor: help;
    color: #666;
}

.ctrw-tooltip .dashicons:hover {
    color: #000;
}

/* Independent CSS for modal card to prevent overlap with close button */
/* Independent CSS for modal card - completely separate from slider cards */
#ctrw-modal-body .ctrw-review-card {
   padding: 0px;
   min-height: auto;
   box-shadow: none;
   border: 0px;
   margin: 0;
   cursor: default;
   transition: none;
}

#ctrw-modal-body .ctrw-review-card:hover {
   transform: none;
   box-shadow: none;
   border-color: transparent;
}

#ctrw-modal-body .ctrw-review-header {
   gap: 12px;
}

#ctrw-modal-body .ctrw-review-avatar img {
   width: 50px;
   height: 50px;
}

#ctrw-modal-body .ctrw-review-name {
   font-size: 16px;
}

#ctrw-modal-body .ctrw-review-title {
   font-size: 16px;
}

#ctrw-modal-body .ctrw-review-content p {
   -webkit-line-clamp: unset;
   display: block;
   padding-bottom: 0;
}

#ctrw-modal-body .ctrw-review-content::after {
   display: none;
}

/* Badge Components - Frontend */
.ctrw-badge-stars {
    display: flex;
    gap: 2px;
}

.ctrw-badge-star {
    font-size: 18px;
    line-height: 1;
}

.ctrw-badge-star-full {
    color: #ffa500;
}

.ctrw-badge-star-half {
    color: #ffa500;
    opacity: 0.5;
}

.ctrw-badge-star-empty {
    color: #ddd;
}

/* Small Badge */
.ctrw-badge-small {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 15px 20px;
    border-radius: 8px;
    max-width: 280px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ctrw-badge-small.ctrw-badge-light {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #333;
}

.ctrw-badge-small.ctrw-badge-dark {
    background: #2d2d2d;
    border: 1px solid #444;
    color: #fff;
}

.ctrw-badge-small .ctrw-badge-icon {
    flex-shrink: 0;
    color: #ffa500;
}

.ctrw-badge-small .ctrw-badge-content {
    flex: 1;
}

.ctrw-badge-small .ctrw-badge-store-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
}

.ctrw-badge-small .ctrw-badge-rating {
    font-size: 12px;
    margin-top: 5px;
    opacity: 0.8;
}

.ctrw-badge-small .ctrw-badge-verified {
    font-size: 10px;
    margin-top: 5px;
    opacity: 0.7;
    font-weight: 600;
}

/* Wide Badge */
.ctrw-badge-wide {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 12px 0px 15px 20px;
    width: 375px;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ctrw-badge-wide.ctrw-badge-light {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #333;
}

.ctrw-badge-wide.ctrw-badge-dark {
    background: #2d2d2d;
    border: 1px solid #444;
    color: #fff;
}

.ctrw-badge-wide .ctrw-badge-icon {
    flex-shrink: 0;
    color: #ffa500;
}

.ctrw-badge-wide .ctrw-badge-content {
    flex: 1;
}

.ctrw-badge-wide .ctrw-badge-store-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 0px;
}

.ctrw-badge-wide .ctrw-badge-rating-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1px;
}

.ctrw-badge-wide .ctrw-badge-rating {
    font-size: 14px;
    font-weight: 600;
}

.ctrw-badge-wide .ctrw-badge-reviews {
    font-size: 13px;
    opacity: 0.8;
}

.ctrw-badge-wide .ctrw-badge-verified {
    font-size: 11px;
    opacity: 0.7;
    font-weight: 600;
}

/* Compact Badge */
.ctrw-badge-compact {
    display: inline-flex;
    padding: 10px 15px;
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ctrw-badge-compact.ctrw-badge-light {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #333;
}

.ctrw-badge-compact.ctrw-badge-dark {
    background: #2d2d2d;
    border: 1px solid #444;
    color: #fff;
}

.ctrw-badge-compact-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.ctrw-badge-compact .ctrw-badge-stars {
    gap: 1px;
}

.ctrw-badge-compact .ctrw-badge-star {
    font-size: 14px;
}

.ctrw-badge-compact-rating {
    font-weight: 700;
}

.ctrw-badge-compact-separator {
    opacity: 0.3;
}

.ctrw-badge-compact-reviews {
    opacity: 0.8;
}

.ctrw-badge-compact-verified {
    font-size: 11px;
    opacity: 0.7;
    font-weight: 600;
}

/* Tall Badge */
.ctrw-badge-tall {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 25px 20px;
    border-radius: 8px;
    max-width: 180px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ctrw-badge-tall.ctrw-badge-light {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #333;
}

.ctrw-badge-tall.ctrw-badge-dark {
    background: #2d2d2d;
    border: 1px solid #444;
    color: #fff;
}

.ctrw-badge-tall .ctrw-badge-icon {
    color: #ffa500;
    margin-bottom: 15px;
}

.ctrw-badge-tall .ctrw-badge-store-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
}

.ctrw-badge-tall .ctrw-badge-stars {
    margin-bottom: 10px;
}

.ctrw-badge-tall .ctrw-badge-rating-large {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.ctrw-badge-tall .ctrw-badge-rating-max {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.6;
}

.ctrw-badge-tall .ctrw-badge-reviews {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.ctrw-badge-tall .ctrw-badge-verified {
    font-size: 10px;
    opacity: 0.7;
    font-weight: 600;
}

/* Site Color Badges - Use detected theme colors */
.ctrw-badge-small.ctrw-badge-site,
.ctrw-badge-wide.ctrw-badge-site,
.ctrw-badge-compact.ctrw-badge-site,
.ctrw-badge-tall.ctrw-badge-site {
    background: var(--ctrw-site-color-dark, #1e3a5f);
    border: 1px solid var(--ctrw-site-border-dark, #2a4d7a);
    color: #fff;
}

.ctrw-badge-wide.ctrw-badge-site2 {
    background: var(--ctrw-site-color-dark-2, #2d5a3d);
    border: 1px solid var(--ctrw-site-border-dark-2, #3d6e4f);
    color: #fff;
}

/* Narrow Dark Badge */
.ctrw-badge-narrow {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    width: 650px;
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #2d2d2d;
    border: 1px solid #444;
    color: #fff;
}

.ctrw-badge-narrow .ctrw-badge-store-name {
    font-size: 15px;
    font-weight: 700;
    margin-right: auto;
}

.ctrw-badge-tagline {
    font-weight: 400;
}

.ctrw-badge-narrow .ctrw-badge-rating-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.ctrw-badge-narrow .ctrw-badge-rating-inline .ctrw-badge-stars {
    display: flex;
    gap: 2px;
}

.ctrw-badge-narrow .ctrw-badge-rating-text {
    font-weight: 600;
}

.ctrw-badge-narrow .ctrw-badge-verified {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 10px;
}

/* Floating widget visit reviews page link */
.ctrw-widget-visit-link {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #0073aa;
    text-decoration: none;
    margin-left: 12px;
}

.ctrw-widget-visit-link:hover {
    text-decoration: underline;
}

/* Prevent theme read-more interference - override pseudo-element in summary only */
.ctrw-summary-wrapper .ctrw-review-widget-container .ctrw-review-content::after {
    display: none;
    content: '';
    visibility: hidden;
}

/* Required field asterisk */
.customer-reviews-form-container span.required {
    font-size: 18px;
    line-height: 16px;
    color: #d63638;
    vertical-align: middle;
}

/* Review Source Icons */
.ctrw-review-source {
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.ctrw-source-icon {
    display: block;
    opacity: 0.85;
}

.ctrw-source-icon:hover {
    opacity: 1;
}

.ctrw-source-icon-sm {
    width: 24px;
    height: 24px;
}

.ctrw-source-icon-lg {
    width: 30px;
    height: 30px;
}

/* Ensure cards have relative positioning for source icon */
.ctrw-review-card,
.ctrw-slider-card,
.ctrw-review-item {
    position: relative;
}


/* === FRONTEND ANALYTICS PANEL === */

/* Gear button in summary widget */
.ctrw-analytics-gear {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #c0c0c0;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
    z-index: 5;
}

.ctrw-analytics-gear:hover {
    color: #666;
    background: rgba(0, 0, 0, 0.05);
}

.ctrw-analytics-gear svg {
    display: block;
}

/* Make summary container position relative for gear positioning */
.ctrw-summary-wrapper .ctrw-review-widget-container {
    position: relative;
}

/* Slide-down analytics panel - FIXED at top, slides down as drawer */
.ctrw-frontend-analytics-panel {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%) translateY(-110%);
    width: 1000px;
    max-width: calc(100vw - 40px);
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.4s ease, visibility 0.3s;
    z-index: 999999;
    box-sizing: border-box;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.ctrw-frontend-analytics-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Close button - red X box like reference */
.ctrw-frontend-analytics-panel .ctrw-analytics-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #d63638;
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    line-height: 28px;
    text-align: center;
    transition: background 0.2s;
    z-index: 10;
}

.ctrw-frontend-analytics-panel .ctrw-analytics-close:hover {
    background: #b32d2e;
}

/* ============================================
   CLONE OF ADMIN ANALYTICS CSS FOR FRONTEND
   ============================================ */

.ctrw-frontend-analytics-panel .ctrw-analytics-container {
    padding: 20px;
}

.ctrw-frontend-analytics-panel .ctrw-analytics-layout {
    display: flex;
    gap: 24px;
}

.ctrw-frontend-analytics-panel .ctrw-analytics-left {
    flex: 3;
    flex-grow: 3;
    flex-shrink: 1;
    flex-basis: 0%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.ctrw-frontend-analytics-panel .ctrw-analytics-right {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 280px;
    width: 100%;
}

.ctrw-frontend-analytics-panel .ctrw-chart-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 24px 24px 10px 24px;
    border: 1px solid #e0e0e0;
    box-sizing: border-box;
    width: 100%;
    overflow: visible;
}

.ctrw-frontend-analytics-panel .ctrw-chart-panel h3 {
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1d2327 !important;
    border: none !important;
    background: none !important;
    line-height: 1.4 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

.ctrw-frontend-analytics-panel .ctrw-line-chart-panel {
    flex: none;
}

.ctrw-frontend-analytics-panel .ctrw-analytics-attribution {
    font-size: 11px;
    color: #646970;
    text-align: center;
    padding: 8px 0 0 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ctrw-frontend-analytics-panel .ctrw-analytics-attribution a {
    color: #2271b1;
    text-decoration: none;
}

.ctrw-frontend-analytics-panel .ctrw-analytics-attribution a:hover {
    text-decoration: underline;
}

.ctrw-frontend-analytics-panel .ctrw-doughnut-chart-panel {
    flex: none;
}

.ctrw-frontend-analytics-panel .ctrw-sources-chart-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: visible;
}

.ctrw-frontend-analytics-panel .ctrw-sources-chart-panel h3 {
    flex-shrink: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

.ctrw-frontend-analytics-panel .ctrw-chart-wrapper {
    position: relative;
    height: 300px;
}

.ctrw-frontend-analytics-panel .ctrw-doughnut-wrapper {
    height: 200px;
}

.ctrw-frontend-analytics-panel .ctrw-sources-wrapper {
    height: 180px;
    width: 100%;
    flex: 1;
    box-sizing: border-box;
    overflow: visible;
}

.ctrw-frontend-analytics-panel .ctrw-sources-wrapper canvas {
    width: 100% !important;
    max-width: 100%;
}

/* Custom Doughnut Legend */
.ctrw-frontend-analytics-panel .ctrw-doughnut-legend {
    margin-top: 12px;
    text-align: center;
}

.ctrw-frontend-analytics-panel .ctrw-legend-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 6px;
}

.ctrw-frontend-analytics-panel .ctrw-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #1d2327;
}

.ctrw-frontend-analytics-panel .ctrw-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* Stats Boxes Grid - 4 columns, 2 rows */
.ctrw-frontend-analytics-panel .ctrw-analytics-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.ctrw-frontend-analytics-panel .ctrw-stat-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 16px 17px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 0;
}

.ctrw-frontend-analytics-panel .ctrw-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.ctrw-frontend-analytics-panel .ctrw-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ctrw-frontend-analytics-panel .ctrw-stat-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
    fill: currentColor;
}

.ctrw-frontend-analytics-panel .ctrw-stat-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ctrw-frontend-analytics-panel .ctrw-stat-number {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #1d2327;
}

.ctrw-frontend-analytics-panel .ctrw-stat-label {
    font-size: 10px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stat Box Colors */
.ctrw-frontend-analytics-panel .ctrw-stat-total .ctrw-stat-icon {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
}

.ctrw-frontend-analytics-panel .ctrw-stat-approved .ctrw-stat-icon {
    background: linear-gradient(135deg, #00a32a 0%, #008a20 100%);
}

.ctrw-frontend-analytics-panel .ctrw-stat-pending .ctrw-stat-icon {
    background: linear-gradient(135deg, #dba617 0%, #c59212 100%);
}

.ctrw-frontend-analytics-panel .ctrw-stat-rejected .ctrw-stat-icon {
    background: linear-gradient(135deg, #d63638 0%, #b32d2e 100%);
}

.ctrw-frontend-analytics-panel .ctrw-stat-submissions .ctrw-stat-icon {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.ctrw-frontend-analytics-panel .ctrw-stat-spam .ctrw-stat-icon {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.ctrw-frontend-analytics-panel .ctrw-stat-responded .ctrw-stat-icon {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.ctrw-frontend-analytics-panel .ctrw-stat-likes .ctrw-stat-icon {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
}

/* Chart Header with Date Range - ALL INLINE */
.ctrw-frontend-analytics-panel .ctrw-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.ctrw-frontend-analytics-panel .ctrw-chart-header h3 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1d2327 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* Date range - all inline */
.ctrw-frontend-analytics-panel .ctrw-date-range {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ctrw-frontend-analytics-panel .ctrw-date-range label {
    font-size: 13px;
    color: #646970;
    font-weight: 500;
}

.ctrw-frontend-analytics-panel .ctrw-date-range input[type="date"] {
    padding: 4px 8px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    color: #1d2327;
    width: auto;
    min-width: 130px;
    height: auto;
    line-height: 1.4;
}

.ctrw-frontend-analytics-panel .ctrw-date-range input[type="date"]:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

/* Button styles for frontend */
.ctrw-frontend-analytics-panel .button {
    display: inline-block;
    padding: 4px 12px;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    vertical-align: middle;
    height: auto;
}

.ctrw-frontend-analytics-panel .button-secondary {
    background: #f6f7f7;
    border: 1px solid #2271b1;
    color: #2271b1;
}

.ctrw-frontend-analytics-panel .button-secondary:hover {
    background: #f0f0f1;
    border-color: #135e96;
    color: #135e96;
}

/* Reset button - outlined box style */
.ctrw-frontend-analytics-panel .button-link {
    background: #f6f7f7;
    border: 1px solid #8c8f94;
    color: #2271b1;
    padding: 4px 12px;
    text-decoration: none;
    border-radius: 4px;
}

.ctrw-frontend-analytics-panel .button-link:hover {
    background: #f0f0f1;
    border-color: #646970;
    color: #135e96;
    text-decoration: none;
}

/* Responsive */
@media screen and (max-width: 1024px) {
    .ctrw-frontend-analytics-panel .ctrw-analytics-layout {
        flex-direction: column;
    }
    
    .ctrw-frontend-analytics-panel .ctrw-analytics-right {
        flex-direction: row;
        min-width: 0;
        width: 100%;
    }
    
    .ctrw-frontend-analytics-panel .ctrw-doughnut-chart-panel,
    .ctrw-frontend-analytics-panel .ctrw-sources-chart-panel {
        flex: 1;
        width: 100%;
    }
}

@media screen and (max-width: 782px) {
    .ctrw-frontend-analytics-panel .ctrw-analytics-right {
        flex-direction: column;
        min-width: 0;
    }
    
    .ctrw-frontend-analytics-panel .ctrw-sources-chart-panel {
        width: 100%;
    }
    
    .ctrw-frontend-analytics-panel .ctrw-analytics-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .ctrw-frontend-analytics-panel .ctrw-stat-box {
        padding: 12px 8px;
    }
    
    .ctrw-frontend-analytics-panel .ctrw-stat-number {
        font-size: 20px;
    }
    
    .ctrw-frontend-analytics-panel .ctrw-stat-icon {
        width: 36px;
        height: 36px;
    }
    
    .ctrw-frontend-analytics-panel .ctrw-stat-icon .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }
    
    .ctrw-frontend-analytics-panel .ctrw-chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ctrw-frontend-analytics-panel .ctrw-date-range {
        width: 100%;
    }
}

@media screen and (max-width: 500px) {
    .ctrw-frontend-analytics-panel .ctrw-analytics-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
