/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* Custom ZenCrowd Styles */

:root {
  --primary-dark: #0b3d52;
  --primary: #117a65;
  --accent: #a4c400;

  --neutral-dark: #4e4f45;
  --neutral-medium: #8f8a7c;
  --neutral-light: #a6a6a6;

  --secondary-dark: #014d3a;
  --secondary: #0f7a5c;
  --secondary-olive: #5f6b1f;
  --neutral-olive: #55564b;

  /* Bridge palette tokens with Bootstrap semantic colors */
  --bs-primary: var(--primary-dark);
  --bs-primary-rgb: 11, 61, 82;
  --bs-secondary: var(--neutral-olive);
  --bs-secondary-rgb: 85, 86, 75;
  --bs-success: var(--secondary);
  --bs-success-rgb: 15, 122, 92;
  --bs-warning: var(--accent);
  --bs-warning-rgb: 164, 196, 0;
  --bs-info: var(--primary);
  --bs-info-rgb: 17, 122, 101;
  --bs-body-color: var(--neutral-dark);
  --bs-secondary-color: var(--neutral-olive);
  --bs-secondary-color-rgb: 85, 86, 75;
  --bs-border-color: var(--neutral-light);
  --bs-link-color: var(--secondary-dark);
  --bs-link-hover-color: var(--primary-dark);
  --bs-tertiary-bg: #e6e2d8;
}

body {
  color: var(--neutral-dark);
}

/* Standard page header/title sizing across internal screens */
.page-header {
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.page-header .btn,
.page-header .btn-group {
  margin-bottom: 0.25rem;
}

.navbar.bg-primary {
  background-color: var(--primary-dark) !important;
}

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--secondary-dark);
  --bs-btn-hover-border-color: var(--secondary-dark);
  --bs-btn-active-bg: var(--secondary-dark);
  --bs-btn-active-border-color: var(--secondary-dark);
  --bs-btn-disabled-bg: var(--neutral-light);
  --bs-btn-disabled-border-color: var(--neutral-light);
}

.btn-outline-primary {
  --bs-btn-color: #0d6efd;
  --bs-btn-border-color: #0d6efd;
  --bs-btn-hover-bg: #0d6efd;
  --bs-btn-hover-border-color: #0d6efd;
  --bs-btn-active-bg: #0b5ed7;
  --bs-btn-active-border-color: #0a58ca;
}

/* Forca o botao de categoria "direita" para azul escuro, independente do tema. */
.evento-categoria-direita {
  background-color: #0a2f8f !important;
  border-color: #0a2f8f !important;
  color: #fff !important;
}

.evento-categoria-direita:hover,
.evento-categoria-direita:focus,
.evento-categoria-direita:active {
  background-color: #082571 !important;
  border-color: #082571 !important;
  color: #fff !important;
}

/* Accent should stay sparing for high-signal CTAs */
.btn-accent {
  --bs-btn-color: var(--neutral-dark);
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--secondary-olive);
  --bs-btn-hover-border-color: var(--secondary-olive);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--secondary-olive);
  --bs-btn-active-border-color: var(--secondary-olive);
}

.bg-brand-surface {
  background-color: var(--neutral-medium) !important;
}

.text-brand-muted {
  color: var(--neutral-olive) !important;
}

/* Smooth transitions */
.card, .btn, .nav-link {
  transition: all 0.3s ease;
}

/* Card hover effect */
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Keep ZenPlot card stable; transform on ancestor breaks fixed zoom panel positioning. */
.card.zen-plot-card:hover {
  transform: none;
}

.zen-plot-card .minimal-controls .points-count-group {
  margin-left: 0;
}

.zen-plot-card .minimal-controls .submit-group.submit-group-end {
  margin-left: auto;
  gap: 0.5rem;
  align-items: center;
}

.zen-plot-card .minimal-controls .submit-group.submit-group-end .btn {
  min-height: 2.5rem;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

/* Navbar custom styling */
.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
}

/* Footer styling */
footer {
  border-top: 1px solid var(--neutral-light);
}

/* Button loading state */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.65;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-right-color: transparent;
  animation: spinner-border 0.75s linear infinite;
}


/* Custom badge colors */
.badge-custom {
  padding: 0.35em 0.65em;
  font-weight: 500;
}

/* Image preview */
.image-preview {
  max-width: 100%;
  border: 1px solid var(--neutral-light);
  border-radius: 0.25rem;
  padding: 0.25rem;
}

.grid-overlay-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--neutral-light);
  border-radius: 0.5rem;
  background-color: #f8f9fa;
}

.grid-overlay-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.grid-overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-size: 100% 100%;
  box-shadow: inset 0 0 0 1px rgba(17, 122, 101, 0.55);
}

.grid-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 50%;
  gap: 0.35rem;
}

.grid-picker-cell {
  appearance: none;
  aspect-ratio: 1 / 1;
  border: 1px solid #cad0c7;
  background-color: #eef1ea;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  padding: 0;
}

.grid-picker-cell:hover {
  transform: scale(1.04);
}

.grid-picker-cell.is-selected {
  border-color: rgba(17, 122, 101, 0.7);
  background-color: rgba(17, 122, 101, 0.2);
}

.grid-picker-cell.is-anchor {
  border-color: var(--primary-dark);
  background-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(11, 61, 82, 0.2);
}

/* Status badges */
.status-badge {
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
}

.progress-icon-sprite {
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url('https://cdn-icons-png.flaticon.com/512/18645/18645453.png');
  background-repeat: no-repeat;
  background-size: 100% 300%;
  background-position: center 0%;
}

.progress-icon-sprite--low {
  background-position: center 0%;
}

.progress-icon-sprite--mid {
  background-position: center 50%;
}

.progress-icon-sprite--high {
  background-position: center 100%;
}

/* Responsive utilities */
@media (max-width: 768px) {
  .card {
    margin-bottom: 1rem;
  }
  
  .navbar-brand {
    font-size: 1.25rem;
  }
}

/* Pagination spacing and visual polish */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.pagination > * {
  margin: 0;
  border: 0;
  background: transparent;
}

.pagination .page-item:not(:first-child) .page-link {
  margin-left: 0;
}

.pagination a,
.pagination .current,
.pagination .disabled,
.pagination .gap,
.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  height: 2.35rem;
  padding: 0 0.8rem;
  border: 1px solid #d5d9de;
  border-radius: 0.5rem;
  background-color: #fff;
  color: #495057;
  font-weight: 500;
  text-decoration: none;
  line-height: 1;
  box-shadow: none;
}

.pagination > a:hover,
.pagination > * > a:hover,
.pagination a:hover,
.pagination .page-link:hover {
  background-color: #f1f3f5;
  border-color: #c7cdd4;
  color: #212529;
}

.pagination .page-link:focus,
.pagination .page-link:focus-visible,
.pagination a:focus,
.pagination > a:focus,
.pagination > * > a:focus {
  box-shadow: none;
  outline: none;
}

.pagination .current,
.pagination .current > span,
.pagination .current > a,
.pagination .active > .page-link {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.pagination .disabled > span,
.pagination .disabled > a,
.pagination .disabled > .page-link,
.pagination .gap {
  background-color: #f8f9fa;
  border-color: #e6e9ec;
  color: #9aa1a9;
}

