/**
 * Y Combinator QW-4: Input-Feld Polish
 * Premium-Gefühl für Textareas und Inputs
 *
 * @version 1.0.0
 * @date 2026-01-04
 */

/* ================================================
   PREMIUM TEXTAREA STYLES
   ================================================ */

.modal-textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px;

  background: var(--color-bg-input, #2a2a2a);
  border: 2px solid var(--color-border, #2d3748);
  border-radius: 12px;

  color: var(--color-text, #ffffff);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;

  resize: none; /* Handled by JS auto-resize */
  overflow-y: hidden; /* Auto-resize handles overflow */

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.modal-textarea::placeholder {
  color: var(--color-text-muted, #718096);
  transition: opacity 0.3s ease;
}

/* Focus State - Premium Glow */
.modal-textarea:focus {
  outline: none;
  border-color: var(--color-primary, #667eea);
  background: var(--color-bg-input, #2a2a2a);
  box-shadow:
    0 0 0 4px rgba(102, 126, 234, 0.2),
    0 0 30px rgba(102, 126, 234, 0.1);
}

.modal-textarea:focus::placeholder {
  opacity: 0.5;
}

/* Hover State (when not focused) */
.modal-textarea:not(:focus):hover {
  border-color: var(--color-border-light, #4a5568);
}

/* ================================================
   ROTATING PLACEHOLDER EFFECT
   ================================================ */

.modal-textarea[data-rotating-placeholder] {
  /* Animation hint - placeholder will change */
}

/* ================================================
   AUTO-RESIZE INDICATOR
   ================================================ */

.modal-textarea--auto-resize {
  min-height: 80px;
  max-height: 300px;
  overflow-y: auto;
}

/* ================================================
   CHARACTER COUNTER
   ================================================ */

.input-char-counter {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 11px;
  color: var(--color-text-muted, #718096);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.input-char-counter--visible {
  opacity: 1;
}

.input-char-counter--warning {
  color: var(--color-warning, #f59e0b);
}

.input-char-counter--danger {
  color: var(--color-error, #f56565);
}

/* ================================================
   MODAL CONTENT ADJUSTMENT
   ================================================ */

.modal-content {
  position: relative;
}

.modal-content .input-wrapper {
  position: relative;
}

/* ================================================
   LIGHT MODE SUPPORT
   ================================================ */

[data-template="light-modern"] .modal-textarea {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #1a202c;
}

[data-template="light-modern"] .modal-textarea:focus {
  border-color: #4A90D9;
  box-shadow:
    0 0 0 4px rgba(74, 144, 217, 0.15),
    0 0 30px rgba(74, 144, 217, 0.08);
}

[data-template="light-modern"] .modal-textarea::placeholder {
  color: #9CA3AF;
}

/* ================================================
   MOBILE OPTIMIZATIONS
   ================================================ */

@media (max-width: 480px) {
  .modal-textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 14px;
    min-height: 100px;
  }
}
