/* =============================================================
   Irish Property Search — Frontend Styles
   ============================================================= */

/* ── Search Form ── */
.ips-search-wrap {
    margin: 1.5rem 0 2rem;
}

.ips-search-form {
    width: 100%;
}

.ips-search-inner {
    display: flex;
    gap: 0;
    max-width: 640px;
    border: 2px solid #1a3c5e;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(26, 60, 94, 0.12);
    transition: box-shadow 0.2s ease;
}

.ips-search-inner:focus-within {
    box-shadow: 0 0 0 3px rgba(26, 60, 94, 0.25);
}

.ips-search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: none;
    outline: none;
    background: #fff;
    color: #1a1a1a;
    min-width: 0;
}

.ips-search-input::placeholder {
    color: #8a9ab0;
}

.ips-search-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.2rem;
    background: #1a3c5e;
    color: #fff;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.ips-search-button:hover,
.ips-search-button:focus-visible {
    background: #0f2640;
    outline: none;
}

/* ── Results header ── */
.ips-results-header {
    margin: 1.25rem 0;
}

.ips-results-count {
    font-size: 0.95rem;
    color: #4a5568;
}

.ips-no-results {
    font-size: 1rem;
    color: #6b7280;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-left: 4px solid #1a3c5e;
    border-radius: 0 4px 4px 0;
}

.ips-notice {
    font-size: 1rem;
    color: #6b7280;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-radius: 4px;
}

/* ── LIST LAYOUT ── */
.ips-results.ips-layout-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ips-item-list {
    padding: 1.4rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.ips-item-list:last-child {
    border-bottom: none;
}

/* ── GRID LAYOUT ── */
.ips-results.ips-layout-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax(280px, 1fr) );
    gap: 1.5rem;
    margin-top: 1rem;
}

.ips-item-grid {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease;
}

.ips-item-grid:hover {
    box-shadow: 0 4px 16px rgba(26, 60, 94, 0.13);
}

.ips-item-grid .ips-item-thumb {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #eef2f7;
}

.ips-item-grid .ips-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ips-no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16/9;
    background: #eef2f7;
    color: #9bb1c9;
}

.ips-item-grid .ips-item-body {
    padding: 1rem 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ── Shared item parts ── */
.ips-item-meta {
    font-size: 0.8rem;
    color: #7a8fa6;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.3rem;
}

.ips-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.35;
}

.ips-item-title a {
    color: #1a3c5e;
    text-decoration: none;
}

.ips-item-title a:hover {
    text-decoration: underline;
    color: #0f2640;
}

.ips-item-excerpt {
    font-size: 0.92rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    flex: 1;
}

.ips-read-more {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a3c5e;
    text-decoration: none;
    margin-top: auto;
}

.ips-read-more:hover {
    text-decoration: underline;
}

/* ── Keyword highlight ── */
mark.ips-highlight {
    background: #fff3cd;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

/* ── Pagination ── */
.ips-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 2rem 0;
    align-items: center;
}

.ips-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #1a3c5e;
    text-decoration: none;
    font-size: 0.9rem;
    min-width: 2.25rem;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ips-pagination .page-numbers:hover {
    background: #f0f5fa;
    border-color: #1a3c5e;
}

.ips-pagination .page-numbers.current {
    background: #1a3c5e;
    border-color: #1a3c5e;
    color: #fff;
    font-weight: 700;
}

.ips-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    color: #9ca3af;
}

/* ── Responsive ── */
@media (max-width: 540px) {
    .ips-search-button span {
        display: none;
    }

    .ips-search-button {
        padding: 0.75rem 0.9rem;
    }

    .ips-results.ips-layout-grid {
        grid-template-columns: 1fr;
    }
}
