/**
 * GIS to Excel Tool Styles
 * Estilos específicos para la herramienta de exportación GIS a Excel/CSV
 */

/* ===== VARIABLES ESPECÍFICAS ===== */
:root {
  --gis-excel-primary: #198754;
  --gis-excel-primary-hover: #146c43;
  --gis-excel-surface: #d1e7dd;
  --gis-excel-border: #badbcc;
  --gis-excel-excel-color: #217346;
  --gis-excel-csv-color: #0d6efd;
}

/* ===== TOOL ICON ===== */
.tool-icon-container {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gis-excel-primary), var(--gis-excel-primary-hover));
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tool-icon {
  font-size: 1.75rem;
  color: white;
}

/* ===== TOOL CARD ===== */
.tool-card {
  border: none;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border-radius: 0.5rem;
  transition:
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ===== ALERTS ===== */
.tool-alert-info {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  border-radius: 0.5rem;
  padding: 1rem;
  color: #0c5460;
}

.tool-alert-info strong {
  color: #0c5460;
}

/* ===== FORM CONTROLS ===== */
.form-label {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.form-text {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

/* ===== CUSTOM FILE PREVIEW ===== */
#filePreview {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-top: 0.5rem;
}

#filePreview .file-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  background: white;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  border: 1px solid #e9ecef;
}

#filePreview .file-item:last-child {
  margin-bottom: 0;
}

#filePreview .file-icon {
  font-size: 1.5rem;
  margin-right: 0.75rem;
  color: var(--gis-excel-primary);
}

#filePreview .file-info {
  flex: 1;
}

#filePreview .file-name {
  font-weight: 600;
  color: var(--color-text);
  display: block;
}

#filePreview .file-size {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* ===== RADIO CARDS (formato de salida) ===== */
.form-check-card {
  position: relative;
  margin-bottom: 0;
}

.form-check-card .form-check-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.form-check-card .form-check-label {
  display: block;
  padding: 1rem;
  border: 2px solid #dee2e6;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: white;
}

.form-check-card .form-check-label:hover {
  border-color: var(--gis-excel-primary);
  background-color: #f8f9fa;
}

.form-check-card .form-check-input:checked ~ .form-check-label {
  border-color: var(--gis-excel-primary);
  background-color: var(--gis-excel-surface);
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.1);
}

.form-check-card .form-check-input:focus ~ .form-check-label {
  outline: 2px solid var(--gis-excel-primary);
  outline-offset: 2px;
}

/* ===== CHECKBOX CONTROLS ===== */
.form-check {
  padding: 0.75rem;
  border-radius: 0.375rem;
  transition: background-color 0.15s ease;
}

.form-check:hover {
  background-color: #f8f9fa;
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.25rem;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--gis-excel-primary);
  border-color: var(--gis-excel-primary);
}

.form-check-label {
  cursor: pointer;
  padding-left: 0.5rem;
}

/* ===== BUTTONS ===== */
.btn-success {
  background-color: var(--gis-excel-primary);
  border-color: var(--gis-excel-primary);
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-success:hover {
  background-color: var(--gis-excel-primary-hover);
  border-color: var(--gis-excel-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(25, 135, 84, 0.3);
}

.btn-success:active {
  transform: translateY(0);
}

.btn-outline-primary,
.btn-outline-secondary {
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-outline-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== RESULT AREA ===== */
#resultArea {
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#successMessage,
#errorMessage {
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  font-weight: 500;
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== LOADING STATE ===== */
.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15rem;
}

/* ===== COORDINATE SYSTEM GROUP ===== */
#coordinateSystemGroup {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .tool-icon-container {
    width: 2.5rem;
    height: 2.5rem;
  }

  .tool-icon {
    font-size: 1.5rem;
  }

  .form-check-card .form-check-label {
    padding: 0.75rem;
  }

  .d-flex.gap-2 {
    flex-direction: column;
  }

  .d-flex.gap-2 .btn {
    width: 100%;
  }
}

/* ===== ACCESSIBILITY ===== */
.form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

.btn:focus {
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* ===== PRINT STYLES ===== */
@media print {
  .btn,
  #resultArea,
  .tool-alert-info {
    display: none !important;
  }
}
