/* Secure SEO Restaurant Listing — Frontend Styles v7.0 */

.rl-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ============ Filter Bar (redesigned: instant, no page reload) ============ */
/* Explicit resets below (!important) are deliberate: many WP themes and page
   builders apply their own global height/display rules to every <input> and
   <select> on the site for their own forms, which otherwise silently override
   these fields (seen as inputs stretching to fill the full viewport height). */
.rl-wrap input,
.rl-wrap select,
.rl-wrap button {
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    line-height: normal !important;
    display: inline-block !important;
    width: auto !important;
    -webkit-appearance: none;
    appearance: none;
    /* Astra's own "Fix Mobile Usability Issues" doc recommends a global
       :where(select){ overflow:auto; word-break:break-word } snippet for
       Search Console warnings — on Android Chrome this can blow up a native
       <select>'s rendered height. Overriding both explicitly here neutralizes
       it for this plugin's fields without touching that site-wide rule. */
    overflow: visible !important;
    word-break: normal !important;
    white-space: nowrap !important;
}
.rl-wrap select {
    /* Re-add a custom dropdown arrow since -webkit-appearance:none removes the native one */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px !important;
}
.rl-filter-bar {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px;
}
.rl-filter-row {
    display: flex !important;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center !important;
}
.rl-input, .rl-select {
    padding: 10px 14px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 0.95em !important;
    background: #fff !important;
}
.rl-input {
    flex: 1 1 240px !important;
    min-width: 200px !important;
    width: 100% !important;
}
.rl-select {
    flex: 1 1 160px !important;
    min-width: 140px !important;
    width: auto !important;
}
.rl-reset-btn {
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f1f1;
    color: #333 !important;
    white-space: nowrap;
}
.rl-reset-btn:hover { background: #ddd; }

/* Results Summary Bar */
.rl-summary-bar {
    font-size: 0.85em;
    color: #666;
    font-weight: 500;
    margin-bottom: 14px;
    padding: 0 4px;
}

/* ============ Grid & Cards ============ */
.rl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}
.rl-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.rl-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.rl-card.rl-featured {
    border: 2px solid #f5b301;
    box-shadow: 0 4px 14px rgba(245, 179, 1, 0.25);
}
.rl-images {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: #f5f5f5;
}
.rl-images img {
    width: 33.3%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.rl-images img:hover { opacity: 0.85; }

/* Content & Typography */
.rl-content { padding: 20px; }
.rl-content h3 { margin: 0 0 10px; font-size: 1.3em; line-height: 1.3; }
.rl-content h3 a { text-decoration: none; color: #1a1a1a; transition: color 0.2s; }
.rl-content h3 a:hover { color: #0073aa; }
.rl-meta { font-size: 0.85em; color: #666; margin-bottom: 10px; }
.rl-meta span { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.rl-meta a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; color: #666; line-height: 1; }
.rl-meta a:hover { color: #0073aa; }
.rl-meta .dashicons { vertical-align: middle; }
.rl-desc { font-size: 0.9em; line-height: 1.5; color: #444; margin-bottom: 15px; }

/* View Button */
.rl-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #0073aa;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    transition: background 0.2s;
}
.rl-view-btn:hover { background: #005177; }

/* Badges */
.rl-badges { margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.rl-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rl-badge-food { background: #4CAF50; }
.rl-badge-cuisine { background: #FF9800; }
.rl-badge-dish { background: #6d4c41; }
.rl-badge-featured { background: #f5b301; color: #3a2a00; }
.rl-tag-click {
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.15s ease, transform 0.1s ease;
}
.rl-tag-click:hover { filter: brightness(1.12); }
.rl-tag-click:active { transform: scale(0.96); }

/* No Results */
.rl-no-results {
    text-align: center;
    color: #888;
    padding: 30px;
    font-size: 1em;
}

/* ============ Pagination ============ */
.rl-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 30px;
    flex-wrap: wrap;
}
.rl-page-btn {
    padding: 7px 13px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.rl-page-btn:hover:not(:disabled) { background: #f1f1f1; }
.rl-page-btn.active { background: #0073aa; color: #fff; border-color: #0073aa; }
.rl-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============ Lightbox ============ */
.rl-lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.88);
}
.rl-lightbox-content {
    margin: auto;
    display: block;
    max-width: 88%;
    max-height: 85%;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 8px;
}
.rl-lightbox-close {
    position: absolute;
    top: 18px;
    right: 28px;
    color: #fff;
    font-size: 38px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000;
}

/* ============ Single Page Styles ============ */
.rl-single-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.rl-single-images {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
}
.rl-single-images img {
    width: 33.3%;
    height: 250px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.rl-single-images img:hover { opacity: 0.9; }
.rl-single-title {
    font-size: 2em;
    margin: 0 0 10px;
    color: #1a1a1a;
}
.rl-single-info {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-bottom: 25px;
}
.rl-single-info p {
    margin: 0 0 12px;
    font-size: 1.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.rl-single-info p:last-child { margin-bottom: 0; }
.rl-single-info a { text-decoration: none; color: #0073aa; font-weight: 500; }
.rl-single-info a:hover { text-decoration: underline; }

/* Single Action Buttons */
.rl-single-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.rl-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    border-radius: 8px;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 1em;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}
.rl-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
.rl-action-call { background: #0073aa; }
.rl-action-wa { background: #25D366; }
.rl-action-map { background: #4285F4; }

.rl-single-desc {
    line-height: 1.7;
    font-size: 1.05em;
    color: #333;
    margin-bottom: 30px;
}

/* Back Link */
.rl-back-link {
    margin: 25px 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.rl-back-link a {
    text-decoration: none;
    color: #0073aa;
    font-weight: 600;
    font-size: 0.95em;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.rl-back-link a:hover { color: #005177; }

/* Responsive */
@media (max-width: 600px) {
    .rl-grid { grid-template-columns: 1fr; }
    .rl-single-images { flex-direction: column; }
    .rl-single-images img { width: 100%; height: 200px; }
    .rl-filter-row { flex-direction: column; align-items: stretch; }
    .rl-single-actions { flex-direction: column; }
    .rl-action-btn { justify-content: center; }
}
