/**
 * Estilos públicos para el plugin
 *
 * @package    DS_Forms
 * @subpackage DS_Forms/public/css
 */

/* Estilos para los formularios en el frontend */
.ds-form {
  max-width: 800px;
  margin: 0 auto 30px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ds-form-container {
  background: #fff;
  border-radius: 5px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Campos del formulario */
.ds-form-field {
  margin-bottom: 20px;
}

.ds-form-field label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.ds-form-field input[type="text"],
.ds-form-field input[type="email"],
.ds-form-field input[type="tel"],
.ds-form-field input[type="url"],
.ds-form-field input[type="number"],
.ds-form-field input[type="date"],
.ds-form-field textarea,
.ds-form-field select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f9f9f9;
  color: #333;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.ds-form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.ds-form-field input:focus,
.ds-form-field textarea:focus,
.ds-form-field select:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
}

/* Campos obligatorios */
.ds-form-field .required {
  color: #d63638;
}

/* Opciones de radio y checkbox */
.ds-form-radio,
.ds-form-checkbox {
  margin-bottom: 10px;
}

.ds-form-radio label,
.ds-form-checkbox label {
  display: inline;
  margin-left: 8px;
  font-weight: normal;
}

/* Descripciones de campo */
.ds-form-field-description {
  margin-top: 5px;
  font-size: 13px;
  color: #666;
  font-style: italic;
}

/* Botón de envío */
.ds-form-submit {
  background-color: #2271b1;
  border: none;
  color: white;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.ds-form-submit:hover {
  background-color: #135e96;
}

/* Mensajes de respuesta */
.ds-form-messages {
  margin-top: 20px;
  padding: 15px;
  border-radius: 4px;
}

.ds-form-messages.success {
  background-color: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

.ds-form-messages.error {
  background-color: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

/* Estilos para campos de archivos */
.ds-form-file-wrapper {
  margin-bottom: 10px;
}

.ds-form-file-controls {
  margin-top: 8px;
}

.ds-btn {
  display: inline-block;
  background-color: #f0f0f0;
  color: #333;
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
}

.ds-btn:hover {
  background-color: #e0e0e0;
}

.ds-form-file-list {
  margin-top: 10px;
}

.ds-selected-files {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.ds-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  background-color: #f9f9f9;
}

.ds-file-item:last-child {
  border-bottom: none;
}

.ds-file-info {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.ds-file-icon {
  margin-right: 8px;
}

.ds-file-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 10px;
}

.ds-file-size {
  color: #666;
  font-size: 0.85em;
  margin-left: 8px;
  white-space: nowrap;
}

.ds-remove-file {
  background: none;
  border: none;
  color: #cc0000;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}

.ds-remove-file:hover {
  color: #ff0000;
}

/* Estilos responsivos */
@media (max-width: 767px) {
  .ds-form-container {
    padding: 15px;
  }

  .ds-form-field input[type="text"],
  .ds-form-field input[type="email"],
  .ds-form-field input[type="tel"],
  .ds-form-field input[type="url"],
  .ds-form-field input[type="number"],
  .ds-form-field input[type="date"],
  .ds-form-field textarea,
  .ds-form-field select {
    font-size: 14px;
    padding: 8px;
  }

  .ds-form-submit {
    width: 100%;
  }
}
