/* Modal base styling - MUST use fixed positioning to viewport */
.modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0,0,0,0.5) !important;
  z-index: 99999 !important;
  animation: fadeIn 0.2s ease-in-out;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.modal.hidden {
  display: none !important;
  visibility: hidden !important;
}

.modal__content {
  background: white;
  border-radius: 8px;
  padding: 30px;
  min-width: 350px;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  animation: slideUp 0.2s ease-out;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 100000;
}

/* Share modal styling */
.share-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  animation: fadeIn 0.2s ease-in-out;
}

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

.share-modal__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 8px;
  padding: 30px;
  min-width: 400px;
  max-width: 500px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
  from {
    transform: translate(-50%, -40%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

.share-modal__title {
  margin-top: 0;
  margin-bottom: 20px;
}

.share-modal__loading {
  text-align: center;
}

.share-modal__description {
  margin-bottom: 15px;
  color: #666;
  font-size: 0.95em;
}

.share-modal__recipients {
  max-height: 300px;
  min-height: 60px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin: 15px 0;
}

.share-modal__actions {
  margin-top: 0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
  border-top: 1px solid #e0e0e0;
  padding-top: 15px;
}

.share-recipient {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-recipient:hover {
  background-color: #f5f5f5;
}

.share-recipient.selected {
  background-color: #e3f2fd;
}

.share-recipient input[type="radio"] {
  cursor: pointer;
}

.share-recipient-label {
  flex: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-recipient-name {
  font-weight: 500;
  color: #333;
}

.share-recipient-role {
  font-size: 0.85em;
  color: #999;
}

.share-modal__error {
  padding: 20px;
  text-align: center;
  color: #f00;
}

.share-modal__empty {
  padding: 20px;
  text-align: center;
  color: #999;
}
