
/* Professional Dialog Styling - White Theme */
.dialog-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  z-index: 999;
  animation: fadeInOverlay 0.3s ease-out;
}

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

.dialog {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  max-width: 90vw;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  animation: slideInDialog 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid #e5e7eb;
}

@keyframes slideInDialog {
  from {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.dialog-header {
  background: #2563eb;
  padding: 20px 25px;
  border-radius: 14px 14px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.dialog-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.dialog-body {
  padding: 30px 25px;
  background: white;
  border-radius: 0 0 14px 14px;
}

/* Text Input Styling */
#textInput {
  width: 100%;
  padding: 15px;
  margin-bottom: 20px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  color: #374151;
  border-radius: 10px;
  font-size: 16px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

#textInput:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: white;
}

#textInput::placeholder {
  color: #9ca3af;
}

/* Select Styling */
#fontSelector, #fontSizeSelector, #stylePreset, #outputFormat {
  width: 100%;
  padding: 15px;
  margin-bottom: 20px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  color: #374151;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
  padding-right: 45px;
  text-align: center;
}

#fontSelector:hover, #fontSizeSelector:hover, #stylePreset:hover, #outputFormat:hover {
  border-color: #2563eb;
  background-color: white;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
}

#fontSelector:focus, #fontSizeSelector:focus, #stylePreset:focus, #outputFormat:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-color: white;
}

/* Color Picker Styling */
#textColorPicker {
  width: 100%;
  height: 50px;
  margin-bottom: 20px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

#textColorPicker:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
}

#textColorPicker:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Close Button Styling */
#closeDialog {
  cursor: pointer;
  width: 24px;
  height: 24px;
  opacity: 0.9;
  transition: all 0.3s ease;
  filter: brightness(0) invert(1);
}

#closeDialog:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Delete Button Styling */
.dialog-header button {
  background: #dc2626;
  color: white;
  border: none;
  padding: 8px 16px;
  margin-right: 15px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.dialog-header button:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.dialog-header button:active {
  transform: translateY(0);
}

/* Stroke Width Value Display */
#strokeWidthValue {
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  background: white;
  padding: 4px 8px;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  display: inline-block;
  min-width: 30px;
  text-align: center;
  transition: all 0.3s ease;
}

#strokeWidthValue:hover {
  border-color: #2563eb;
  cursor: pointer;
  transform: scale(1.05);
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .dialog {
    width: 95vw;
    margin: 0 2.5vw;
  }
  
  .dialog-header {
    padding: 15px 20px;
  }
  
  .dialog-header h3 {
    font-size: 16px;
  }
  
  .dialog-body {
    padding: 25px 20px;
  }
  
  #textInput, #fontSelector, #fontSizeSelector {
    padding: 12px;
    font-size: 15px;
    margin-bottom: 18px;
  }
  
  #textColorPicker {
    height: 45px;
    margin-bottom: 18px;
  }
  
  .dialog-header button {
    padding: 6px 12px;
    font-size: 13px;
    margin-right: 10px;
  }
  
  #closeDialog {
    width: 20px;
    height: 20px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .dialog {
    border: 3px solid #000;
  }
  
  #textInput, #fontSelector, #fontSizeSelector, #textColorPicker {
    border: 2px solid #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .dialog, .dialog-overlay {
    animation: none;
  }
  
  * {
    transition: none !important;
  }
}
