/* Custom DaisyUI Theme Overrides - Beautiful Design */

/* Custom theme variables to match original beautiful design */
:root {
  /* Background colors - matching original gray-50/gray-100 */
  --b1: 249 250 251; /* base-100 - white cards */
  --b2: 243 244 246; /* base-200 - light gray background */
  --b3: 229 231 235; /* base-300 - dividers/borders */

  /* Content colors - matching original text colors */
  --bc: 17 24 39; /* base-content - dark text (gray-900) */
  --nc: 107 114 128; /* neutral-content - secondary text (gray-500) */

  /* Primary colors - keeping the indigo theme */
  --p: 99 102 241; /* primary - indigo-600 */
  --pc: 255 255 255; /* primary-content - white text on primary */

  /* Form field defaults */
  --input-border: 0 0 0; /* default border is black */

  /* Enhanced border radius for modern look */
  --rounded-box: 1rem; /* 16px - matching original rounded-2xl */
  --rounded-btn: 0.75rem; /* 12px - matching original rounded-xl */
  --rounded-badge: 9999px;

  /* Custom shadows - matching original shadow-sm */
  --shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Custom focus ring color — follow DaisyUI primary */
  --input-focus-ring: 2px solid rgb(var(--p) / 0.2);
  --input-focus-ring-offset: 2px solid #ffffff;
}

/* Custom DaisyUI Component Overrides */

/* Beautiful card styling - matching original rounded-2xl shadow-sm */
.card {
  border-radius: 1rem; /* rounded-2xl */
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); /* shadow-sm */
  border: 1px solid rgb(229 231 235); /* border-gray-200 */
}

.card.shadow-xl {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Beautiful button styling - matching original design */
.btn {
  border-radius: 0.75rem; /* rounded-xl */
  font-weight: 500; /* font-medium */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  color: white !important;
  border: none !important;
  border-radius: 0.75rem !important; /* rounded-xl */
  padding: 0.5rem 1rem !important; /* px-4 py-2 */
  font-weight: 500 !important; /* font-medium */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-primary:hover {
  color: white !important;
}

.btn-outline {
  border: 1px solid rgb(209 213 219); /* border-gray-300 */
  background-color: white;
}

/* Beautiful input and textarea styling */
.input, .textarea {
  border-radius: 0.75rem; /* rounded-xl */
  padding: 0.75rem 1rem; /* px-4 py-3 */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgb(var(--input-border));
}


.input:focus, .textarea:focus {
  outline: none;
  /* Use theme primary color for focus visuals */
  box-shadow: 0 0 0 2px rgb(var(--p) / 0.2), 0 0 0 4px rgb(var(--p) / 0.1);
  border-color: rgb(var(--p));
}


/* Beautiful label styling */
.label-text {
  font-weight: 500; /* font-medium */
}

/* Apple Pay-style Upload Animation */
.upload-container {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-container.uploading {
  transform: scale(0.98);
}

.upload-container.success {
  transform: scale(1.02);
}

/* Progress Ring Animation */
.progress-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 20; /* ensure it overlays upload content */
  pointer-events: none; /* don't block interactions */
}

.progress-ring.visible {
  opacity: 1;
}

.progress-ring__circle {
  stroke: #e5e7eb;
  stroke-width: 4;
  fill: transparent;
  r: 36;
  cx: 40;
  cy: 40;
}

.progress-ring__progress {
  /* Follow theme primary */
  stroke: rgb(var(--p));
  stroke-width: 4;
  stroke-linecap: round;
  fill: transparent;
  r: 36;
  cx: 40;
  cy: 40;
  stroke-dasharray: 226.19;
  stroke-dashoffset: 226.19;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-ring.visible .progress-ring__progress {
  stroke-dashoffset: 0;
}

/* Success Checkmark Animation */
.success-checkmark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 30; /* above progress ring */
  pointer-events: none;
}

.success-checkmark.visible {
  opacity: 1;
  animation: checkmark-bounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-checkmark__circle {
  stroke: #10b981;
  stroke-width: 4;
  fill: transparent;
  r: 36;
  cx: 40;
  cy: 40;
  stroke-dasharray: 226.19;
  stroke-dashoffset: 226.19;
  animation: circle-fill 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.success-checkmark__check {
  stroke: #10b981;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: check-draw 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

@keyframes circle-fill {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes check-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes checkmark-bounce {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Upload Zone States */
.upload-zone {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-zone.dragging {
  transform: scale(1.02);
  border-color: rgb(var(--p));
}

.upload-zone.uploading {
  pointer-events: none;
}

.upload-zone.uploading .upload-content {
  opacity: 0.3;
}

.upload-zone.success {
  border-color: #10b981;
}

.upload-zone.success .upload-content {
  opacity: 0.3;
}

/* Pulse animation for upload state */
.upload-pulse {
  animation: upload-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes upload-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* File preview animation */
.file-preview {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-preview.visible {
  opacity: 1;
  transform: translateY(0);
}
