/* Tab container */
.book-tab-container {
  margin: 30px 0 0 0;
  font-family: inherit;
  background: transparent;
  font-size: 16px; /* Base font size for the container */
}

/* Tab navigation */
.book-tab-nav {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #d6cfb6;
  margin-bottom: -1px;
  padding-bottom: 4px;
}

/* Tab buttons */
.tab-button {
  background: #ffffff;
  border: 1px solid #dde0dc;
  padding: 10px 20px;
  margin-right: 5px;
  border-radius: 5px 5px 0 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1em; /* Increased font size for tab buttons */
  position: relative;
  top: 1px;
  transition: all 0.3s ease;
  color: #666;
}

.tab-button:hover {
  background: #f9faf9;
}

.tab-button.active {
  background: #ffffff;
  border-bottom-color: #ffffff;
  color: #222;
  font-weight: 800;
  font-size: 1.15em; /* Increased font size for active tab */
  text-shadow: 0 0 0.5px rgba(0, 0, 0, 0.1);
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
  border-top: 2px solid #c0c5bf;
}

/* Tab content */
.book-tab-content {
  border: 1px solid #dde0dc;
  border-top: none;
  padding: 20px 25px 25px; /* Increased padding */
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  font-size: 1.05em; /* Increased font size for tab content */
}

/* Tab panes */
.tab-pane {
  display: none;
  animation: fadeIn 0.5s ease;
  padding-top: 10px; /* Increased top padding */
}

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

.tab-pane.active {
  display: block;
}

/* Hide the original h5 inside tab content */
.tab-pane h5 {
  display: none;
}

/* Responsive styles for small screens */
@media (max-width: 768px) {
  .book-tab-nav {
    flex-direction: column;
    border-bottom: none;
    align-items: flex-start;
  }

  .tab-button {
    margin-right: 0;
    margin-bottom: 5px;
    border-radius: 5px;
    width: 100%;
    text-align: left;
    font-size: 1.15em; /* Increased font size for mobile tab buttons */
  }

  .tab-button.active {
    border-bottom-color: #d6cfb6;
    transform: none;
    border-left: 4px solid #c9bc8f;
    font-size: 1.2em; /* Increased font size for active tab on mobile */
  }
  .book-tab-content {
    padding: 15px; /* Adjust padding for mobile */
  }
}

/* --- WP Customer Reviews Plugin Styling (Modernized) --- */

/* General container adjustments */
.tab-pane .wpcr3_respond_1 {
  padding: 10px 0; /* Adjusted padding */
  border: none;
  box-shadow: none;
  background: transparent;
}

.tab-pane .wpcr3_div_2, /* Form container */
.tab-pane .wpcr3_reviews_holder {
  /* Reviews list container */
  /* margin-top: 20px; */
}

/* Form Styling */
.tab-pane .wpcr3_div_2 {
  /* Target the form container directly */
  margin-top: 20px;
}

.tab-pane .wpcr3_table_2 {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0; /* Remove spacing */
  display: block; /* Treat table as block for easier child manipulation */
}

.tab-pane .wpcr3_table_2 tbody,
.tab-pane .wpcr3_table_2 tr {
  display: block; /* Make rows stack */
  width: 100%;
  margin-bottom: 12px; /* Reduced space between form rows */
}

.tab-pane .wpcr3_table_2 td {
  padding: 0; /* Remove default padding */
  vertical-align: top; /* Align labels top */
  border: none; /* Remove all default borders */
  display: block; /* Make cells stack */
  width: 100%; /* Ensure cells take full width */
}

.tab-pane .wpcr3_leave_text {
  font-size: 1.4em; /* Slightly larger */
  font-weight: 700; /* Bolder */
  color: #2d3748; /* Darker color */
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e2e8f0; /* Lighter border */
}

.tab-pane label.comment-field,
.tab-pane .wpcr3_review_form_review_field_label .comment-field {
  /* Target review label specifically */
  font-weight: 600;
  color: #4a5568; /* Slightly softer color */
  font-size: 1em;
  display: block; /* Stack label above input */
  margin-bottom: 5px; /* Reduced space between label and input */
  min-width: initial; /* Remove min-width */
}

/* Remove specific td targeting as they are now display: block */
/*
.tab-pane .wpcr3_table_2 td:first-child {
}
.tab-pane .wpcr3_table_2 td:last-child {
  width: 100%;
}
*/

/* Ensure specific labels like Rating don't take unnecessary space if they were in the first td */
.tab-pane .wpcr3_review_form_rating_field td:first-child,
.tab-pane .wpcr3_review_form_text_field td:first-child {
  /* Hide the first cell in rows where label is now above input */
  /* display: none; */ /* Keep label visible for now */
}

.tab-pane input.text-input,
.tab-pane textarea.wpcr3_ftext {
  width: 100%; /* Full width */
  padding: 12px 15px; /* More padding */
  border: 1px solid #cbd5e0; /* Softer border */
  border-radius: 6px; /* Slightly more rounded */
  font-size: 1em;
  line-height: 1.5;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  background-color: #fff;
}
.tab-pane input.text-input:focus,
.tab-pane textarea.wpcr3_ftext:focus {
  border-color: #a0aec0;
  outline: none;
  box-shadow: 0 0 0 3px rgba(198, 208, 221, 0.5); /* Focus ring */
}

/* Rating Stars Styling */
.tab-pane .wpcr3_rating_stars {
  display: inline-block;
  vertical-align: middle;
  /* margin-top: 5px; */ /* Removed, handled by label margin */
  line-height: 1; /* Prevent extra space */
}
.tab-pane .wpcr3_rating_style1 {
  font-size: 20px; /* Adjust star size */
  color: #cbd5e0; /* Default star color (inactive) */
}
.tab-pane .wpcr3_rating_style1_average {
  color: #f59e0b; /* Active star color (e.g., amber/gold) */
}
/* Add hover effect if possible via JS or pure CSS if structure allows */
.tab-pane .wpcr3_rating_style1_score div:hover {
  /* Example hover - might need JS */
  /* color: #f59e0b; */
}

/* Checkbox */
.tab-pane .wpcr3_check_confirm {
  padding-top: 10px; /* Reduced space above checkbox */
}
.tab-pane .wpcr3_check_confirm label {
  font-size: 0.95em;
  color: #4a5568;
  display: flex; /* Align checkbox and text */
  align-items: center;
}
.tab-pane .wpcr3_check_confirm input[type="checkbox"] {
  margin-right: 8px;
  vertical-align: middle;
  height: 1.1em; /* Slightly larger checkbox */
  width: 1.1em;
}

/* Buttons */
.tab-pane .wpcr3_button_1 {
  display: inline-block;
  padding: 12px 24px; /* Larger padding */
  border: 1px solid transparent; /* Start with transparent border */
  border-radius: 6px;
  background-color: #edf2f7; /* Light gray background */
  color: #2d3748; /* Dark text */
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease,
    color 0.3s ease, transform 0.1s ease;
  text-align: center;
  margin-top: 10px; /* Reduced space above buttons */
  margin-right: 8px; /* Slightly reduced space between buttons */
}

.tab-pane .wpcr3_button_1:hover {
  background-color: #e2e8f0; /* Slightly darker gray on hover */
  color: #1a202c;
  transform: translateY(-1px); /* Subtle lift */
}
.tab-pane .wpcr3_button_1:active {
  transform: translateY(0px); /* Press down effect */
}

.tab-pane .wpcr3_submit_btn {
  background: #007bff; /* Blue primary color */
  color: #ffffff; /* White text */
  border-color: transparent;
  font-weight: 600; /* Keep consistent weight */
}

.tab-pane .wpcr3_submit_btn:hover {
  background: #0056b3; /* Darker blue on hover */
  color: #ffffff;
}

/* Style "Create your own review" button like primary action */
.tab-pane .wpcr3_show_btn {
  display: inline-block; /* Ensure it behaves like other buttons */
  padding: 8px 16px; /* Reduced padding */
  border-radius: 6px;
  background: #007bff; /* Blue primary color */
  color: #ffffff; /* White text */
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9em; /* Reduced font size */
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease,
    color 0.3s ease, transform 0.1s ease;
  text-align: center;
  margin-top: 0; /* Reset top margin */
  margin-left: 0; /* Reset margin */
  margin-right: 8px; /* Consistent margin */
  margin-bottom: 15px; /* Reduced space below button */
}

.tab-pane .wpcr3_show_btn:hover {
  background-color: #0056b3; /* Darker blue on hover */
  color: #ffffff;
}

.tab-pane .wpcr3_cancel_btn {
  margin-left: 0; /* Reset margin */
  background-color: #edf2f7; /* Light gray background */
  color: #4a5568; /* Slightly softer dark text */
  border-color: transparent; /* Use transparent border for consistency */
}

.tab-pane .wpcr3_cancel_btn:hover {
  background-color: #e2e8f0; /* Slightly darker gray on hover */
  color: #2d3748; /* Darker text on hover */
}

/* Displayed Reviews Styling */
.tab-pane .wpcr3_reviews_holder {
  /* margin-top: 30px; */ /* Removed */
  /* padding-top: 30px; */ /* Removed */
  /* border-top: 1px solid #e2e8f0; Lighter border */
}

.tab-pane .wpcr3_review_item {
  margin-bottom: 35px; /* Increased space between reviews */
  /* padding: 28px; Increased padding all around */
  /* border: 1px solid #e8edf2; Softer border */
  border-radius: 8px; /* Rounded corners */
  background-color: #fff; /* Ensure white background */
  /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06); Subtle shadow */
}
.tab-pane .wpcr3_review_item:last-child {
  margin-bottom: 0;
}

.tab-pane .wpcr3_aggregateRating {
  margin-bottom: 35px; /* More space below aggregate */
  padding: 0; /* Removed padding */
  background-color: transparent; /* Removed background */
  border-radius: 0; /* Removed radius */
  /* border: 1px solid #e8edf2; */ /* Removed border */
  font-size: 1em; /* Slightly larger font */
  display: flex; /* Use flex for alignment */
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping */
  border-bottom: 1px solid #eee; /* Add separator line */
  padding-bottom: 15px; /* Add space below the line */
}
.tab-pane .wpcr3_aggregateRating_overallText {
  font-weight: 600;
  color: #4a5568;
  margin-right: 8px;
  font-size: 1.05em; /* Slightly larger font size */
}
.tab-pane .wpcr3_aggregateRating_ratingValue {
  display: inline-block;
  vertical-align: middle;
  margin: 0 8px 0 0; /* Adjust margin */
}
.tab-pane .wpcr3_aggregateRating_reviewCount {
  color: #718096; /* Softer color for count */
  font-size: 0.95em;
}

.tab-pane .wpcr3_review_ratingValue {
  display: block !important; /* Ensure it takes its own line */
  margin-bottom: 8px; /* Space below stars */
}

/* Review Meta (Date/Author) Styling */
.tab-pane .wpcr3_review_meta {
  display: flex;
  align-items: center;
  margin-bottom: 15px; /* Increased space below meta */
  flex-wrap: wrap;
}

.tab-pane .wpcr3_review_datePublished,
.tab-pane .wpcr3_review_author {
  font-size: 0.92em; /* Slightly increased font size */
  color: #718096; /* Softer color */
  margin-right: 15px; /* More space between items */
}
.tab-pane .wpcr3_review_author .wpcr3_caps {
  font-weight: 600;
  text-transform: none;
  color: #4a5568; /* Slightly darker author name */
}

/* Style for the moved author name */
.tab-pane .wpcr3_review_author_name {
  display: block !important; /* Ensure it takes its own line */
  font-weight: 700; /* Make the name bold */
  color: #2d3748; /* Darker color */
  margin-bottom: 8px; /* Add space below the name */
  font-size: 1.05em; /* Slightly larger font size */
}

/* Review Content Blockquote */
.tab-pane blockquote.wpcr3_content {
  margin: 10px 0 0 0; /* Add top margin, remove others */
  padding: 0; /* Remove padding, rely on item padding */
  background-color: transparent; /* Remove background */
  border: none;
  border-radius: 0; /* Remove radius */
  font-size: 1em;
  color: #2d3748; /* Darker text */
  line-height: 1.65; /* Slightly increased line height */
  position: relative; /* For potential pseudo-elements */
}
/* Optional: Add a subtle quote indicator */
/*
.tab-pane blockquote.wpcr3_content::before {
    content: '"';
    font-size: 3em;
    color: #e2e8f0;
    position: absolute;
    left: 10px;
    top: 0px;
    line-height: 1;
}
*/
.tab-pane blockquote.wpcr3_content p:last-child {
  margin-bottom: 0;
}

/* Hide redundant elements */
.tab-pane .wpcr3_dotline {
  display: none !important; /* Completely hide the dotline */
}
.tab-pane .wpcr3_clear {
  clear: both;
  height: 0;
  line-height: 0;
  font-size: 0;
  display: none; /* Hide clear elements completely */
}

/* Responsive adjustments for review section inside tabs */
@media (max-width: 768px) {
  .tab-pane .wpcr3_table_2 tbody,
  .tab-pane .wpcr3_table_2 tr {
    margin-bottom: 10px; /* Adjust spacing for mobile */
  }
  /* .tab-pane .wpcr3_table_2 td rule already handles display:block */
  /* Remove redundant mobile specific td styling */
  /*
  .tab-pane .wpcr3_table_2 td {
    padding: 8px 0;
    border-bottom: none;
  }
  */
  /* Remove redundant mobile specific tr styling */
  /*
  .tab-pane .wpcr3_table_2 tr:not(:last-child) td {
    padding-bottom: 10px;
    margin-bottom: 0;
    border-bottom: none;
  }
  */
  .tab-pane label.comment-field {
    margin-bottom: 4px;
  }
  .tab-pane input.text-input,
  .tab-pane textarea.wpcr3_ftext {
    width: 100%;
  }
  .tab-pane .wpcr3_button_1 {
    width: 100%; /* Full width buttons on mobile */
    margin-right: 0;
    margin-bottom: 10px; /* Space below each button */
  }
  .tab-pane .wpcr3_button_1:last-of-type {
    margin-bottom: 0;
  }
  .tab-pane .wpcr3_cancel_btn,
  .tab-pane .wpcr3_show_btn {
    margin-left: 0;
  }
  .tab-pane .wpcr3_aggregateRating {
    padding: 12px 15px;
    flex-direction: column; /* Stack items vertically */
    align-items: flex-start;
  }
  .tab-pane .wpcr3_aggregateRating > span,
  .tab-pane .wpcr3_aggregateRating > div {
    margin-bottom: 5px; /* Add space between stacked items */
  }
  .tab-pane .wpcr3_aggregateRating > *:last-child {
    margin-bottom: 0;
  }

  .tab-pane blockquote.wpcr3_content {
    padding: 15px 18px;
  }
}

/* Button Container Styling (when moved below reviews) */
.tab-pane .wpcr3_respond_3 {
  text-align: right; /* Align button to the right */
  margin-top: 30px; /* Increased space ABOVE the button */
}

/* Hide redundant or unwanted elements */
.tab-pane .wpcr3_item_name {
  /* Hide "HLMRCUM E-Library" */
  display: none;
}
/* The second instance of .wpcr3_dotline rule is now redundant due to the change above */
/*
.tab-pane .wpcr3_dotline {
  border: none;
  border-top: 1px solid #e2e8f0;
}
*/

/* default “empty” message */
.no-content-msg {
  color: #666;
  font-style: italic;
  padding: 10px 0;
}
