/* Modal components */

/* Login modal - full featured with image */
.login-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}

.login-modal.show {
  display: flex;
  opacity: 1;
}

.login-modal-content {
  background: white;
  border-radius: 24px;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
  display: flex;
  overflow: visible;
  padding: 16px;
  box-sizing: border-box;
}

.login-modal.show .login-modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.login-modal-close {
  position: absolute;
  top: -16px;
  right: -16px;
  background: #1a237e;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.2s ease;
  z-index: 1001;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.login-modal-close:hover {
  background: #283593;
  transform: scale(1.1);
}

.login-modal-close svg {
  width: 20px;
  height: 20px;
}

.login-modal-left {
  flex: 1;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.login-modal-title {
  font-size: 2rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.login-modal-subtitle {
  font-size: 1rem;
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.login-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-option-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: white;
  border: 1px solid #dadce0;
  border-radius: 8px;
  color: #3c4043;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.login-option-btn:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  background: #f8f9fa;
}

.login-option-btn:active {
  transform: translateY(0);
}

.login-option-btn svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.login-modal-right {
  flex: 1;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  overflow: hidden;
  border-radius: 0 16px 16px 0;
}

.login-modal-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-modal-image-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .login-modal-content {
    flex-direction: column;
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .login-modal-left {
    padding: 2rem 1.5rem;
  }

  .login-modal-right {
    display: none;
  }

  .login-modal-close {
    top: 1rem;
    right: 1rem;
  }
}

/* Simple modal - lightweight for forms and confirmations */
.simple-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.simple-modal.show {
  display: flex;
  opacity: 1;
}

.simple-modal-content {
  background: white;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
  box-sizing: border-box;
  transform: translateY(-10px);
  transition: transform 0.15s ease;
}

.simple-modal.show .simple-modal-content {
  transform: translateY(0);
}

.simple-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.15s ease;
  padding: 0;
}

.simple-modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.simple-modal-close svg {
  width: 18px;
  height: 18px;
}

.simple-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 1rem 0;
  line-height: 1.3;
  padding-right: 2rem;
}

.simple-modal-body {
  margin-bottom: 1.5rem;
}

.simple-modal-body input {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  color: #1a1a1a;
  background: white;
  border: 1px solid #dadce0;
  border-radius: 6px;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.simple-modal-body input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.simple-modal-body textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1a1a1a;
  background: white;
  border: 1px solid #dadce0;
  border-radius: 6px;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.simple-modal-body textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.simple-modal-body textarea::placeholder {
  color: #9ca3af;
}

/* Credits info in modals */
.modal-credits-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding: 0.625rem 0.875rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.85rem;
}

.modal-credits-info .credits-count {
  color: #64748b;
}

.modal-credits-info .credits-cost {
  color: #059669;
  font-weight: 500;
}

/* Share link options */
.share-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.share-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: white;
}

.share-option:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.share-option.selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.share-option input[type="radio"] {
  margin-top: 0.125rem;
  accent-color: #2563eb;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.share-option-content {
  flex: 1;
}

.share-option-title {
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 0.25rem;
}

.share-option-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.4;
}

.simple-modal-body p {
  font-size: 0.95rem;
  color: #666;
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}

.simple-modal-warning {
  font-size: 0.875rem;
  color: #dc3545;
  margin: 0 0 0.75rem 0;
  padding: 0.625rem;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 6px;
  line-height: 1.5;
}

.simple-modal-buttons {
  display: flex;
  gap: 0.625rem;
  justify-content: flex-end;
}

.simple-modal-btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.simple-modal-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.simple-modal-cancel {
  background: white;
  color: #3c4043;
  border: 1px solid #dadce0;
}

.simple-modal-cancel:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #bdc1c6;
}

.simple-modal-confirm {
  background: #2563eb;
  color: white;
}

.simple-modal-confirm:hover:not(:disabled) {
  background: #1d4ed8;
}

.simple-modal-danger {
  background: #dc3545;
  color: white;
}

.simple-modal-danger:hover:not(:disabled) {
  background: #c82333;
}

/* Handle availability indicator */
.handle-availability {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(calc(-50% - 4px));
  display: flex;
  align-items: center;
  pointer-events: none;
}

.handle-availability.checking {
  opacity: 0.7;
}

.handle-availability.available {
  color: #4CAF50;
}

.handle-availability.taken {
  color: #d32f2f;
}

.handle-availability svg {
  width: 20px;
  height: 20px;
}

