/* Burial Ground Check Tool — prefix: bgc- */
/* Theme: #FF6725 (Orange) */

/* ===============================================
   HERO SECTION
   =============================================== */
.bgc-search-hero {
    background: linear-gradient(135deg, #ff6725 0%, #ff8f5c 50%, #ffb88c 100%);
    padding: 32px 28px 22px;
    border-radius: 20px 20px 0 0;
    position: relative;
    overflow: hidden;
}
.bgc-search-hero-decoration {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
.bgc-search-hero-decoration::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 30px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}
.bgc-search-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.bgc-search-hero-badge i { font-size: 11px; }
.bgc-search-hero-title {
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.2;
}
.bgc-search-hero-desc {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    margin: 0;
}
.bgc-search-hero-desc a {
    color: #ffe0cc;
    text-decoration: underline;
    font-weight: 500;
}
.bgc-search-hero-desc a:hover {
    color: #fff5f0;
    text-decoration: none;
}

/* ===============================================
   MAP CONTAINER
   =============================================== */
.bgc-map-wrapper {
    padding: 24px;
    border-radius: 0 0 20px 20px !important;
}
#bgc-map {
    height: 500px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    z-index: 1;
}
.bgc-map-container {
    position: relative;
}
.bgc-map-instruction {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    z-index: 1000;
    pointer-events: none;
    transition: opacity 0.3s;
    white-space: nowrap;
}
.bgc-map-instruction.hidden {
    opacity: 0;
}

/* Search box */
.bgc-search-container {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1000;
    width: 320px;
}
.bgc-search-box {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    outline: none;
}
.bgc-search-box:focus {
    border-color: #ff6725;
    box-shadow: 0 2px 10px rgba(255,103,37,0.2);
}
.bgc-search-results {
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 200px;
    overflow-y: auto;
    display: none;
}
.bgc-search-result-item {
    padding: 10px 16px;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #f3f4f6;
}
.bgc-search-result-item:hover {
    background: #fff5f0;
}
.bgc-search-result-item:last-child {
    border-bottom: none;
}

/* GPS button */
.bgc-controls-container {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bgc-location-button {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #ff6725;
    transition: all 0.2s;
}
.bgc-location-button:hover {
    background: #fff5f0;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Legend */
.bgc-legend {
    position: absolute;
    bottom: 60px;
    right: 12px;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-size: 12px;
    min-width: 170px;
}
.bgc-legend h6 {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
}
.bgc-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.bgc-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}
.bgc-legend-color.religion-muslim { background: #2ecc71; }
.bgc-legend-color.religion-hindu { background: #ff6725; }
.bgc-legend-color.religion-christian { background: #3498db; }
.bgc-legend-color.religion-unknown { background: #95a5a6; }

/* Loading overlay */
.bgc-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    border-radius: 12px;
}
.bgc-loading-overlay.active {
    display: flex;
}

/* ===============================================
   RESULT PANEL
   =============================================== */
#bgc-result {
    display: none;
}
.bgc-result-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}
.bgc-risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 10px;
}
.bgc-risk-badge.risk-red {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.bgc-risk-badge.risk-orange {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}
.bgc-risk-badge.risk-yellow {
    background: #fefce8;
    color: #854d0e;
    border: 1px solid #fef08a;
}
.bgc-risk-badge.risk-green {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.bgc-result-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
}
.bgc-result-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 20px;
}
.bgc-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.bgc-info-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid #f3f4f6;
}
.bgc-info-item .label {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.bgc-info-item .value {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

/* Nearby burial grounds list */
.bgc-nearby-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.bgc-nearby-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #f3f4f6;
    margin-bottom: 8px;
    transition: all 0.2s;
}
.bgc-nearby-item:hover {
    background: #fff5f0;
    border-color: #ffd4c2;
}
.bgc-nearby-item .bgc-nearby-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    color: #fff;
}
.bgc-nearby-item .bgc-nearby-icon.muslim { background: #2ecc71; }
.bgc-nearby-item .bgc-nearby-icon.hindu { background: #ff6725; }
.bgc-nearby-item .bgc-nearby-icon.christian { background: #3498db; }
.bgc-nearby-item .bgc-nearby-icon.unknown { background: #95a5a6; }
.bgc-nearby-info {
    flex: 1;
    min-width: 0;
}
.bgc-nearby-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bgc-nearby-meta {
    font-size: 12px;
    color: #9ca3af;
}
.bgc-nearby-distance {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

/* ===============================================
   INFO CARDS
   =============================================== */
.bgc-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}
.bgc-info-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #f3f4f6;
    transition: all 0.2s;
}
.bgc-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.bgc-info-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #fff5f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ff6725;
    margin-bottom: 12px;
}
.bgc-info-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}
.bgc-info-card p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* ===============================================
   REFERENCE TABLE
   =============================================== */
.bgc-ref-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}
.bgc-ref-table thead th {
    background: #ff6725;
    color: #fff;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    white-space: nowrap;
}
.bgc-ref-table tbody td {
    padding: 11px 16px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: top;
}
.bgc-ref-table tbody tr:last-child td { border-bottom: none; }
.bgc-ref-table tbody tr:hover { background: #fff5f0; }

/* ===============================================
   FAQ
   =============================================== */
.bgc-faq-item {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s;
}
.bgc-faq-item.open { border-color: #ff6725; }
.bgc-faq-question {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 15px;
    color: #333;
    background: #fafafa;
}
.bgc-faq-question i {
    transition: transform 0.3s;
    color: #ff6725;
}
.bgc-faq-item.open .bgc-faq-question i { transform: rotate(180deg); }
.bgc-faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
    color: #555;
    font-size: 14px;
    line-height: 1.7;
}
.bgc-faq-item.open .bgc-faq-answer {
    padding: 0 20px 16px;
    max-height: 500px;
}

/* ===============================================
   RESPONSIVE
   =============================================== */
@media (max-width: 767px) {
    .bgc-search-hero { padding: 22px 18px 18px; border-radius: 16px 16px 0 0; }
    .bgc-search-hero-title { font-size: 20px; }
    #bgc-map { height: 380px; }
    .bgc-search-container { width: 220px; }
    .bgc-legend { display: none; }
    .bgc-info-grid { grid-template-columns: 1fr; }
    .bgc-info-cards { grid-template-columns: 1fr; }
    .bgc-ref-table { font-size: 12px; }
    .bgc-ref-table thead th, .bgc-ref-table tbody td { padding: 8px 10px; }
    .bgc-map-instruction { font-size: 11px; padding: 8px 14px; }
}
