/**
 * Filtered Artifacts Grid Widget Styles
 */

.ppa-filtered-grid-wrapper {
  width: 100%;
}

/* Filters Wrapper */
.ppa-filters-wrapper {
  margin-bottom: 30px;
}

/* Inline Filters (Desktop) */
.ppa-filters-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.ppa-filter-item {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 200px;
}

.ppa-filter-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
}

.ppa-filter-select {
  width: 100%;
  padding: 12px 40px 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
}

.ppa-filter-select:focus {
  outline: none;
  border-color: #6c63ff;
}

/* Mobile Filter Toggle */
.ppa-filter-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background-color: #6c63ff;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.ppa-filter-toggle:hover {
  background-color: #5a52d5;
}

.ppa-filter-toggle .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

/* Off-Canvas Filters (Mobile) */
.ppa-filters-offcanvas {
  position: fixed;
  top: 0;
  left: -100%;
  width: 300px;
  height: 100vh;
  background-color: #fff;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  transition: left 0.3s ease;
  overflow-y: auto;
}

.ppa-filters-offcanvas.active {
  left: 0;
}

.ppa-filters-offcanvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.ppa-filters-offcanvas-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.ppa-filters-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
}

.ppa-filters-close .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: #333;
}

.ppa-filters-offcanvas-body {
  padding: 20px;
}

.ppa-filters-offcanvas-body .ppa-filter-item {
  width: 100%;
  margin-bottom: 15px;
}

.ppa-filters-offcanvas-body .ppa-filter-select {
  width: 100%;
}

/* Overlay */
.ppa-filters-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ppa-filters-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Artifacts Grid */
.ppa-artifacts-grid {
  display: grid;
  width: 100%;
}

.ppa-artifact-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ppa-artifact-card:hover {
  transform: translateY(-5px);
}

.ppa-artifact-thumbnail {
  margin-bottom: 15px;
  overflow: hidden;
  border-radius: 4px;
}

.ppa-artifact-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.ppa-artifact-card:hover .ppa-artifact-thumbnail img {
  transform: scale(1.05);
}

.ppa-artifact-title {
  margin: 0 0 10px 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.ppa-artifact-title a {
  text-decoration: none;
  transition: color 0.3s ease;
}

.ppa-artifact-excerpt {
  margin: 0;
  line-height: 1.6;
}

.ppa-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  font-size: 16px;
  color: #666;
}

/* Responsive - Desktop Only */
@media (min-width: 768px) {
  .ppa-mobile-only {
    display: none !important;
  }
}

/* Responsive - Mobile */
@media (max-width: 767px) {
  .ppa-desktop-only {
    display: none !important;
  }

  .ppa-filter-toggle {
    display: inline-flex;
    width: 100%;
    justify-content: center;
  }

  .ppa-filters-inline {
    flex-direction: column;
  }

  .ppa-filter-item {
    width: 100%;
    min-width: auto;
  }

  .ppa-filter-select {
    width: 100%;
    min-width: auto;
  }
}

/* Loading State */
.ppa-artifacts-grid.loading {
  opacity: 0.5;
  pointer-events: none;
}
