/* Base */
#emendas-engbox-lista {
  --ep-bg: #ffffff;
  --ep-text: #1f2937;
  --ep-muted: #6b7280;
  --ep-border: #e5e7eb;
  --ep-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 10px 22px rgba(16, 24, 40, 0.08);

  /* Cores padrão (fallback) */
  --ep-accent: #b6b6b6;      /* cor principal */
  --ep-accent-2: #22c55e;    /* WhatsApp */
}

#emendas-engbox-single {
  --ep-bg: #ffffff;
  --ep-text: #1f2937;
  --ep-muted: #6b7280;
  --ep-border: #e5e7eb;
  --ep-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 10px 22px rgba(16, 24, 40, 0.08);

  /* Cores padrão (fallback) */
  --ep-accent: #b6b6b6;      /* cor principal */
  --ep-accent-2: #22c55e;    /* WhatsApp */
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ep-text);
  background: #fafafa;
}

#singleInfo {
    display: none;
}

#emendas-engbox-lista .container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

#emendas-engbox-lista .page-header {
    margin: 6px 0 22px;
}

#emendas-engbox-lista .page-header h1 {
    margin: 0 0 6px;
    font-size: 34px;
    letter-spacing: -0.02em;
}

#emendas-engbox-lista .page-header p {
    margin: 0;
    color: var(--ep-muted);
}

/* Filtros */
#emendas-engbox-lista .filters {
    display: grid;
    grid-template-columns: 2fr 2fr 1.4fr;
    gap: 12px;
    margin: 18px 0 18px;
    align-items: stretch;
}

#emendas-engbox-lista .filters__field {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--ep-border);
}

#emendas-engbox-lista .filters__field input,
#emendas-engbox-lista .filters__field select {
    width: 100%;
    height: 48px;
    border: none;
    outline: none;
    padding: 0 14px;
    font: inherit;
    color: var(--ep-text);
    background: transparent;
    appearance: none;
}

#emendas-engbox-lista .filters__field--search input {
    padding-left: 44px;
}

#emendas-engbox-lista .filters__icon {
    position: absolute;
    left: 14px;
    color: var(--ep-muted);
    pointer-events: none;
    font-size: 18px;
}

#emendas-engbox-lista .filters__field:focus-within {
    border-color: rgba(182, 182, 182, 0.45);
    box-shadow: 0 0 0 3px rgba(182, 182, 182, 0.12);
}

#emendas-engbox-lista .filters__submit {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 48px;
    border-radius: 12px;
    border: none;
    background: var(--ep-accent);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 120ms ease;
}

#emendas-engbox-lista .filters__submit:hover {
    background: var(--ep-accent) !important;
    opacity: 0.8;
}

.filters__submit:active {
    opacity: 0.7;
}

/* GRID */
#emendas-engbox-lista .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* CARD (inspirado no mock) */
#emendas-engbox-lista .ep-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--ep-border);
    border-radius: 14px;
    background: var(--ep-bg);
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.03);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
    display: flex;
    flex-direction: column;
}

#emendas-engbox-lista .ep-card:hover {
    transform: translateY(-2px);
    border-color: rgba(17, 24, 39, 0.14);
    box-shadow: var(--ep-shadow);
}

#emendas-engbox-lista .ep-card__media {
    display: block;
    height: 210px;
    background: #f3f4f6;
}

#emendas-engbox-lista .ep-card__media img,
#emendas-engbox-lista .ep-card .skeleton-img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

#emendas-engbox-lista .ep-card__body {
    padding: 14px 14px 10px;
    flex: 1 1 auto;
}

#emendas-engbox-lista .ep-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ep-muted);
    font-size: 13px;
    margin-bottom: 10px;
}

#emendas-engbox-lista .ep-card__title {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

#emendas-engbox-lista .ep-card__title a {
    color: inherit;
    text-decoration: none;
}

.ep-card__title a:hover {
  color: var(--ep-accent) !important;
}

#emendas-engbox-lista .ep-card__title a:hover {
    color: var(--ep-accent);
    text-decoration: none;
}

#emendas-engbox-lista .ep-card__excerpt {
    margin: 0;
    color: var(--ep-muted);
    font-size: 14px;
    line-height: 1.5;
    min-height: 3.0em;
}

#emendas-engbox-lista .ep-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 16px;
    border-top: 1px solid rgba(229, 231, 235, 0.8);
    min-height: 56px;
    margin-top: auto;
}

#emendas-engbox-lista .ep-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    min-width: 140px;
    border-radius: 8px;
    background: var(--ep-accent);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

#emendas-engbox-lista .ep-location {
    color: var(--ep-muted);
    font-size: 13px;
    white-space: nowrap;
}

#emendas-engbox-lista .ep-card__bar {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 44px;
    height: 4px;
    background: var(--ep-accent);
}

#emendas-engbox-lista .ep-icon {
    font-size: 14px;
    line-height: 1;
}

#emendas-engbox-lista .ep-empty {
    grid-column: 1 / -1;
    color: var(--ep-muted);
    padding: 18px 0;
}

/* PAGINAÇÃO */
#emendas-engbox-lista .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    flex-wrap: wrap;
}

#emendas-engbox-lista .page-btn {
    height: 38px;
    min-width: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--ep-border);
    background: #fff;
    cursor: pointer;
    color: var(--ep-muted);
}

#emendas-engbox-lista .page-btn:hover {
    background: var(--ep-accent);
    border: 0;
    color: #fff;
}

#emendas-engbox-lista .page-btn.active {
    border-color: rgba(182, 182, 182, 0.35);
    background: rgba(182, 182, 182, 0.10);
    color: var(--ep-accent);
}

#emendas-engbox-lista .page-btn.nav {
    font-weight: 700;
}

#emendas-engbox-lista .page-ellipsis {
    color: var(--ep-muted);
    padding: 0 4px;
}

/* SKELETON */
.skeleton {
  background: linear-gradient(
    90deg,
    #eee 25%,
    #f5f5f5 37%,
    #eee 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.skeleton-img {
  height: 210px;
  margin-bottom: 10px;
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}

/* Responsivo */
@media (max-width: 980px) {
    #emendas-engbox-lista .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    #emendas-engbox-lista .container { width: calc(100% - 28px); }
    #emendas-engbox-lista .grid { grid-template-columns: 1fr; }
    #emendas-engbox-lista .filters { grid-template-columns: 1fr; }
    #emendas-engbox-lista .ep-card__footer {
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }
}

/* ===== SINGLE ===== */
#emendas-engbox-single .single .ep-single__header {
    margin: 6px 0 18px;
    text-align: center;
}

#title {
  text-align: center !important;
}

#emendas-engbox-single .single h1 {
    margin: 0 0 10px;
    font-size: 34px;
    text-align: center !important;
    letter-spacing: -0.02em;
}

#emendas-engbox-single .ep-single__requester {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--ep-muted);
    font-size: 14px;
}

#emendas-engbox-single .ep-single__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--ep-muted);
    flex-wrap: wrap;
}

#emendas-engbox-single .ep-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(182, 182, 182, 0.10);
    color: var(--ep-accent);
    border: 1px solid rgba(182, 182, 182, 0.18);
    font-weight: 700;
    font-size: 12px;
}

#emendas-engbox-single .ep-dot {
    opacity: 0.6;
}

#emendas-engbox-single .ep-single__grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 26px;
    align-items: start;
}

#emendas-engbox-single .ep-single__image {
    margin: 0 0 12px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--ep-border);
    background: #f3f4f6;
}

#emendas-engbox-single .ep-single__image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 520px;
    object-fit: cover;
}

#emendas-engbox-single .ep-tabs {
    display: flex;
    gap: 18px;
    padding: 10px 2px 0;
    margin: 0 0 12px;
}

#emendas-engbox-single .ep-tab {
    border: 0;
    background: transparent;
    color: var(--ep-muted);
    padding: 10px 0;
    cursor: pointer;
    font-weight: 700;
}

#emendas-engbox-single .ep-tab:hover {
    background: transparent !important;
    color: var(--ep-muted) !important;
    opacity: 0.8 !important;
}

#emendas-engbox-single .ep-tab.active {
    color: var(--ep-text);
    border-bottom: 2px solid var(--ep-accent);
}

#emendas-engbox-single .ep-tabpanel {
    border-top: 1px solid rgba(229, 231, 235, 0.8);
    padding-top: 14px;
}

#emendas-engbox-single .ep-single__content {
    color: var(--ep-text);
    line-height: 1.7;
    font-size: 15px;
}

#emendas-engbox-single .ep-muted {
    color: var(--ep-muted);
}

#emendas-engbox-single .ep-sidecard {
    position: relative;
    top: 0;
    border: 1px solid var(--ep-border);
    border-radius: 14px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.03);
}

#emendas-engbox-single .ep-sidecard__count {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

#emendas-engbox-single .ep-progress {
    height: 8px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.08);
    overflow: hidden;
    margin: 12px 0 16px;
}

#emendas-engbox-single .ep-progress__bar {
    height: 100%;
    width: 10%;
    background: var(--ep-accent);
    border-radius: 999px;
}

#emendas-engbox-single .ep-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 46px;
    border-radius: 10px;
    background: var(--ep-accent-2);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
}

#emendas-engbox-single .ep-btn-whatsapp:hover {
    opacity: 0.8;
}

#emendas-engbox-single .ep-consent {
  margin-top: 12px;
  font-size: 14px;
}

#emendas-engbox-single .ep-consent input {
  margin-right: 6px;
}

#emendas-engbox-single .ep-btn-whatsapp.disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 980px) {
    #emendas-engbox-single .ep-single__grid {
        grid-template-columns: 1fr;
    }

    #emendas-engbox-single .single {
        padding-bottom: 96px;
    }
}
