/* ============================================================
   Partner Directory Block
   ============================================================ */

.partner-directory-block {
    width: 100%;
}

/* ── Filter row ─────────────────────────────────────────────── */

.pd-filter-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.pd-filter-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.pd-filter-label {
    font-size: 14px;
    font-weight: 500;
    color: inherit;
    white-space: nowrap;
}

/* ── Dropdown ───────────────────────────────────────────────── */

.pd-select-wrap {
    position: relative;
    display: inline-block;
}

.pd-type-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 40px 10px 14px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    min-width: 160px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23374151' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    line-height: 1.4;
    transition: border-color 0.15s;
}

.pd-type-select:focus {
    outline: none;
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.15);
}

/* ── Search ─────────────────────────────────────────────────── */

.pd-search-wrap {
    flex: 1 1 200px;
    position: relative;
    min-width: 200px;
}

.pd-search {
    width: 100%;
    box-sizing: border-box;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 40px 10px 14px;
    font-size: 14px;
    color: #374151;
    line-height: 1.4;
    transition: border-color 0.15s;
}

.pd-search:focus {
    outline: none;
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.15);
}

.pd-search::placeholder {
    color: #9ca3af;
}

.pd-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

/* ── Grid ───────────────────────────────────────────────────── */

.pd-grid-wrap {
    position: relative;
    min-height: 80px;
}

.pd-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1023px) {
    .pd-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .pd-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 479px) {
    .pd-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Card ───────────────────────────────────────────────────── */

.pd-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    transition: box-shadow 0.2s;
}

.pd-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.pd-card a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.pd-card img {
    max-height: 64px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    display: block;
}

.pd-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    text-align: center;
}

.pd-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    color: #9ca3af;
    font-size: 15px;
}

/* ── Loading spinner ────────────────────────────────────────── */

.pd-loading {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 2;
    border-radius: 8px;
}

.pd-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #6b7280;
    border-radius: 50%;
    animation: pd-spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes pd-spin {
    to { transform: rotate(360deg); }
}

/* ── Show More button ───────────────────────────────────────── */

.pd-show-more-wrap {
    text-align: center;
    margin-top: 32px;
}

.pd-show-more {
    display: inline-block;
    padding: 12px 36px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    background: transparent;
    border: 2px solid #1a1a2e;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    letter-spacing: 0.02em;
}

.pd-show-more:hover {
    background: #1a1a2e;
    color: #ffffff;
}

/* White button when block sits on a dark background section */
.has-dark-background .pd-show-more,
.has-contrast-color .pd-show-more,
[style*="background-color:#0"] .pd-show-more,
[style*="background-color: #0"] .pd-show-more {
    color: #ffffff;
    border-color: #ffffff;
}

[style*="background-color:#0"] .pd-show-more:hover,
[style*="background-color: #0"] .pd-show-more:hover,
.has-dark-background .pd-show-more:hover,
.has-contrast-color .pd-show-more:hover {
    background: rgba(255, 255, 255, 0.15);
}
