/* Frontend styles for Drug Rating Display block */
.drd-ratings-display {
  margin: 0 auto;
  position: relative;
  padding: 0 0px;
}

.drd-post-link {
margin-bottom:0px;
}
.drd-post-link .thumb {
    margin-bottom: 20px;
}

.drd-post-link .thumb img {
    display: block;
    width: auto !important;
    max-width: 150px;
    margin: 20px auto;

}

@media(max-width:600px) {
.owl-carousel {
    
    max-width: 100%;
    width:auto;
    
}
}

.drd-latest-reviews-display {
margin-top:0 !important;
}

.drd-post-link .thumb-title {
color: #0062bd;
font-weight:600;
font-size:13px;
    text-align: center;
    display: block;
}
.drd-post-link .thumb-title  a{

}

.drd-ratings-display .drd-title {
  font-size: 1.75rem;
  color: #333;
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 600;
  margin-bottom:10px;
}
.drd-ratings-display .drd-no-ratings {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 2rem;
  background: #f5f5f5;
  border-radius: 8px;
}
.drd-ratings-display .drd-ratings-list {
  display: block;
}
.drd-ratings-display .drd-ratings-carousel {
  padding: 10px 0;
}

/* Summary section styles */
.drd-ratings-display .drd-ratings-summary {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 30px;
  border: 1px solid #e0e0e0;
  display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 30px;
}


.drd-ratings-display .drd-summary-item {
  margin-bottom: 20px;
}
.drd-ratings-display .drd-summary-item:last-child {
  margin-bottom: 0;
}
.drd-ratings-display .drd-summary-label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 14px;
}
.drd-ratings-display .drd-summary-bar {
  width: 100%;
  height: 20px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 5px;
}
.drd-ratings-display .drd-summary-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
}
.drd-ratings-display .drd-summary-fill.drd-fill-green {
  background: #4CAF50;
}
.drd-ratings-display .drd-summary-fill.drd-fill-orange {
  background: #FF9800;
}
.drd-ratings-display .drd-summary-fill.drd-fill-red {
  background: #f44336;
}
.drd-ratings-display .drd-summary-percentage {
  font-size: 13px;
  color: #666;
  display: block;
}

/* Star rating styles */
.drd-ratings-display .drd-average-rating {
  text-align: center;
  margin-bottom: 25px;
}
.drd-ratings-display .drd-average-stars {
  font-size: 24px;
  margin-bottom: 5px;
}
.drd-ratings-display .drd-average-stars .fa-star,
.drd-ratings-display .drd-average-stars .fa-star-half-alt {
  margin: 0 2px;
}
.drd-ratings-display .drd-average-stars .filled {
  color: #ffc107;
}
.drd-ratings-display .drd-average-stars .empty {
  color: #e0e0e0;
}
.drd-ratings-display .drd-average-text {
  color: #666;
  font-size: 14px;
}
.drd-ratings-display .drd-star-rating {
  margin-top: 10px;
  font-size: 14px;
}
.drd-ratings-display .drd-star-rating .fa-star {
  margin-right: 2px;
}
.drd-ratings-display .drd-star-rating .filled {
  color: #ffc107;
}
.drd-ratings-display .drd-star-rating .empty {
  color: #e0e0e0;
}
.drd-ratings-display .drd-star-text {
  margin-left: 8px;
  color: #666;
  font-size: 13px;
  float:right;
}
.drd-ratings-display .drd-rating-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;

  margin: 0 auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0px 15px 38px rgba(0, 0, 0, 0.07);
margin: 30px 0;
}
.drd-ratings-display .drd-rating-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.drd-ratings-display .drd-rating-header {
  /*display: flex;
  justify-content: space-between;
  align-items: center;*/
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  font-size:15px;
  border-bottom: 1px solid #f0f0f0;
}
@media (max-width: 600px) {
  .drd-ratings-display .drd-rating-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
.drd-ratings-display .drd-author-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #333;
  font-weight: 500;
  margin-bottom:5px;
}
.drd-ratings-display .drd-author-info i {
  font-size: 1.25rem;
  color: #666;
}
.drd-ratings-display .drd-rating-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #666;
  font-size: 10px;
}
.drd-ratings-display .drd-rating-date i {
  font-size: 10px;
  opacity:0.5;
}
.drd-ratings-display .drd-rating-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.drd-ratings-display .drd-rating-criteria {
  /*display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
  background: #f9f9f9;
  padding: 0 1rem;
  border-radius: 6px;*/
}
.drd-ratings-display .drd-criterion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}
.drd-ratings-display .drd-criterion .drd-criterion-label {
  color: #555;
  font-size: 0.95rem;
}
.drd-ratings-display .drd-criterion .drd-criterion-value {
  font-size: 1.25rem;
}
.drd-ratings-display .drd-criterion .drd-criterion-value .drd-thumb-up {
  color: #4CAF50;
}
.drd-ratings-display .drd-criterion .drd-criterion-value .drd-thumb-down {
  color: #f44336;
}
.drd-ratings-display .drd-comment-content {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 6px;
  /*border-left: 4px solid #2196F3;*/
}
.drd-ratings-display .drd-comment-content p {
  margin: 0;
  color: #333;
  line-height: 1.6;
  font-size:15px;
      word-wrap: break-word;
}

/* OwlCarousel custom styles */
.drd-ratings-display .owl-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.drd-ratings-display .owl-nav button {
  pointer-events: all;
  background: #fff !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 50% !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  position: absolute;
  top: 0;
  font-size: 18px !important;
  color: #666 !important;
  transition: all 0.3s ease;
}
.drd-ratings-display .owl-nav button:hover {
  background: #f0f0f0 !important;
  color: #333 !important;
}
.drd-ratings-display .owl-nav .owl-prev {
  left: -20px;
}
.drd-ratings-display .owl-nav .owl-next {
  right: -20px;
}
.drd-ratings-display .owl-dots {
  text-align: center;
  margin-top: 20px;
}
.drd-ratings-display .owl-dots .owl-dot {
  display: inline-block;
  margin: 0 5px;
}
.drd-ratings-display .owl-dots .owl-dot span {
  display: block;
  width: 10px;
  height: 10px;
  background: #e0e0e0;
  border-radius: 50%;
  transition: all 0.3s ease;
}
.drd-ratings-display .owl-dots .owl-dot.active span {
  background: #666;
  width: 12px;
  height: 12px;
}

/* Comment voting styles */
.drd-ratings-display .drd-comment-voting {
  display: flex;
  align-items: center;
  justify-content:center;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}
.drd-ratings-display .drd-vote-btn {
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  color: #666;
  font-size: 14px;
}
.drd-ratings-display .drd-vote-btn:hover:not(:disabled) {
  border-color: #999;
  color: #333;
}
.drd-ratings-display .drd-vote-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.drd-ratings-display .drd-vote-btn.drd-vote-up.voted {
  background: #e8f5e9;
  border-color: #4CAF50;
  color: #4CAF50;
}
.drd-ratings-display .drd-vote-btn.drd-vote-down.voted {
  background: #ffebee;
  border-color: #f44336;
  color: #f44336;
}
.drd-ratings-display .drd-vote-count {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  min-width: 20px;
  text-align: center;
}
.drd-ratings-display .drd-upvote-count {
  color: #4CAF50;
}
.drd-ratings-display .drd-downvote-count {
  color: #f44336;
}

/* Ribbon styles */
.drd-ratings-display .drd-ribbon {
  position: absolute;
  top: 20px;
  right: -30px;
  width: 120px;
  padding: 5px 0;
  text-align: center;
  transform: rotate(45deg);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  z-index: 9999999;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.drd-ratings-display .drd-ribbon span {
  color: #fff;
  letter-spacing: 0.5px;
}
.drd-ratings-display .drd-ribbon-new {
  background: #2196F3;
}
.drd-ratings-display .drd-ribbon-best {
  background: #4CAF50;
}
.drd-ratings-display .drd-ribbon-worst {
  background: #f44336;
}

/* Best comment container styling */
.drd-ratings-display .drd-rating-item:has(.drd-ribbon-best) {
  background: #4caf500a;
  border-color: #7ccb3c42;
}
.drd-ratings-display .drd-rating-item:has(.drd-ribbon-best) .drd-comment-content {
  background: #fff;
  border: 1px solid #7ccb3c42;
}

@media (max-width: 768px) {
  .drd-ratings-display .drd-ratings-summary { 
    display: block;
  }

  .drd-ratings-display {
    padding: 0 0px;
  }
  .drd-ratings-display .drd-rating-item {
    padding: 1rem;
  }
  .drd-ratings-display .drd-rating-criteria {
    grid-template-columns: 1fr;
    padding: 0.75rem;
  }
  .drd-ratings-display .drd-criterion {
    padding: 0.25rem 0;
  }
  .drd-ratings-display .drd-ratings-summary {
    padding: 20px;
  }
  .drd-ratings-display .drd-summary-item {
    margin-bottom: 15px;
  }
  .drd-ratings-display .drd-comment-voting {
    font-size: 12px;
  }
  .drd-ratings-display .drd-vote-btn {
    padding: 4px 10px;
    font-size: 12px;
  }
 /* .drd-ratings-display .owl-nav {
    display: none;
  }*/
}
/* Frontend styles for Drug Rating Comments block */
.drc-rating-block {
  max-width: 250px !important;
  margin: 2rem 0;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
 
}/*
@media(min-width:1024px) {
    .drc-rating-block {
        position: fixed;
        margin:0;
        left: -4px;
        top: 30px;
        bottom: 30px;
        overflow-y: auto;
        border: 2px solid #ffdbb4;
        margin-top: 0 !important;
    }
}*/
.drc-rating-block .drc-title {
  text-align: center;
  margin-bottom: 0.5rem;
  color: #333;
  font-size: 1.5rem;
  margin-top:0;
}
.drc-rating-block .drc-subtitle {
  text-align: center;
  margin:0;
  color: #333;
  font-size: 0.9rem;
  margin-bottom:20px;
  display:none;
}
.drc-rating-block .drc-nickname-wrapper {
  text-align: left;
  /*margin-bottom: 2rem;*/
}
.drc-rating-label>p {
margin:0;
}
.drc-rating-label .product img {

width: 100px;
    height: auto;
    vertical-align: middle;
    display: inline-block;
    margin: 0 10px;
}
.drc-rating-label i {
margin:0 3px;
}    
    
.drc-rating-block h4:nth-of-type(1) {
display:none;
}
.drc-rating-block .drc-nickname-wrapper .drc-nickname-label {
  display: inline-block;
  margin-right: 1rem;
  color: #555;
  font-weight: 500;
  font-size:16px;
}
.drc-rating-block .drc-nickname-wrapper .drc-nickname-input {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  max-width: 250px;
  text-align: center;
  color: #666;
  transition: all 0.3s ease;
  background:#fff;
}
.drc-rating-block .drc-nickname-wrapper .drc-nickname-input:focus {
  outline: none;
  border-color: #2196F3;
  color: #333;
}
.drc-rating-block .drc-nickname-wrapper .drc-nickname-input[readonly] {
  background: #f5f5f5;
  cursor: not-allowed;
}
.drc-rating-block .drc-columns {
  /*display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;*/
}
@media (max-width: 768px) {
  .drc-rating-block .drc-columns {
    grid-template-columns: 1fr;
  }
}
.drc-rating-block .drc-column h4 {
  margin-bottom: 1rem;
  color: #555;
  font-size: 1.2rem;
}
.drc-rating-block .drc-rating-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}
.drc-rating-block .drc-rating-item:nth-of-type(1) {
padding-top:0;
}


.drc-rating-block .drc-rating-item:last-child {
  border-bottom: none;
}
.drc-rating-block .drc-rating-item .drc-rating-label {
  flex: 1;
  color: #666;
  font-size: 0.95rem;
}
.drc-rating-block .drc-rating-item .drc-rating-buttons {
  display: flex;
  gap: 0.5rem;
}
.drc-rating-block .drc-thumb {
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #666;
}
.drc-rating-block .drc-thumb:hover {
  transform: scale(1.1);
}
.drc-rating-block .drc-thumb.drc-thumb-up:hover, .drc-rating-block .drc-thumb.drc-thumb-up.selected {
  background: #4CAF50;
  border-color: #4CAF50;
  color: #fff;
}
.drc-rating-block .drc-thumb.drc-thumb-down:hover, .drc-rating-block .drc-thumb.drc-thumb-down.selected {
  background: #f44336;
  border-color: #f44336;
  color: #fff;
}
.drc-rating-block .drc-thumb i {
  font-size: 1.2rem;
}
.drc-rating-block .drc-comment-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  resize: vertical;
  font-family: inherit;
  height:80px;
  box-sizing:border-box;
}
.drc-rating-block .drc-comment-textarea:focus {
  outline: none;
  border-color: #2196F3;
}
.drc-rating-block .drc-char-counter {
  text-align: right;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #999;
}
.drc-rating-block .drc-char-counter.valid {
  color: #4CAF50;
}
.drc-rating-block .drc-form-footer {
  text-align: center;
}
.drc-rating-block .drc-terms-wrapper {
  margin-bottom: 1rem;
}
.drc-rating-block .drc-terms-wrapper .drc-terms-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #666;
}
.drc-rating-block .drc-terms-wrapper .drc-terms-label input[type=checkbox] {
  width: 18px;
  height: 18px;
}
.drc-rating-block .drc-terms-wrapper .drc-terms-label a {
  color: #2196F3;
  text-decoration: none;
}
.drc-rating-block .drc-terms-wrapper .drc-terms-label a:hover {
  text-decoration: underline;
}
.drc-rating-block .drc-submit-btn {
  background: #2196F3;
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.drc-rating-block .drc-submit-btn:hover {
  background: #1976D2;
}
.drc-rating-block .drc-submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.drc-rating-block .drc-messages {
  margin: 0.5rem auto;
  padding: 0.5rem;
  border-radius: 4px;
  text-align: center;
  display: none;
    font-size:16px;
}
.drc-rating-block .drc-messages.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}
.drc-rating-block .drc-messages.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}
.drc-rating-block .drc-messages.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
  display: block;

}
.drc-rating-block .drc-messages p {
  margin: 0;
}
.drc-rating-block.drc-form-disabled .drc-thumb {
  cursor: not-allowed;
  opacity: 0.7;
}
.drc-rating-block.drc-form-disabled .drc-thumb:hover {
  transform: none;
}
.drc-rating-block.drc-form-disabled .drc-thumb.selected {
  opacity: 1;
}
.drc-rating-block.drc-form-disabled .drc-comment-textarea {
  background: #f5f5f5;
  cursor: not-allowed;
}
.drc-rating-block.drc-form-disabled .drc-comment-textarea:focus {
  border-color: #ddd;
}
.drc-rating-block.drc-form-disabled .drc-terms-checkbox {
  cursor: not-allowed;
}
.drc-rating-block.drc-form-disabled .drc-submit-btn {
  background: #999;
  cursor: not-allowed;
}
.drc-rating-block.drc-form-disabled .drc-submit-btn:hover {
  background: #999;
}
/* Block Modal - Frontend Styles */

/* Hide source container */
.block-modal-container {
    display: none !important;
}

/* Modal overlay */
.block-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99999;
}

/* Modal content */
.block-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

/* Modal header */
.block-modal-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 10px;
}

/* Close button */
.block-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.block-modal-close:hover {
    color: #333;
}

/* Modal body */
.block-modal-body {
    /* Ensure content displays properly */
}

.block-modal-body > *:first-child {
    margin-top: 0;
}

.block-modal-body > *:last-child {
    margin-bottom: 0;
}

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

@keyframes blockModalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Scrollbar styling */
.block-modal-content::-webkit-scrollbar {
    width: 8px;
}

.block-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.block-modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.block-modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive adjustments */
@media screen and (max-width: 767px) {
    .block-modal-content {
        padding: 15px;
        border-radius: 8px;
    }

    .block-modal-close {
        font-size: 22px;
    }
}

/* Body overflow when modal is open */
body.block-modal-open {
    overflow: hidden;
}

