/**
 * Location-based Poojas Styles
 *
 * @package Pandit_Booking
 * @since   2.0.0
 */

/* ============================================
   LOCATION BAR
   ============================================ */
.pb-location-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    font-size: 12px;
}

.pb-location-wrapper a {
    text-decoration: none;
}

.pb-location-wrapper a:hover {
    text-decoration: none;
}

.pb-location-bar {
    background: #ac0505;
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 20px;
}

.pb-location-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pb-location-icon {
    color: #fff;
    display: flex;
    align-items: center;
}

.pb-location-label {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.pb-location-change-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pb-location-change-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: #fff;
}

/* ============================================
   FILTER BAR (Category + Search)
   ============================================ */
.pb-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pb-filter-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pb-filter-bar-right {
    margin-left: auto;
}

.pb-category-filter {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #333;
    background: #fff;
    cursor: pointer;
    min-width: 160px;
    appearance: auto;
}

.pb-category-filter:focus {
    outline: 2px solid #ac0505;
    outline-offset: 1px;
    border-color: #ac0505;
}

.pb-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pb-search-input {
    padding: 8px 14px 8px 34px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #333;
    background: #fff;
    width: 200px;
    transition: border-color 0.2s;
}

.pb-search-input:focus {
    outline: 2px solid #ac0505;
    outline-offset: 1px;
    border-color: #ac0505;
}

.pb-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    display: flex;
}

/* ============================================
   MODAL OVERLAY
   ============================================ */
.pb-location-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pb-location-modal-overlay.pb-modal-active {
    opacity: 1;
    visibility: visible;
}

.pb-location-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.pb-location-modal-overlay.pb-modal-active .pb-location-modal {
    transform: translateY(0) scale(1);
}

.pb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    background: #ac0505;
}

.pb-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pb-modal-header h2 svg {
    flex-shrink: 0;
}

.pb-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.pb-modal-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

.pb-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.pb-modal-desc {
    color: #555;
    font-size: 14px;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* ============================================
   ZONES GRID
   ============================================ */
.pb-zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.pb-zone-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 14px;
    transition: transform 0.2s;
}

.pb-zone-card:hover {
    transform: translateY(-2px);
}

.pb-zone-header {
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #ac0505;
}

.pb-zone-name {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: #ac0505;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pb-zone-locations {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pb-location-btn {
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pb-location-btn:hover {
    background: #ac0505;
    border-color: #ac0505;
    color: #fff;
}

.pb-location-btn:focus {
    outline: 2px solid #ac0505;
    outline-offset: 2px;
}

.pb-location-btn.pb-selected {
    background: #ac0505;
    border-color: #ac0505;
    color: #fff;
}

/* ============================================
   POOJAS SECTION
   ============================================ */
.pb-poojas-section {
    margin-top: 0;
}

.pb-poojas-header {
    margin-bottom: 16px;
}

.pb-poojas-title {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    margin: 0 0 4px;
}

.pb-poojas-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* ============================================
   POOJAS GRID - 6 columns on desktop
   ============================================ */
.pb-poojas-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.pb-pooja-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.pb-pooja-card:hover {
    transform: translateY(-3px);
    border-color: #ac0505;
}

.pb-pooja-card-image {
    width: 100%;
    height: 110px;
    overflow: hidden;
    position: relative;
}

.pb-pooja-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.pb-pooja-card:hover .pb-pooja-card-image img {
    transform: scale(1.05);
}

.pb-pooja-card-body {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pb-pooja-card-name {
    font-size: 12px !important;
    font-weight: 700;
    color: #222;
    margin: 0 0 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none !important;
}

.pb-pooja-card-desc {
    font-size: 11px;
    color: #777;
    margin: 0 0 8px;
    line-height: 1.3;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pb-pooja-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.pb-pooja-meta-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: #555;
}

.pb-pooja-meta-item svg {
    flex-shrink: 0;
    color: #ad7932;
    width: 11px;
    height: 11px;
}

.pb-pooja-card-price {
    font-size: 14px;
    font-weight: 800;
    color: #ad7932;
    margin-bottom: 8px;
}

.pb-pooja-card-price .pb-price-currency {
    font-size: 11px;
    font-weight: 600;
}

.pb-pooja-book-btn {
    display: block;
    width: 100%;
    padding: 7px 10px;
    background: #ac0505;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.pb-pooja-book-btn:hover {
    background: #8a0404;
    color: #fff;
    text-decoration: none;
}

/* ============================================
   LOADING
   ============================================ */
.pb-loading {
    text-align: center;
    padding: 50px 20px;
}

.pb-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #f0f0f0;
    border-top-color: #ac0505;
    border-radius: 50%;
    animation: pb-spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

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

.pb-loading p {
    color: #666;
    font-size: 13px;
    margin: 0;
}

/* ============================================
   NO RESULTS
   ============================================ */
.pb-no-results {
    text-align: center;
    padding: 50px 20px;
    color: #666;
    grid-column: 1 / -1;
}

.pb-no-results svg {
    margin-bottom: 12px;
    opacity: 0.5;
}

.pb-no-results p {
    font-size: 14px;
    margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1400px) {
    .pb-poojas-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1100px) {
    .pb-poojas-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

@media (max-width: 900px) {
    .pb-poojas-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .pb-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .pb-filter-bar-right {
        margin-left: 0;
    }

    .pb-search-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .pb-location-wrapper {
        padding: 0 10px;
    }

    .pb-location-bar {
        padding: 10px 14px;
        border-radius: 8px;
    }

    .pb-location-bar-inner {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pb-location-label {
        font-size: 13px;
        flex: 1 1 auto;
    }

    .pb-location-change-btn {
        padding: 5px 12px;
        font-size: 11px;
    }

    .pb-location-modal {
        max-height: 92vh;
        border-radius: 10px;
        margin: 8px;
    }

    .pb-location-modal-overlay {
        padding: 8px;
    }

    .pb-modal-header {
        padding: 16px 18px;
    }

    .pb-modal-header h2 {
        font-size: 16px;
    }

    .pb-modal-body {
        padding: 16px 18px;
    }

    .pb-zones-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .pb-poojas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .pb-pooja-card-image {
        height: 100px;
    }

    .pb-pooja-card-body {
        padding: 8px;
    }

    .pb-pooja-card-name {
        font-size: 12px;
    }

    .pb-pooja-card-price {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .pb-pooja-book-btn {
        padding: 6px 8px;
        font-size: 11px;
    }

    .pb-poojas-title {
        font-size: 18px;
    }

    .pb-category-filter {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 400px) {
    .pb-zones-grid {
        grid-template-columns: 1fr;
    }

    .pb-poojas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .pb-pooja-card-image {
        height: 80px;
    }

    .pb-pooja-card-desc {
        display: none;
    }

    .pb-pooja-card-meta {
        display: none;
    }

    .pb-pooja-card-price {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .pb-pooja-card-name {
        font-size: 12px;
    }

    .pb-pooja-book-btn {
        padding: 5px 6px;
        font-size: 11px;
        border-radius: 4px;
    }
}
