/* These styles are generated from project.scss. */

[x-cloak] { display: none !important; }

/* ==========================================================================
   Custom Properties & Bootstrap Overrides
   ========================================================================== */

:root {
  --primary: #a10ed0;
  --primary-soft: #8f1bb8;
  --dark: #111111;
  --gray-bg: #f2f2f4;
  --gray-box: #ffffff;

  /* Override Bootstrap primary palette */
  --bs-primary: var(--primary);
  --bs-primary-rgb: 161, 14, 208;
  --bs-link-color: var(--primary);
  --bs-link-color-rgb: 161, 14, 208;
  --bs-link-hover-color: var(--primary-soft);
  --bs-link-hover-color-rgb: 143, 27, 184;
}

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-soft);
  --bs-btn-hover-border-color: var(--primary-soft);
  --bs-btn-active-bg: #7d17a0;
  --bs-btn-active-border-color: #7d17a0;
  --bs-btn-focus-shadow-rgb: 161, 14, 208;
  --bs-btn-disabled-bg: var(--primary);
  --bs-btn-disabled-border-color: var(--primary);
}

.btn-outline-primary {
  --bs-btn-color: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary);
  --bs-btn-hover-border-color: var(--primary);
  --bs-btn-active-bg: var(--primary);
  --bs-btn-active-border-color: var(--primary);
  --bs-btn-focus-shadow-rgb: 161, 14, 208;
}

/* ==========================================================================
   Base
   ========================================================================== */

body {
  min-height: 100vh;
  background: var(--gray-bg);
  color: var(--dark);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.page-wrapper {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.page-wrapper.centered {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar-alma {
  /* Override Bootstrap navbar-light CSS variables for branded hover */
  --bs-navbar-hover-color: var(--primary);
  --bs-navbar-active-color: var(--primary);
}

.navbar-alma .nav-link {
  transition: color 0.15s ease;
}

.navbar-alma .nav-link.active {
  border-bottom: 2px solid var(--primary);
}

@media (max-width: 767.98px) {
  .navbar-alma .nav-link.active {
    border-bottom: none;
  }

  .navbar-alma .navbar-nav {
    text-align: center;
  }
}

.navbar-logo {
  width: 44px;
}

/* ==========================================================================
   Components — Content Box
   ========================================================================== */

.content-box {
  background: var(--gray-box);
  border-radius: 1.25rem;
  padding: 3.5rem 3rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Components — Divider
   ========================================================================== */

.divider {
  width: 56px;
  height: 3px;
  background: var(--primary-soft);
  margin: 1.5rem auto;
  border-radius: 2px;
}

/* ==========================================================================
   Components — Feature Cards
   ========================================================================== */

.feature {
  border: 1px solid #e6e6ea;
  border-radius: 0.75rem;
  padding: 1.5rem 1rem;
  height: 100%;
  transition: all 0.2s ease;
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.feature i {
  color: var(--primary-soft);
  font-size: 1.7rem;
}

/* ==========================================================================
   Components — Alerts
   ========================================================================== */

.alert {
  --bs-alert-bg: var(--gray-box);
  --bs-alert-color: var(--dark);
  --bs-alert-border-color: transparent;
  position: relative;
  overflow: hidden;
  border: none;
  border-left: 4px solid var(--bs-alert-border-color);
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.alert-success {
  --bs-alert-border-color: #198754;
}

.alert-info {
  --bs-alert-border-color: var(--primary);
}

.alert-warning {
  --bs-alert-border-color: #e6a817;
}

.alert-error,
.alert-danger {
  --bs-alert-border-color: #dc3545;
}

.alert-debug {
  --bs-alert-border-color: #adb5bd;
}

.alert-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background-color: var(--bs-alert-border-color);
  opacity: 0.5;
  animation: alert-drain 3s linear forwards;
  border-radius: 0 0 0.75rem 0.75rem;
}

@keyframes alert-drain {
  from { width: 100%; }
  to   { width: 0%; }
}

/* ==========================================================================
   Typography
   ========================================================================== */

.highlight {
  color: var(--primary);
  font-weight: 600;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding: 1.5rem 0;
  text-align: center;
}

.footer small {
  color: #777;
  font-size: 0.8rem;
}

/* ==========================================================================
   Page-specific — Landing Page
   ========================================================================== */

.lp-logo {
  width: 500px;
}

/* ==========================================================================
   Page-specific — Pricing Calculator
   ========================================================================== */

.produto-qty-input {
  width: 100px;
}

.produto-peso-input {
  flex: 0 0 130px;
}

.produto-dim-input {
  flex: 1;
}

.card-header-gradient {
  background: linear-gradient(to right, var(--primary), var(--dark));
  color: #fff;
}

/* Override Bootstrap card defaults for polished look */
.card {
  border: none;
  border-radius: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.card .card-header {
  border-radius: 1.25rem 1.25rem 0 0;
}

.card .bg-light {
  border-radius: 0.75rem;
}

/* ==========================================================================
   Components — Card body variants
   ========================================================================== */

.card-body-gray {
  background: var(--gray-bg);
  border-radius: 0 0 1.25rem 1.25rem;
}

/* ==========================================================================
   Components — Form Sections
   ========================================================================== */

.form-section {
  background: var(--gray-box);
  border-radius: 0.75rem;
  border: 1px solid #e6e6ea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.form-section h6 {
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f0e6f8;
  margin-bottom: 1rem !important;
}

/* Product row cards in calculator form */
.produto-row {
  border-radius: 0.75rem;
  border-color: #e6e6ea;
  box-shadow: none;
}


/* ==========================================================================
   Components — Detail Timeline
   ========================================================================== */

.timeline-wrapper {
  position: relative;
  padding-left: 2.75rem;
}

/* Vertical connector line */
.timeline-wrapper::before {
  content: '';
  position: absolute;
  left: 0.9375rem; /* center of nodes */
  top: 2.5rem;
  bottom: 2.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-soft), var(--primary));
}

@keyframes timeline-node-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--gray-bg); }
  50% { box-shadow: 0 0 0 3px var(--gray-bg), 0 0 0 9px rgba(0, 0, 0, 0.1); }
}

.timeline-node-active {
  animation: timeline-node-pulse 2.5s ease-in-out infinite;
}

/* Colored circle node */
.timeline-node {
  position: absolute;
  left: -2.75rem;
  top: 0.875rem;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  font-size: 0.8rem;
  color: white;
  border: 3px solid var(--gray-bg);
}

.timeline-node.bg-warning,
.timeline-node.bg-info {
  color: #000;
}

@media (max-width: 767.98px) {
  .timeline-wrapper {
    padding-left: 0;
  }

  .timeline-wrapper::before {
    display: none;
  }

  .timeline-node {
    display: none;
  }
}

/* ==========================================================================
   Components — Dashboard KPI Cards
   ========================================================================== */

.kpi-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1rem;
  border: 1px solid #e6e6ea;
  border-left: 4px solid var(--primary);
  border-radius: 0.75rem;
  background: #fff;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.kpi-card.kpi-accent-primary { border-left-color: var(--primary); }
.kpi-card.kpi-accent-warning { border-left-color: #e6a817; }
.kpi-card.kpi-accent-info    { border-left-color: #0dcaf0; }
.kpi-card.kpi-accent-success { border-left-color: #198754; }

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  color: inherit;
  text-decoration: none;
}

.kpi-card .kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.kpi-card .kpi-label {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 0.15rem;
}

.kpi-card .kpi-icon {
  margin-left: auto;
  font-size: 1.5rem;
  opacity: 0.25;
}

/* ==========================================================================
   Components — Dashboard Section Toggle
   ========================================================================== */

.section-toggle {
  cursor: pointer;
  user-select: none;
}

.section-toggle .bi-chevron-down {
  transition: transform 0.25s ease;
}

.section-toggle[aria-expanded="false"] .bi-chevron-down {
  transform: rotate(-90deg);
}

.section-icon-primary { color: var(--primary); }
.section-icon-warning { color: #e6a817; }
.section-icon-info    { color: #0dcaf0; }
.section-icon-success { color: #198754; }

/* ==========================================================================
   Components — Dashboard Item Cards
   ========================================================================== */

.dash-item {
  display: block;
  border: 1px solid #e6e6ea;
  border-radius: 0.75rem;
  padding: 1rem 1.15rem;
  background: #fff;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.dash-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  color: inherit;
  text-decoration: none;
}

.dash-item .dash-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.dash-item .dash-item-numero {
  font-weight: 600;
  font-size: 0.95rem;
}

.dash-item .dash-item-info {
  font-size: 0.85rem;
  color: #6c757d;
}

.dash-item .dash-item-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.65rem;
}

.dash-item .dash-item-arrow {
  color: var(--primary);
  opacity: 0.5;
  transition: opacity 0.15s;
}

.dash-item:hover .dash-item-arrow {
  opacity: 1;
}

/* ==========================================================================
   Components — Kanban Board
   ========================================================================== */

.kanban-board {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 992px) {
  .kanban-board {
    flex-direction: row;
    align-items: flex-start;
  }
}

.kanban-col {
  background: var(--gray-bg);
  border-radius: 0.75rem;
  border-top: 4px solid var(--kanban-accent, var(--primary));
  min-width: 0;
}

@media (min-width: 992px) {
  .kanban-col {
    flex: 1 1 0;
  }
}

.kanban-accent-primary { --kanban-accent: var(--primary); }
.kanban-accent-warning { --kanban-accent: #e6a817; }
.kanban-accent-info    { --kanban-accent: #0dcaf0; }
.kanban-accent-success { --kanban-accent: #198754; }

.kanban-col-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}

@media (min-width: 992px) {
  .kanban-col-header {
    cursor: default;
  }
}

.kanban-col-header i:first-child {
  font-size: 1.1rem;
  color: var(--kanban-accent, var(--primary));
}

.kanban-col-header .bi-chevron-down {
  transition: transform 0.25s ease;
}

.kanban-col-header.collapsed .bi-chevron-down {
  transform: rotate(-90deg);
}

.card-header[role="button"] {
  cursor: pointer;
  user-select: none;
}

.card-header .chevron-toggle {
  transition: transform 0.25s ease;
}

.card-header.collapsed .chevron-toggle {
  transform: rotate(-90deg);
}

.kanban-col-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem 0.75rem;
}

@media (min-width: 992px) {
  .kanban-col-body {
    display: flex !important;
    max-height: 70vh;
    overflow-y: auto;
  }
}

.kanban-col-body::-webkit-scrollbar {
  width: 5px;
}

.kanban-col-body::-webkit-scrollbar-track {
  background: transparent;
}

.kanban-col-body::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.kanban-col-body .dash-item {
  height: auto;
}

.kanban-empty {
  text-align: center;
  color: #adb5bd;
  font-size: 0.85rem;
  padding: 1.5rem 0.5rem;
}
