/* ==========================================================================
   BambooCraft Blog - Right Sidebar Redesign
   ========================================================================== */

#secondary.widget-area {
  margin-bottom: 40px;
}

#secondary.widget-area .widget {
  float: none !important;
  display: block !important;
  width: 100% !important;
  margin: 0 0 24px 0 !important;
  padding: 24px !important;
  background: #ffffff;
  border: 1px solid #eaecef;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(17, 24, 39, 0.05);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  box-sizing: border-box;
}

#secondary.widget-area .widget:last-child {
  margin-bottom: 0 !important;
}

#secondary.widget-area .widget:hover {
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  border-color: #e2e5ea;
}

#secondary.widget-area .widget .widget {
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Widget Titles & Search Label */
#secondary.widget-area .widget h2.wp-block-heading,
#secondary.widget-area .widget h3.wp-block-heading,
#secondary.widget-area .widget h4.widget-title,
#secondary.widget-area .widget .wp-block-search__label {
  display: block !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  position: relative;
  margin: 0 0 18px 0 !important;
  padding: 0 0 12px 0 !important;
  border-bottom: 1px solid #eef0f4;
  font-family: "Montserrat", sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: 0.01em;
  color: #1f2937 !important;
  text-transform: none;
}

#secondary.widget-area .widget h2.wp-block-heading::after,
#secondary.widget-area .widget h3.wp-block-heading::after,
#secondary.widget-area .widget h4.widget-title::after,
#secondary.widget-area .widget .wp-block-search__label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 44px;
  height: 3px;
  background: #f6b600;
  border-radius: 999px;
}

/* Reset Lists & Block Groups inside Sidebar */
#secondary.widget-area .wp-block-group,
#secondary.widget-area .wp-block-group__inner-container {
  float: none !important;
  clear: both !important;
  width: 100%;
}

#secondary.widget-area ul,
#secondary.widget-area ol {
  float: none !important;
  clear: both !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* 1. Search Widget */
#secondary.widget-area .wp-block-search,
#secondary.widget-area form.search-form {
  margin: 0;
  max-width: 100%;
}

#secondary.widget-area .wp-block-search__inside-wrapper {
  display: flex !important;
  align-items: stretch;
  flex-wrap: nowrap;
  width: 100%;
  background: #f8f9fb;
  border: 1.5px solid #e2e6ec;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#secondary.widget-area .wp-block-search__inside-wrapper:focus-within {
  background: #ffffff;
  border-color: #f6b600;
  box-shadow: 0 0 0 3px rgba(246, 182, 0, 0.18);
}

#secondary.widget-area .wp-block-search__input,
#secondary.widget-area input.search-field {
  flex: 1 1 auto !important;
  width: 1% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: "Nunito", sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 500;
  color: #222222 !important;
  line-height: 1.4 !important;
  float: none !important;
}

#secondary.widget-area .wp-block-search__input:focus,
#secondary.widget-area input.search-field:focus {
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

#secondary.widget-area button.wp-block-search__button,
#secondary.widget-area .search-form input.search-submit {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border: none !important;
  border-radius: 0 !important;
  background: #f6b600 !important;
  color: #222222 !important;
  font-family: "Montserrat", sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#secondary.widget-area button.wp-block-search__button::before {
  content: "\f52a";
  font-family: bootstrap-icons !important;
  font-size: 13px;
  line-height: 1;
  color: #222222;
}

#secondary.widget-area button.wp-block-search__button:hover,
#secondary.widget-area .search-form input.search-submit:hover {
  background: #e0a500 !important;
  color: #111111 !important;
}

/* 2. Recent Posts (Numbered Editorial List) */
#secondary.widget-area .wp-block-latest-posts__list {
  counter-reset: bc-recent;
}

#secondary.widget-area .wp-block-latest-posts__list li {
  counter-increment: bc-recent;
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 12px 0 !important;
  border-bottom: 1px dashed #eaedf2;
}

#secondary.widget-area .wp-block-latest-posts__list li:first-child {
  padding-top: 0 !important;
}

#secondary.widget-area .wp-block-latest-posts__list li:last-child {
  padding-bottom: 0 !important;
  border-bottom: none;
}

#secondary.widget-area .wp-block-latest-posts__list li a.wp-block-latest-posts__post-title {
  display: flex !important;
  align-items: flex-start;
  gap: 11px;
  padding: 0 !important;
  font-family: "Nunito", sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  color: #26292e !important;
  text-decoration: none !important;
  transition: color 0.2s ease, transform 0.2s ease;
}

#secondary.widget-area .wp-block-latest-posts__list li a.wp-block-latest-posts__post-title::before {
  content: counter(bc-recent, decimal-leading-zero);
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 7px;
  background: #fff8eb;
  border: 1px solid rgba(246, 182, 0, 0.45);
  color: #b77e00;
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#secondary.widget-area .wp-block-latest-posts__list li a.wp-block-latest-posts__post-title:hover {
  color: #b77e00 !important;
  transform: translateX(3px);
}

#secondary.widget-area .wp-block-latest-posts__list li a.wp-block-latest-posts__post-title:hover::before {
  background: #f6b600;
  border-color: #f6b600;
  color: #222222;
}

/* 3. Recent Comments */
#secondary.widget-area .wp-block-latest-comments .no-comments,
#secondary.widget-area .no-comments.wp-block-latest-comments {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f8f9fb;
  border: 1px dashed #dce1e8;
  border-radius: 9px;
  font-family: "Nunito", sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 600;
  color: #6b7280 !important;
  margin: 0;
}

#secondary.widget-area .wp-block-latest-comments .no-comments::before,
#secondary.widget-area .no-comments.wp-block-latest-comments::before {
  content: "\f252";
  font-family: bootstrap-icons !important;
  font-size: 15px;
  color: #f6b600;
  line-height: 1;
  flex-shrink: 0;
}

#secondary.widget-area ol.wp-block-latest-comments li {
  padding: 10px 0 !important;
  border-bottom: 1px dashed #eaedf2;
  font-family: "Nunito", sans-serif !important;
  font-size: 14px !important;
  color: #4b5563 !important;
}

#secondary.widget-area ol.wp-block-latest-comments li:last-child {
  padding-bottom: 0 !important;
  border-bottom: none;
}

#secondary.widget-area ol.wp-block-latest-comments li a {
  font-weight: 700 !important;
  color: #1f2937 !important;
}

#secondary.widget-area ol.wp-block-latest-comments li a:hover {
  color: #b77e00 !important;
}

/* 4. Archives (2-Column Pill Grid) */
#secondary.widget-area .wp-block-archives-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#secondary.widget-area .wp-block-archives-list li {
  display: block !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

#secondary.widget-area .wp-block-archives-list li a {
  display: flex !important;
  align-items: center;
  gap: 7px;
  padding: 9px 11px !important;
  background: #f8f9fb;
  border: 1px solid #eaecef;
  border-radius: 8px;
  font-family: "Nunito", sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #374151 !important;
  text-decoration: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease;
}

#secondary.widget-area .wp-block-archives-list li a::before {
  content: "\f214";
  font-family: bootstrap-icons !important;
  font-size: 12px;
  color: #e0a500;
  line-height: 1;
  flex-shrink: 0;
}

#secondary.widget-area .wp-block-archives-list li a:hover {
  background: #fff8eb;
  border-color: #f6b600;
  color: #111827 !important;
  transform: translateY(-1px);
}

/* 5. Categories */
#secondary.widget-area .wp-block-categories-list {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
}

#secondary.widget-area .wp-block-categories-list li {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#secondary.widget-area .wp-block-categories-list li a {
  display: flex !important;
  align-items: center;
  gap: 9px;
  padding: 10px 13px !important;
  background: #f8f9fb;
  border: 1px solid #eaecef;
  border-radius: 8px;
  font-family: "Nunito", sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: #26292e !important;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

#secondary.widget-area .wp-block-categories-list li a::before {
  content: "\f3d9";
  font-family: bootstrap-icons !important;
  font-size: 14px;
  color: #e0a500;
  line-height: 1;
  flex-shrink: 0;
}

#secondary.widget-area .wp-block-categories-list li a::after {
  content: "\f285";
  font-family: bootstrap-icons !important;
  font-size: 12px;
  color: #9ca3af;
  line-height: 1;
  margin-left: auto;
  transition: transform 0.2s ease, color 0.2s ease;
}

#secondary.widget-area .wp-block-categories-list li a:hover {
  background: #fff8eb;
  border-color: #f6b600;
  color: #111827 !important;
}

#secondary.widget-area .wp-block-categories-list li a:hover::after {
  color: #b77e00;
  transform: translateX(3px);
}

/* Responsive Adjustments */
@media screen and (min-width: 640px) and (max-width: 1023px) {
  #secondary.widget-area .widget {
    padding: 18px !important;
  }
  #secondary.widget-area .wp-block-archives-list {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 639px) {
  #secondary.widget-area {
    margin-top: 28px;
  }
  #secondary.widget-area .widget {
    padding: 20px !important;
  }
}

@media screen and (max-width: 379px) {
  #secondary.widget-area .wp-block-archives-list {
    grid-template-columns: 1fr;
  }
}

/* Single Post Meta - Ensure Last Updated date is always visible */
.entry-meta .last-updated,
.entry-meta .last-updated .updated:not(.published) {
  display: inline !important;
}
