/**
 * Team Member Modal Styles
 * 
 * @package GeneratePress Child
 */

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
}

/* Modal Card */
.modal-card {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  overflow: hidden; /* Wichtig: verhindert Scrollbar außerhalb des border-radius */
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

/* Inner scroll container */
.modal-card__scroll-container {
  overflow-y: auto;
  padding: 2rem;
  flex: 1;
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #5A5A5A;
  border: none;
  font-size: 30px;
  cursor: pointer;
  color: white;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10;
  line-height: 1;
  padding: 0;
}

.modal-close:hover {
  background: #333;
  transform: rotate(90deg);
}

.modal-close:active {
  transform: rotate(90deg) scale(0.95);
}

/* Modal-specific team card styles */
.team-card__desc-wrapper--modal {
  display: block !important;
}

/* Smooth scrolling for modal content */
.modal-card__scroll-container::-webkit-scrollbar {
  width: 6px;
}

.modal-card__scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.modal-card__scroll-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.modal-card__scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-card {
    max-width: 95%;
    max-height: 95vh;
  }
  
  .modal-card__scroll-container {
    padding: 1.5rem;
  }
  
  .modal-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 36px;
    height: 36px;
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .modal-card {
    border-radius: 8px;
    width: 95%;
  }
  
  .modal-card__scroll-container {
    padding: 1rem;
  }
}

