/* === WIDGETS COMPONENT CSS === */
/* Alleen laden als er widgets zijn */

/* Base widget styling */
.widget {
  background: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

.widget-title,
.widget .header {
  background: var(--primary-blue);
  color: var(--white);
  padding: 12px 15px;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.widget-content {
  padding: 15px;
}

/* Recent Posts Widget */
.widget.recent-posts ul {
  list-style: none;
  padding: 0;
  margin: 15px;
}

.widget.recent-posts ul li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 60px;
  min-height: 50px;
  overflow: hidden;
}

.widget.recent-posts ul li img {
  position: absolute;
  left: 0;
  top: 0;
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.widget.recent-posts ul li a {
  font-size: 12px;
  line-height: 17px;
  color: var(--secondary-blue);
  text-decoration: none;
  display: block;
}

.widget.recent-posts ul li a:hover {
  text-decoration: underline;
}

/* Related Posts Widget */
.widget.related-posts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget.related-posts ul li a {
  display: block;
  padding: 13px 15px;
  border-bottom: 1px solid #eee;
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  min-height: 60px;
}

.widget.related-posts ul li a:hover {
  background: var(--light-gray);
  text-decoration: none;
}

.widget.related-posts ul li a::after {
  content: '▶';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--border-gray);
  transition: var(--transition);
}

.widget.related-posts ul li a:hover::after {
  color: var(--primary-blue);
  transform: translateY(-50%) translateX(3px);
}

/* Related Posts - Discount variant */
.widget.related-posts.discount {
  border: 2px solid var(--primary-orange);
}

.widget.related-posts.discount .widget-title {
  background: var(--primary-orange);
  color: var(--text-dark);
}

.widget.related-posts.discount .posts {
  background: var(--light-gray);
  padding: 15px;
}

.widget.related-posts.discount .title {
  text-align: center;
  padding: 20px 0;
  font-size: 18px;
  font-weight: 700;
}

.widget.related-posts.discount a {
  background: var(--primary-orange);
  color: var(--text-dark);
  padding: 12px 20px;
  display: block;
  text-align: center;
  margin: 0;
  border-radius: var(--border-radius);
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.widget.related-posts.discount a:hover {
  background: var(--dark-orange);
  color: var(--white);
}

.widget.related-posts.discount a::after {
  content: ' →';
  margin-left: 10px;
  font-size: 18px;
}

/* Categories Widget */
.widget.cat ul {
  list-style: none;
  padding: 20px;
  margin: 0;
}

.widget.cat ul li {
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.widget.cat ul li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: var(--primary-blue);
  font-size: 0.8rem;
}

.widget.cat ul li a {
  color: var(--text-dark);
  font-size: 13px;
  text-decoration: none;
}

.widget.cat ul li a:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

/* Recent Comments Widget */
.widget.recent-comments ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget.recent-comments ul li {
  padding: 10px 15px 10px 40px;
  position: relative;
  border-bottom: 1px solid #eee;
  line-height: 21px;
  font-size: 12px;
}

.widget.recent-comments ul li::before {
  content: "💬";
  position: absolute;
  left: 15px;
  top: 12px;
  font-size: 14px;
}

.widget.recent-comments ul li a {
  color: var(--primary-blue);
  font-size: 12px;
  text-decoration: none;
}

.widget.recent-comments ul li a:hover {
  text-decoration: underline;
}

/* Pros and Cons Widget */
.widget.pros-and-cons {
  background: var(--light-gray);
}

.widget.pros-and-cons .pros-and-cons {
  padding: 20px;
}

.widget.pros-and-cons ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget.pros-and-cons ul li {
  padding: 5px 0 5px 25px;
  position: relative;
  margin-bottom: 8px;
}

.widget.pros-and-cons .pro::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-green);
  font-weight: bold;
  font-size: 16px;
}

.widget.pros-and-cons .con::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: #e74c3c;
  font-weight: bold;
  font-size: 16px;
}

/* Contents/Dropdown Widget */
.widget.contents .content {
  padding: 15px;
}

.widget.contents .content .label {
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

.widget.contents .content select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--primary-blue);
  border-radius: var(--border-radius);
  font-size: 14px;
}

/* List Widget (generic) */
.widget.list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget.list ul li a {
  display: flex;
  align-items: center;
  padding: 13px 15px;
  border-bottom: 1px solid #eee;
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
  gap: 10px;
}

.widget.list ul li a:hover {
  background: var(--primary-blue);
  color: var(--white);
}

.widget.list ul li a img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--border-radius);
  flex-shrink: 0;
}

.widget.list ul li a .title {
  flex: 1;
  font-weight: 700;
  font-size: 14px;
}

/* Red variant widgets */
.widget.red .widget-title,
.widget.red .header {
  background: #e74c3c;
}

.widget.red ul li::before {
  color: #e74c3c;
}

/* Box variants (same as widgets) */
.box {
  background: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

.box .header,
.box .widget-title {
  background: var(--primary-blue);
  color: var(--white);
  padding: 12px 15px;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .widget,
  .box {
    margin-bottom: 15px;
  }
  
  .widget-content {
    padding: 10px;
  }
  
  .widget.recent-posts ul {
    margin: 10px;
  }
  
  .widget.recent-posts ul li {
    padding-left: 0;
    text-align: center;
    min-height: auto;
  }
  
  .widget.recent-posts ul li img {
    position: static;
    width: 100%;
    height: auto;
    margin-bottom: 8px;
  }
}