/**
 * Meditation Filter Component Styles
 * 
 * Uses Life By Love brand colors:
 * --main-color: #4f3421 (dark brown)
 * --main-bg-color: #6f4e37 (medium brown)
 * --main-light-color: #e9e5e2 (cream)
 */

/* Container */
.mf-container {
  font-family: inherit;
}

/* Filters Card */
.mf-filters-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 2px 12px rgba(79, 52, 33, 0.08);
}

/* Filter Groups */
.mf-filter-group {
  margin-bottom: 24px;
}

.mf-filter-group:last-child {
  margin-bottom: 0;
}

.mf-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.mf-filter-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--main-color, #4f3421);
  margin-bottom: 10px;
}

.mf-filter-header .mf-filter-label {
  margin-bottom: 0;
}

.mf-selected-count {
  font-weight: 400;
  opacity: 0.7;
}

/* Search Input */
.mf-search-wrapper {
  position: relative;
}

.mf-search-input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  font-size: 16px;
  border: 2px solid var(--main-light-color, #e9e5e2);
  border-radius: 8px;
  color: var(--main-color, #4f3421);
  background: white;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.mf-search-input:focus {
  outline: none;
  border-color: var(--main-bg-color, #6f4e37);
}

.mf-search-input.has-value {
  border-color: var(--main-bg-color, #6f4e37);
}

.mf-search-input::placeholder {
  color: var(--main-color, #4f3421);
  opacity: 0.5;
}

.mf-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px 8px;
  font-size: 14px;
  color: var(--main-bg-color, #6f4e37);
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.mf-search-clear:hover {
  background-color: var(--main-light-color, #e9e5e2);
}

/* Duration Presets */
.mf-duration-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mf-duration-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 20px;
  background: var(--main-light-color, #e9e5e2);
  color: var(--main-color, #4f3421);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mf-duration-btn:hover {
  background: #ddd8d3;
}

.mf-duration-btn.active {
  background: var(--main-bg-color, #6f4e37);
  color: var(--main-light-color, #e9e5e2);
}

/* Tags */
.mf-toggle-tags-btn {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--main-bg-color, #6f4e37);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.mf-toggle-tags-btn:hover {
  opacity: 0.8;
}

.mf-tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mf-tag-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 16px;
  background: var(--main-light-color, #e9e5e2);
  color: var(--main-color, #4f3421);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mf-tag-btn:hover {
  background: #ddd8d3;
}

.mf-tag-btn.active {
  background: var(--main-bg-color, #6f4e37);
  color: var(--main-light-color, #e9e5e2);
}

.mf-tag-count {
  font-size: 12px;
  opacity: 0.6;
}

/* Tag Categories */
.mf-categories-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mf-tag-category {
  /* Category section */
}

.mf-category-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--main-color, #4f3421);
  opacity: 0.6;
  margin: 0 0 10px 0;
}

/* Filter Status */
.mf-filter-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  margin-top: 24px;
  border-top: 1px solid var(--main-light-color, #e9e5e2);
  flex-wrap: wrap;
  gap: 12px;
}

.mf-status-text {
  font-size: 14px;
  color: var(--main-bg-color, #6f4e37);
}

.mf-clear-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: var(--main-color, #4f3421);
  color: var(--main-light-color, #e9e5e2);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.mf-clear-btn:hover {
  opacity: 0.9;
}

/* Meditation Grid */
.mf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Meditation Card */
.mf-card {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid var(--main-light-color, #e9e5e2);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.mf-card:hover {
  border-color: var(--main-bg-color, #6f4e37);
  box-shadow: 0 4px 12px rgba(111, 78, 55, 0.15);
  transform: translateY(-2px);
}

.mf-card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--main-light-color, #e9e5e2);
}

.mf-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mf-card:hover .mf-card-image img {
  transform: scale(1.05);
}

.mf-duration-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.mf-card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mf-card-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--main-color, #4f3421);
}

.mf-card-teaser {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--main-color, #4f3421);
  opacity: 0.8;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.mf-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mf-card-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--main-light-color, #e9e5e2);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--main-bg-color, #6f4e37);
  transition: all 0.2s ease;
}

.mf-card-tag.highlighted {
  background: var(--main-bg-color, #6f4e37);
  color: var(--main-light-color, #e9e5e2);
}

/* Empty State */
.mf-empty-state {
  text-align: center;
  padding: 60px 20px;
}

.mf-empty-icon {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
}

.mf-empty-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--main-color, #4f3421);
  margin: 0 0 8px;
}

.mf-empty-text {
  font-size: 16px;
  color: var(--main-color, #4f3421);
  opacity: 0.7;
  margin: 0 0 20px;
}

.mf-empty-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: var(--main-bg-color, #6f4e37);
  color: var(--main-light-color, #e9e5e2);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.mf-empty-btn:hover {
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 640px) {
  .mf-filters-card {
    padding: 20px 16px;
  }

  .mf-filter-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .mf-search-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .mf-duration-presets {
    gap: 6px;
  }

  .mf-duration-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .mf-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .mf-card-content {
    padding: 16px;
  }

  .mf-card-title {
    font-size: 16px;
  }
}
