/* Group layout */
.spp-results-group {
  display: grid;
  /* Change the 240px to your preferred minimum card width */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Title on its own full-width line */
.spp-group-title {
  grid-column: 1 / -1; /* span all columns */
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

/* === card items === */
.spp-card {
    display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--e-global-color-116ad20);
  border-radius: 3%;
  padding: 1rem;
  box-sizing: border-box;
  gap: 1rem;   /* equal space between all sections */
}

.spp-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.spp-card-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.spp-card-details {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    flex: auto;
}
.spp-card-details {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    flex: auto;
}

.spp-text {
    text-align: center;
    width: -webkit-fill-available;
}

/* Logo/image */
figure.spp-card-logo {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.spp-card-logo img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

a.spp-logo {
    display: block;
    width: 100%;          /* expand clickable area */
    padding: 2em 0;        /* optional extra space around */
    text-align: center;   /* center the image */
}

.spp-card-title {
  text-align: center;       /* optional */
  margin-top: 0.5rem;
}

h4#card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;

  /* 👇 prevents overflow */
  word-break: break-word;       /* breaks inside very long words */
  overflow-wrap: break-word;    /* modern alternative */
  hyphens: auto;                /* adds hyphen when breaking if possible */

  /* optional ellipsis if you want to cut instead of wrapping */
  /* white-space: nowrap;       
  overflow: hidden;
  text-overflow: ellipsis; */
}

.spp-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
}

.spp-icon {
  flex-shrink: 0;
  margin-top: 0.15em;
  color: var(--e-global-color-116ad20);
}

.spp-text a {
  text-decoration: none;
  color: inherit;
  line-height: 1.4;
}


/* === admin controls === */

.spp-card-admin-controls {
  display: flex;
  justify-content: center;
  background: #f0f0f0;
  padding: 0.5em 0;
  border: 1px dashed var(--e-global-color-116ad20);
}

.spp-card-admin-controls-inner {
  display: flex;
  gap: 0.75em;
}

.spp-admin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

.spp-admin-icon:hover {
  background: #ddd;
}


/* === Filter UI === */
.spp-filters-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background-color: #f9fafb;
    max-width: 1200px;
    margin: 0 auto;
}

.spp-filters-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    flex: 1 1 auto;
}

.spp-filters-form {
    display: flex;
    flex-direction: row;
    flex: 1 1 auto;
    gap: 1rem;
    align-items: flex-start;
}

.spp-filter {
    flex: 1 1 calc(25% - 1rem);
    min-width: 200px;
}

.spp-filter-select {
    width: 100%;
    padding: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    background-color: #fff;
    font-size: 1rem;
}

.spp-filters-actions {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
    flex: 0 0 auto;
}

.spp-filter-submit,
.spp-filter-reset {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.spp-filter-submit {
    background-color: #2563eb;
    color: white;
}

.spp-filter-reset {
    background-color: #e5e7eb;
    color: #374151;
}

.spp-filter-submit:hover {
    background-color: #1d4ed8;
}

.spp-filter-reset:hover {
    background-color: #d1d5db;
}

@media (max-width: 900px) {
    .spp-filter {
        flex: 1 1 calc(50% - 1rem);
    }

    .spp-filters-actions {
        flex: 1 1 100%;
        justify-content: center;
        margin-top: 1rem;
    }
}

@media (max-width: 600px) {
    .spp-filter {
        flex: 1 1 100%;
        min-width: 0;
    }
}

/* === Pagination === */
.spp-pagination {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.spp-pagination-list {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.spp-page-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.375rem;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    border: 2px solid transparent;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;

}

.spp-page-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}


.spp-page-item.active {
    border-color: var(--e-global-color-d49ac81);
    background-color: var(--e-global-color-332724a);
    color: var(--e-global-color-text);
    font-weight: bold;
    pointer-events: none;
}

.spp-page-item.disabled,
.spp-page-item.disabled span {
    color: #9ca3af;
    cursor: not-allowed;
    pointer-events: none;
}

.spp-page-item:hover:not(.active):not(.disabled) {
    border-color: var(--e-global-color-d49ac81);
}

/* Dots in pagination */
.spp-page-item.dots,
.spp-page-item.dots span {
    pointer-events: none;
    cursor: default;
    background: transparent;
    color: inherit;
}

/* === No JS Notice === */
.spp-no-js-message {
    background-color: var(--e-global-color-332724a);
    color: var(--e-global-color-text);
    padding: 1.25rem 1.5rem;
    border-radius: 0.375rem;
    border: 2px solid var(--e-global-color-d49ac81);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
    max-width: 800px;
    margin: 2rem auto;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

/* === Loading === */

.spp-loading{
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align:center;
    padding-top:200px;
    z-index: 9999;
}

.loading-logo {
    animation: heartbeat 1.5s infinite ease-in-out;
}

.spp-loading.visible {
    opacity: 1;
    visibility: visible;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(0.9);
    }

    50% {
        transform: scale(1.2);
    }

}