/* css/converter.css - Conversor Científico de Unidades Profesional (Modern UI v2.0) */

.converter-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

.converter-container {
  width: 100%;
  max-width: 640px;
  background: #ffffff;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.converter-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #f1f5f9;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.converter-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.converter-header {
  margin-bottom: 24px;
  padding-right: 40px;
}

.converter-header h3 {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.converter-header p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

/* Category Dropdown Wrapper */
.converter-cat-wrapper {
  margin-bottom: 24px;
}

.converter-cat-wrapper label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #4f46e5;
  margin-bottom: 8px;
}

.converter-cat-select {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  border: 2px solid #4f46e5;
  font-size: 16px;
  font-weight: 800;
  color: #4f46e5;
  background: #f5f3ff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.converter-cat-select:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.25);
}

/* Form Grid */
.converter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 580px) {
  .converter-grid {
    grid-template-columns: 1fr;
  }
}

.converter-box {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  box-sizing: border-box;
}

.converter-box label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 10px;
}

.converter-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  background: #ffffff;
  margin-bottom: 14px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.converter-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

.converter-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.converter-select:focus {
  outline: none;
  border-color: #4f46e5;
}

/* Educational Explanation Box */
.converter-explanation {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-radius: 16px;
  padding: 22px;
}

.converter-explanation__title {
  font-size: 14px;
  font-weight: 800;
  color: #166534;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.converter-explanation__value {
  font-size: 24px;
  font-weight: 800;
  color: #14532d;
  margin-bottom: 10px;
}

.converter-explanation__steps {
  font-size: 14px;
  color: #166534;
  line-height: 1.6;
}

.converter-tip {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #86efac;
  font-size: 13px;
  color: #15803d;
  font-weight: 700;
}
