/**
 * AMD Consulta PRO - Public Styles OPTIMIZADO
 * Reducción de espacios y mejora de tipografía
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #7D87C4;
  --secondary: #00cc66;
  --danger: #cc0000;
  --warning: #ffaa00;
  --light: #f5f5f5;
  --dark: #545454;
  --border: #ddd;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Contenedor Principal - REDUCIDO */
.amdcp-form-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0px;
}

/* Título Principal - COMPACTO */
.amdcp-form-container h2 {
  margin: 0 0 12px 0;
  padding: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.3;
}

/* Progress Bar - REDUCIDO */
.amdcp-progress-bar {
  background: var(--light);
  height: 0px;
  border-radius: 2px;
  margin-bottom: 0px;
  overflow: hidden;
}

.amdcp-progress-fill {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  height: 100%;
  transition: width 0.3s ease;
}

/* Formulario - PADDING REDUCIDO */
#amdcp-consultation-form {
  background: white;
  border: 0px solid var(--border);
  border-radius: var(--radius);
  padding: 0px;
  
}

/* Form Groups - ESPACIADO OPTIMIZADO */
.amdcp-form-group {
  margin-bottom: 16px;
}

.amdcp-form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--dark);
  font-size: 13px;
  line-height: 1.3;
}

.amdcp-form-group label .amdcp-required {
  color: var(--danger);
  margin-left: 2px;
}

/* Inputs y Textareas - COMPACTOS */
.amdcp-form-group input,
.amdcp-form-group textarea,
.amdcp-form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
  line-height: 1.4;
}

.amdcp-form-group input:focus,
.amdcp-form-group textarea:focus,
.amdcp-form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(125, 135, 196, 0.1);
}

.amdcp-form-group textarea {
  min-height: 90px;
  resize: vertical;
}

.amdcp-form-group small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #999;
}

/* Upload de Archivos - COMPACTO */
.amdcp-file-group {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.amdcp-file-group:hover {
  border-color: var(--primary);
  background: rgba(125, 135, 196, 0.05);
}

.amdcp-file-input {
  display: none;
}

.amdcp-file-group label {
  cursor: pointer;
  margin: 0;
  font-weight: 500;
  color: var(--primary);
  font-size: 13px;
  line-height: 1.4;
}

.amdcp-file-hint {
  font-size: 11px;
  color: #999;
  margin-top: 6px;
  line-height: 1.3;
}

.amdcp-file-preview {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.amdcp-file-item {
  background: var(--light);
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.amdcp-file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.amdcp-remove-file {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  line-height: 1;
}

.amdcp-remove-file:hover {
  font-weight: bold;
}

/* Sección Opcional - COMPACTA */
.amdcp-optional-fields {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.amdcp-optional-fields h3 {
  margin: 0 0 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
}

/* Vista Previa - COMPACTA */
#amdcp-preview {
  margin-top: 20px;
  padding: 15px;
  background: var(--light);
  border-radius: var(--radius);
}

#amdcp-preview h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.amdcp-preview-content {
  font-size: 13px;
  line-height: 1.6;
}

.amdcp-preview-content p {
  margin: 8px 0;
}

/* Botones de Acción - OPTIMIZADOS */
.amdcp-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.amdcp-btn,
.amdcp-btn-primary,
.amdcp-btn-secondary,
.amdcp-btn-small {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-block;
  text-decoration: none;
  line-height: 1.4;
}

.amdcp-btn-primary {
  background: var(--primary);
  color: white;
}

.amdcp-btn-primary:hover {
  background: #6b76b3;
  box-shadow: 0 4px 12px rgba(125, 135, 196, 0.3);
  transform: translateY(-1px);
}

.amdcp-btn-secondary {
  background: var(--light);
  color: var(--dark);
  border: 1px solid var(--border);
}

.amdcp-btn-secondary:hover {
  background: white;
  border-color: var(--primary);
}

.amdcp-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Alertas - COMPACTAS */
.amdcp-alert {
  padding: 12px 15px;
  border-radius: 6px;
  margin-bottom: 15px;
  border-left: 4px solid;
  animation: slideDown 0.3s ease;
  font-size: 13px;
  line-height: 1.5;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.amdcp-alert-success {
  background: rgba(0, 204, 102, 0.1);
  border-color: var(--secondary);
  color: #008844;
}

.amdcp-alert-error {
  background: rgba(204, 0, 0, 0.1);
  border-color: var(--danger);
  color: #880000;
}

.amdcp-alert-warning {
  background: rgba(255, 170, 0, 0.1);
  border-color: var(--warning);
  color: #885500;
}

/* Notificaciones - COMPACTAS */
.amdcp-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 16px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  animation: slideInRight 0.3s ease;
  font-size: 13px;
  font-weight: 500;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.amdcp-notification-success {
  background: var(--secondary);
  color: white;
}

.amdcp-notification-error {
  background: var(--danger);
  color: white;
}

/* Responsivo */
@media (max-width: 768px) {
  .amdcp-form-container {
    padding: 12px;
  }

  .amdcp-form-container h2 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  #amdcp-consultation-form {
    padding: 0px;
  }

  .amdcp-form-group {
    margin-bottom: 14px;
  }

  .amdcp-form-group input,
  .amdcp-form-group textarea,
  .amdcp-form-group select {
    padding: 9px 11px;
    font-size: 14px;
  }

  .amdcp-file-group {
    padding: 12px;
  }

  .amdcp-form-actions {
    flex-direction: column;
  }

  .amdcp-btn,
  .amdcp-btn-primary,
  .amdcp-btn-secondary {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .amdcp-form-container {
    padding: 10px;
  }

  .amdcp-form-container h2 {
    font-size: 17px;
  }

  #amdcp-consultation-form {
    padding: 12px;
  }

  .amdcp-form-group {
    margin-bottom: 12px;
  }

  .amdcp-form-group input,
  .amdcp-form-group textarea,
  .amdcp-form-group select {
    padding: 8px 10px;
    font-size: 14px;
  }

  .amdcp-progress-bar {
    margin-bottom: 0px;
  }
}