/* =============================================
   Joomla-Style Search – assets/custom-search.css
   Author: Jannica Nadala
   Version: 1.0.1
   ============================================= */

.cs-wrapper {
    font-family: inherit;
    max-width: 900px;
    margin: 0 auto;
}

/* ── Form Box ── */
.cs-form-box {
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 20px 24px;
    background: #fff;
    margin-bottom: 20px;
}

.cs-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.cs-row:last-child {
    margin-bottom: 0;
}

.cs-keyword-row {
    align-items: center;
}

.cs-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    min-width: 120px;
    padding-top: 2px;
}

/* ── Minimum chars notice ── */
.cs-min-notice {
    font-size: 13px;
    color: #c0392b;
    background: #fdf2f2;
    border: 1px solid #f5c6c6;
    border-radius: 3px;
    padding: 7px 12px;
    margin-bottom: 10px;
}

/* ── Inputs ── */
.cs-input {
    flex: 1;
    max-width: 320px;
    padding: 7px 10px;
    border: 1px solid #bbb;
    border-radius: 3px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}

.cs-input:focus {
    border-color: #2a7f8f;
    box-shadow: 0 0 0 2px rgba(42,127,143,0.15);
}

.cs-select {
    padding: 7px 10px;
    border: 1px solid #bbb;
    border-radius: 3px;
    font-size: 14px;
    color: #333;
    background: #fff;
    cursor: pointer;
    outline: none;
}

.cs-select:focus {
    border-color: #2a7f8f;
}

/* ── Button ── */
.cs-btn {
    background: #2a7f8f;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 7px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.cs-btn:hover  { background: #1f6570; }
.cs-btn:active { background: #185860; }

/* ── Radio & Checkbox Groups ── */
.cs-radio-group,
.cs-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    padding-top: 3px;
}

.cs-radio-group label,
.cs-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #444;
    cursor: pointer;
}

.cs-radio-group input[type="radio"],
.cs-checkbox-group input[type="checkbox"] {
    accent-color: #2a7f8f;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* ── Loading ── */
.cs-loading {
    text-align: center;
    padding: 20px;
    font-size: 14px;
    color: #666;
}

.cs-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top-color: #2a7f8f;
    border-radius: 50%;
    animation: cs-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

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

/* ── Results Box ── */
.cs-results {
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.cs-results-header {
    background: #f5f5f5;
    border-bottom: 1px solid #d0d0d0;
    padding: 10px 16px;
    font-size: 13px;
    color: #555;
}

.cs-results-header strong { color: #222; }

/* ── Single Result Item ── */
.cs-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid #eee;
    transition: background 0.15s;
}

.cs-item:last-child  { border-bottom: none; }
.cs-item:hover       { background: #f9f9f9; }

.cs-item-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.cs-item-thumb-placeholder {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    background: #eee;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 24px;
}

.cs-item-body  { flex: 1; min-width: 0; }

.cs-item-title {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.cs-item-title a { color: #2a7f8f; text-decoration: none; }
.cs-item-title a:hover { text-decoration: underline; }

.cs-item-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

.cs-item-meta span { margin-right: 10px; }

.cs-item-excerpt {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.cs-item-excerpt mark {
    background: #fff3cd;
    color: #333;
    padding: 0 2px;
    border-radius: 2px;
}

/* ── No Results ── */
.cs-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 14px;
}

.cs-no-results strong {
    display: block;
    font-size: 16px;
    color: #555;
    margin-bottom: 6px;
}

/* ── Pagination ── */
.cs-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 14px 16px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.cs-page-btn {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 5px 11px;
    font-size: 13px;
    cursor: pointer;
    color: #444;
    transition: all 0.15s;
}

.cs-page-btn:hover         { border-color: #2a7f8f; color: #2a7f8f; }
.cs-page-btn.active        { background: #2a7f8f; border-color: #2a7f8f; color: #fff; font-weight: 600; cursor: default; }
.cs-page-btn:disabled      { opacity: 0.4; cursor: not-allowed; }

.cs-ellipsis {
    padding: 5px 4px;
    color: #999;
    font-size: 13px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .cs-row            { flex-direction: column; gap: 8px; }
    .cs-label          { min-width: unset; }
    .cs-input          { max-width: 100%; width: 100%; }
    .cs-item           { flex-direction: column; }
    .cs-item-thumb,
    .cs-item-thumb-placeholder { width: 100%; height: 160px; }
}
