/*
 * Modern sidebar widgets
 *
 * Keeps the legacy widget markup while aligning its presentation with the
 * editorial list cards introduced in GoodSite Pro 1.5.
 */

.sidebar {
  --goodsite-widget-accent: #ff4422;
}

.sidebar .widget {
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.055);
  color: #475467;
  margin-bottom: 18px;
  overflow: hidden;
  padding: 18px;
  position: relative;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.sidebar .widget:hover {
  border-color: color-mix(in srgb, var(--goodsite-widget-accent) 24%, #e5e9f0);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.095);
  transform: translateY(-2px);
}

.sidebar .widget .widget-title {
  align-items: center;
  border-bottom: 1px solid #edf0f4;
  color: #101828;
  display: flex;
  font-size: 16px;
  font-weight: 800;
  gap: 10px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 13px;
  padding: 0 0 12px;
  text-transform: none;
}

.sidebar .widget .widget-title::before {
  background: var(--goodsite-widget-accent);
  border-radius: 3px;
  box-shadow: 5px 5px 0 color-mix(in srgb, var(--goodsite-widget-accent) 18%, #fff);
  content: "";
  flex: 0 0 9px;
  height: 9px;
  transform: rotate(45deg);
  width: 9px;
}

.sidebar .widget p {
  color: #475467;
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 13px;
}

.sidebar .widget p:last-child {
  margin-bottom: 0;
}

.sidebar .widget ul {
  margin: 0;
  padding: 0;
}

.sidebar .widget ul .children,
.sidebar .widget ul .sub-menu {
  margin-top: 8px;
  padding-left: 14px;
}

.sidebar .widget ul .children li:first-child,
.sidebar .widget ul .sub-menu li:first-child {
  border-top: 1px solid #edf0f4;
  padding-top: 9px;
}

.sidebar .widget ul > li {
  border-bottom: 1px solid #f0f2f5;
  color: #98a2b3;
  font-size: 14px;
  line-height: 1.45;
  list-style: none;
  margin: 0;
  padding: 9px 0 9px 15px;
  position: relative;
}

.sidebar .widget ul > li:first-child {
  padding-top: 2px;
}

.sidebar .widget ul > li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sidebar .widget ul > li::before {
  background: var(--goodsite-widget-accent);
  border-radius: 50%;
  content: "";
  height: 5px;
  left: 0;
  opacity: 0.75;
  position: absolute;
  top: 17px;
  width: 5px;
}

.sidebar .widget ul > li:first-child::before {
  top: 10px;
}

.sidebar .widget ul > li a,
.sidebar .widget ul > li a:visited {
  color: #344054;
  text-decoration: none;
  text-wrap: pretty;
  transition: color 160ms ease;
}

.sidebar .widget ul > li a:hover,
.sidebar .widget ul > li a:focus-visible {
  color: var(--goodsite-widget-accent);
  text-decoration: none;
}

.sidebar .widget a:focus-visible,
.sidebar .widget input:focus-visible,
.sidebar .widget select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--goodsite-widget-accent) 42%, #fff);
  outline-offset: 2px;
}

.sidebar .widget select {
  appearance: auto;
  background: #fff;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  color: #344054;
  font-size: 14px;
  min-height: 42px;
  padding: 8px 10px;
  width: 100%;
}

.sidebar .widget_search form,
.sidebar .widget_search .search-form {
  align-items: stretch;
  display: flex;
  gap: 8px;
  margin: 0;
  width: 100%;
}

.sidebar .widget_search .search-form label {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
}

.sidebar .widget_search input[type="search"] {
  background: #f8fafc;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  color: #101828;
  flex: 1 1 auto;
  font-size: 14px;
  height: 42px;
  min-width: 0;
  padding: 0 12px;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  width: 100%;
}

.sidebar .widget_search input[type="search"]:focus {
  background: #fff;
  border-color: var(--goodsite-widget-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--goodsite-widget-accent) 12%, transparent);
}

.sidebar .widget_search input[type="submit"],
.sidebar .widget_search button[type="submit"] {
  background: var(--goodsite-widget-accent);
  border: 1px solid var(--goodsite-widget-accent);
  border-radius: 10px;
  color: #fff;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  height: 42px;
  padding: 0 13px;
  width: auto;
}

.sidebar .widget_search input[type="submit"]:hover,
.sidebar .widget_search button[type="submit"]:hover {
  background: #101828;
  border-color: #101828;
}

.sidebar .widget_tag_cloud .tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sidebar .widget_tag_cloud .tagcloud a,
.sidebar .widget_tag_cloud .tagcloud a:visited {
  background: color-mix(in srgb, var(--goodsite-widget-accent) 7%, #fff);
  border: 1px solid color-mix(in srgb, var(--goodsite-widget-accent) 19%, #e5e9f0);
  border-radius: 999px;
  color: #475467 !important;
  font-size: 11px !important;
  letter-spacing: 0.025em;
  line-height: 1;
  margin: 0;
  padding: 7px 10px;
  text-decoration: none;
  text-transform: none;
}

.sidebar .widget_tag_cloud .tagcloud a::before {
  content: none;
  display: none;
}

.sidebar .widget_tag_cloud .tagcloud a:hover,
.sidebar .widget_tag_cloud .tagcloud a:focus-visible {
  background: var(--goodsite-widget-accent);
  border-color: var(--goodsite-widget-accent);
  color: #fff !important;
}

.sidebar .widget_recent_entries .post-date {
  color: #98a2b3;
  display: block;
  font-size: 11px;
  letter-spacing: 0.02em;
  margin: 4px 0 0;
}

.sidebar .widget_posts_thumbnail ul > li {
  min-height: 68px;
  padding-left: 0;
}

.sidebar .widget_posts_thumbnail ul > li::before {
  content: none;
  display: none;
}

.sidebar .widget_posts_thumbnail .thumbnail-wrap,
.sidebar .widget_posts_thumbnail .wp-post-image,
.sidebar .widget_posts_thumbnail img {
  border-radius: 9px;
  height: 64px;
  object-fit: cover;
  width: 72px;
}

.sidebar .widget_posts_thumbnail .entry-wrap a {
  color: #344054;
  font-size: 13px;
  line-height: 1.35;
}

.sidebar .widget_posts_thumbnail .entry-meta {
  color: #98a2b3;
  font-size: 11px;
}

.sidebar .widget_calendar table,
.sidebar .wp-calendar-table {
  border-collapse: separate;
  border-spacing: 2px;
  font-size: 12px;
  text-align: center;
  width: 100%;
}

.sidebar .widget_calendar th,
.sidebar .widget_calendar td,
.sidebar .wp-calendar-table th,
.sidebar .wp-calendar-table td {
  border: 0;
  padding: 6px 3px;
}

.sidebar .widget_calendar a,
.sidebar .wp-calendar-table a {
  color: var(--goodsite-widget-accent);
  font-weight: 800;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar .widget {
    transition: none;
  }

  .sidebar .widget:hover {
    transform: none;
  }
}

@media only screen and (max-width: 479px) {
  .sidebar .widget {
    border-radius: 14px;
    padding: 16px;
  }
}

/* Footer widgets */
.site-footer .footer-columns {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: 28px;
  padding-top: 32px;
}

.site-footer .footer-columns::before,
.site-footer .footer-columns::after {
  content: none;
  display: none;
}

.site-footer .footer-columns .footer-column {
  box-sizing: border-box;
  float: none;
  margin: 0;
  min-width: 0;
  width: auto;
}

.site-footer .footer-columns .widget {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.11);
  color: rgba(255, 255, 255, 0.68);
  height: auto;
  margin: 0 0 18px;
  overflow: hidden;
  padding: 18px;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.site-footer .footer-columns .widget:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: color-mix(in srgb, var(--goodsite-widget-accent) 46%, rgba(255, 255, 255, 0.14));
  transform: translateY(-2px);
}

.site-footer .footer-columns .widget .widget-title {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  color: #fff;
  display: flex;
  font-size: 15px;
  font-weight: 800;
  gap: 9px;
  letter-spacing: 0.01em;
  line-height: 1.25;
  margin: 0 0 13px;
  padding: 0 0 12px;
  text-transform: none;
}

.site-footer .footer-columns .widget .widget-title::before {
  background: var(--goodsite-widget-accent);
  border-radius: 3px;
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--goodsite-widget-accent) 26%, transparent);
  content: "";
  flex: 0 0 8px;
  height: 8px;
  transform: rotate(45deg);
  width: 8px;
}

.site-footer .footer-columns .widget p {
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 12px;
}

.site-footer .footer-columns .widget ul {
  margin: 0;
  padding: 0;
}

.site-footer .footer-columns .widget ul > li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.085);
  color: rgba(255, 255, 255, 0.42);
  font-size: 13px;
  line-height: 1.45;
  list-style: none;
  margin: 0;
  padding: 8px 0 8px 13px;
  position: relative;
}

.site-footer .footer-columns .widget ul > li:first-child {
  padding-top: 1px;
}

.site-footer .footer-columns .widget ul > li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.site-footer .footer-columns .widget ul > li::before {
  background: var(--goodsite-widget-accent);
  border-radius: 50%;
  content: "";
  height: 4px;
  left: 0;
  opacity: 0.85;
  position: absolute;
  top: 15px;
  width: 4px;
}

.site-footer .footer-columns .widget ul > li:first-child::before {
  top: 8px;
}

.site-footer .footer-columns .widget a,
.site-footer .footer-columns .widget a:visited {
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
}

.site-footer .footer-columns .widget a:hover,
.site-footer .footer-columns .widget a:focus-visible {
  color: #fff;
  text-decoration: none;
}

.site-footer .footer-columns .widget a:focus-visible,
.site-footer .footer-columns .widget input:focus-visible,
.site-footer .footer-columns .widget select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--goodsite-widget-accent) 58%, #fff);
  outline-offset: 2px;
}

.site-footer .footer-columns .widget select,
.site-footer .footer-columns .widget input[type="search"],
.site-footer .footer-columns .widget input[type="email"],
.site-footer .footer-columns .widget input[type="text"] {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  color: #fff;
  font-size: 13px;
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
}

.site-footer .footer-columns .widget input::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.site-footer .footer-columns .widget_search form,
.site-footer .footer-columns .widget_search .search-form {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.site-footer .footer-columns .widget_search input[type="submit"],
.site-footer .footer-columns .widget_search button[type="submit"] {
  background: var(--goodsite-widget-accent);
  border: 1px solid var(--goodsite-widget-accent);
  border-radius: 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  min-height: 40px;
  padding: 0 11px;
  width: auto;
}

.site-footer .footer-columns .widget_tag_cloud .tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.site-footer .footer-columns .widget_tag_cloud .tagcloud a,
.site-footer .footer-columns .widget_tag_cloud .tagcloud a:visited {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 10px !important;
  line-height: 1;
  margin: 0;
  padding: 6px 8px;
}

.site-footer .footer-columns .widget_tag_cloud .tagcloud a::before {
  content: none;
  display: none;
}

.site-footer .footer-columns .widget_tag_cloud .tagcloud a:hover {
  background: var(--goodsite-widget-accent);
  border-color: var(--goodsite-widget-accent);
  color: #fff !important;
}

.site-footer .footer-columns .widget_posts_thumbnail ul > li {
  min-height: 58px;
  padding-left: 0;
}

.site-footer .footer-columns .widget_posts_thumbnail ul > li::before {
  content: none;
  display: none;
}

.site-footer .footer-columns .widget_posts_thumbnail .thumbnail-wrap,
.site-footer .footer-columns .widget_posts_thumbnail .wp-post-image,
.site-footer .footer-columns .widget_posts_thumbnail img {
  border-radius: 8px;
  height: 54px;
  object-fit: cover;
  width: 60px;
}

.site-footer .footer-columns .widget_posts_thumbnail .entry-wrap a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.35;
}

.site-footer .footer-columns .widget_posts_thumbnail .entry-meta,
.site-footer .footer-columns .widget_recent_entries .post-date {
  color: rgba(255, 255, 255, 0.4);
  display: block;
  font-size: 10px;
  margin-top: 3px;
}

@media only screen and (max-width: 959px) {
  .site-footer .footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media only screen and (max-width: 599px) {
  .site-footer .footer-columns {
    gap: 14px;
    grid-template-columns: minmax(0, 1fr);
    padding-left: 3%;
    padding-right: 3%;
  }
}
