/**
 * Digital Church Modal Component Styles
 */

/* Trigger Styles */
.dc-modal-trigger {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dc-modal-trigger--primary {
  background-color: #0F1FFF;
  color: white;
}

.dc-modal-trigger--primary:hover {
  background-color: #0A16CC;
}

.dc-modal-trigger--secondary {
  background-color: #6B7280;
  color: white;
}

.dc-modal-trigger--secondary:hover {
  background-color: #4B5563;
}

/* Modal Overlay */
.dc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dc-modal-overlay.hidden {
  display: none;
}

/* Modal Container */
.dc-modal-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  min-width: min(480px, calc(100vw - 32px));
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
}

/* Modal Sizes */
.dc-modal-container--sm { max-width: 480px; }
.dc-modal-container--md { max-width: 600px; }
.dc-modal-container--lg { max-width: 800px; }
.dc-modal-container--xl { max-width: 1200px; }
.dc-modal-container--full { 
  max-width: 95vw; 
  max-height: 95vh; 
  width: 95vw;
  height: 95vh;
}

/* Modal Header */
.dc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #E5E7EB;
}

.dc-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.dc-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6B7280;
  padding: 4px;
  line-height: 1;
}

.dc-modal-close:hover {
  color: #374151;
  background-color: var(--base-100);
}

/* Modal Body */
.dc-modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(90vh - 120px);
}

/* Drawer Styles */
.dc-modal-drawer {
  position: fixed;
  background: white;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  transition: transform 0.3s ease;
}

.dc-modal-drawer--left {
  top: 0;
  left: 0;
  height: 100%;
  transform: translateX(-100%);
}

.dc-modal-drawer--right {
  top: 0;
  right: 0;
  height: 100%;
  transform: translateX(100%);
}

.dc-modal-drawer--top {
  top: 0;
  left: 0;
  width: 100%;
  transform: translateY(-100%);
}

.dc-modal-drawer--bottom {
  bottom: 0;
  left: 0;
  width: 100%;
  transform: translateY(100%);
}

.dc-modal-drawer.open {
  transform: translate(0, 0);
}

/* Drawer Sizes */
.dc-modal-drawer--left.dc-modal-drawer--sm,
.dc-modal-drawer--right.dc-modal-drawer--sm { width: min(480px, 90vw); }
.dc-modal-drawer--left.dc-modal-drawer--md,
.dc-modal-drawer--right.dc-modal-drawer--md { width: min(600px, 90vw); }
.dc-modal-drawer--left.dc-modal-drawer--lg,
.dc-modal-drawer--right.dc-modal-drawer--lg { width: min(800px, 90vw); }
.dc-modal-drawer--left.dc-modal-drawer--xl,
.dc-modal-drawer--right.dc-modal-drawer--xl { width: min(1200px, 90vw); }

.dc-modal-drawer--top.dc-modal-drawer--sm,
.dc-modal-drawer--bottom.dc-modal-drawer--sm { height: 200px; }
.dc-modal-drawer--top.dc-modal-drawer--md,
.dc-modal-drawer--bottom.dc-modal-drawer--md { height: 350px; }
.dc-modal-drawer--top.dc-modal-drawer--lg,
.dc-modal-drawer--bottom.dc-modal-drawer--lg { height: 500px; }
.dc-modal-drawer--top.dc-modal-drawer--xl,
.dc-modal-drawer--bottom.dc-modal-drawer--xl { height: 650px; }

/* Attached Styles */
.dc-modal-attached {
  position: absolute;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  min-width: min(480px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.dc-modal-attached.open {
  opacity: 1;
  visibility: visible;
}

/* Attached Sizes */
.dc-modal-attached--sm { max-width: min(480px, calc(100vw - 32px)); }
.dc-modal-attached--md { max-width: min(600px, calc(100vw - 32px)); }
.dc-modal-attached--lg { max-width: min(800px, calc(100vw - 32px)); }
.dc-modal-attached--xl { max-width: min(1200px, calc(100vw - 32px)); }

/* Utilities */
.dc-modal-no-scroll {
  overflow: hidden;
}

/* Focus trap */
.dc-modal-focus-trap {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
