/* Shopify-style Modern Minimalist Libro de Reclamaciones */
:root {
  --xr-primary: #c0392b;
  --xr-text-main: #333333;
  --xr-text-light: #737373;
  --xr-border: #d9d9d9;
  --xr-bg-input: #ffffff;
  --xr-bg-page: #f5f5f5;
  --xr-radius: 12px; /* More rounded as requested */
  --xr-transition: all 0.2s ease-in-out;
}

#xreclamaciones.xreclamaciones-page {
  max-width: 600px;
  margin: 2rem auto;
  padding: 0 15px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--xr-text-main);
}

/* Header Section */
.xreclamaciones-header {
  margin-bottom: 2rem;
  text-align: left;
}

.xreclamaciones-header .h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #000;
}

.xreclamaciones-company-info {
  font-size: 0.9rem;
  color: var(--xr-text-light);
}

.xreclamaciones-company {
  font-weight: 600;
  color: var(--xr-text-main);
}

.xreclamaciones-meta-grid {
  display: block;
  margin-top: 0.25rem;
}

/* Legal Notice */
.xreclamaciones-legal {
  background: #f8f8f8;
  border: 1px solid var(--xr-border);
  border-radius: var(--xr-radius);
  padding: 1rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--xr-text-light);
}

/* Form Sections */
.xreclamaciones-fieldset {
  border: none;
  padding: 0;
  margin-bottom: 2.5rem;
}

.xreclamaciones-fieldset legend {
  font-size: 1.1rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 1rem;
  padding: 0;
  border: none;
  float: none;
  width: 100%;
}

/* Floating Label Logic */
.xreclamaciones-form .field {
  position: relative;
  margin-bottom: 0.75rem;
}

.xreclamaciones-form .form-control,
.xreclamaciones-form .custom-select {
  border: 1px solid var(--xr-border);
  border-radius: var(--xr-radius);
  padding: 1.3rem 0.75rem 0.4rem; /* Adjusted for floating label */
  font-size: 0.95rem;
  background-color: var(--xr-bg-input);
  transition: var(--xr-transition);
  color: var(--xr-text-main);
  width: 100%;
  height: auto;
  line-height: normal;
}

.xreclamaciones-form .field label {
  position: absolute;
  top: 0.85rem;
  left: 0.75rem;
  font-size: 0.95rem;
  color: var(--xr-text-light);
  pointer-events: none;
  transition: all 0.2s ease;
  margin: 0;
  font-weight: 400;
}

/* Floating effect when focused or has content */
.xreclamaciones-form .form-control:focus + label,
.xreclamaciones-form .form-control:not(:placeholder-shown) + label,
.xreclamaciones-form .custom-select:focus + label,
.xreclamaciones-form .custom-select:not([value=""]) + label {
  top: 0.3rem;
  left: 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--xr-text-light);
}

/* For select, we need a special class if it's not empty because :placeholder-shown doesn't work on selects */
.xreclamaciones-form .field.has-value label {
  top: 0.3rem;
  left: 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.xreclamaciones-form .form-control:focus {
  border-color: var(--xr-primary);
  box-shadow: 0 0 0 1px var(--xr-primary);
  outline: none;
}

/* Textarea specific padding */
.xreclamaciones-form textarea.form-control {
  padding-top: 1.5rem;
}

/* Grid for Inputs */
.xreclamaciones-form .row {
  display: flex;
  gap: 0.75rem;
  margin: 0;
}

.xreclamaciones-form .col-md-6,
.xreclamaciones-form .col-md-7,
.xreclamaciones-form .col-md-5 {
  padding: 0;
  flex: 1;
}

/* Custom Radio Buttons (Shopify Style) */
.xreclamaciones-form .custom-radio-group {
  border: 1px solid var(--xr-border);
  border-radius: var(--xr-radius);
  overflow: hidden;
}

.xreclamaciones-form .custom-radio-item {
  border-bottom: 1px solid var(--xr-border);
}

.xreclamaciones-form .custom-radio-item:last-child {
  border-bottom: none;
}

.xreclamaciones-form .custom-radio-item input {
  display: none;
}

.xreclamaciones-form .custom-radio-item label {
  display: flex;
  align-items: center;
  padding: 1rem;
  margin: 0;
  cursor: pointer;
  font-size: 0.9rem;
  background: #fff;
  transition: background 0.2s;
  position: static; /* Reset for radio labels */
  pointer-events: auto;
}

.xreclamaciones-form .custom-radio-item label::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 1px solid var(--xr-border);
  border-radius: 50%;
  margin-right: 12px;
  display: inline-block;
  background: #fff;
  transition: all 0.2s;
}

.xreclamaciones-form .custom-radio-item input:checked + label {
  background: #fdf2f2;
}

.xreclamaciones-form .custom-radio-item input:checked + label::before {
  border-color: var(--xr-primary);
  border-width: 5px;
}

/* Input Group for Amount */
.xreclamaciones-form .input-group {
  display: flex;
}

.xreclamaciones-form .input-group-prepend {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: #f4f4f4;
  border: 1px solid var(--xr-border);
  border-right: none;
  border-radius: var(--xr-radius) 0 0 var(--xr-radius);
  font-size: 0.9rem;
  color: var(--xr-text-light);
}

.xreclamaciones-form .input-group .form-control {
  border-radius: 0 var(--xr-radius) var(--xr-radius) 0;
}

/* Action Button */
.xreclamaciones-actions {
  margin-top: 2rem;
}

.xreclamaciones-actions .btn-primary {
  background-color: var(--xr-primary);
  color: #fff;
  width: 100%;
  padding: 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 50px; /* Fully rounded button */
  cursor: pointer;
  transition: opacity 0.2s;
}

.xreclamaciones-actions .btn-primary:hover {
  opacity: 0.9;
}

/* Success State */
.xreclamaciones-success {
  text-align: center;
  padding: 2rem 0;
}

.xreclamaciones-ref {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--xr-primary);
  margin: 1rem 0;
}

/* Footer Note */
.xreclamaciones-footer-note {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--xr-text-light);
  line-height: 1.4;
}

@media (max-width: 767px) {
  .xreclamaciones-form .row {
    flex-direction: column;
    gap: 0.75rem;
  }
}
