/**
 * @file
 * Styles for Know Your Minister.
 */

.know-your-ministers-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (min-width: 640px) {
  .know-your-ministers-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 768px) {
  .know-your-ministers-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

.know-your-minister-card {
  transition: all 0.3s ease;
}

.know-your-minister-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.know-your-minister-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: rgba(15, 23, 42, 0.35);
  animation: fadeIn 0.3s ease;
}

.know-your-minister-modal.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.know-your-minister-modal-content {
  width: min(92vw, 900px);
  max-height: 88vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
  animation: slideUp 0.3s ease;
}

.know-your-minister-modal-close {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.know-your-minister-modal-close:hover {
  background: #f8fafc;
}

[data-minister-photo] {
  min-height: 12rem;
  display: block;
  background-color: #f3f4f6;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.line-clamp-2 {
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.aspect-square {
  aspect-ratio: 1;
}

/* Panel content animation */
.panel-content-animate {
  animation: panelSlideIn 0.4s ease-out;
}

@keyframes panelSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Individual panel elements animation */
[data-mp-details] {
  animation: detailsFadeIn 0.5s ease-out 0.1s both;
}

@keyframes detailsFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
