/* Quarry Zone Check - CSS */
/* Prefix: qzc- | Theme: #FF6725 (Orange) */

/* ===============================================
   HERO SECTION
   =============================================== */
.qzc-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;
}
.qzc-search-hero-decoration {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
.qzc-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);
}
.qzc-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;
}
.qzc-search-hero-badge i { font-size: 11px; }
.qzc-search-hero-title {
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.2;
}
.qzc-search-hero-desc {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    margin: 0;
}
.qzc-search-hero-desc a {
    color: #ffe0cc;
    text-decoration: underline;
    font-weight: 500;
}
.qzc-search-hero-desc a:hover {
    color: #fff5f0;
    text-decoration: none;
}

/* ===============================================
   MAP SECTION
   =============================================== */
.qzc-map-card {
    padding: 24px;
    border-radius: 0 0 20px 20px !important;
}
#qzc-map {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    z-index: 1;
}
.qzc-map-container {
    position: relative;
}
.qzc-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: 500;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}
.qzc-map-instruction.hidden {
    opacity: 0;
    pointer-events: none;
}

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

/* Map controls */
.qzc-map-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.qzc-gps-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    font-size: 16px;
    color: #ff6725;
    transition: all 0.2s;
}
.qzc-gps-btn:hover {
    background: #fff5f0;
    border-color: #ff6725;
}

/* Legend */
.qzc-legend {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(255,255,255,0.95);
    padding: 12px 16px;
    border-radius: 10px;
    z-index: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-size: 12px;
    max-width: 200px;
}
.qzc-legend h6 {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
}
.qzc-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.qzc-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}
.qzc-legend-color.zone-red { background: #dc3545; }
.qzc-legend-color.zone-orange { background: #fd7e14; }
.qzc-legend-color.zone-yellow { background: #ffc107; }
.qzc-legend-color.zone-green { background: #28a745; }

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

/* Nearby quarries table */
.qzc-nearby-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 16px;
}
.qzc-nearby-table thead th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #e5e7eb;
}
.qzc-nearby-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
}
.qzc-nearby-table tbody tr:last-child td { border-bottom: none; }
.qzc-nearby-table tbody tr:hover { background: #fff5f0; }
.qzc-dist-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.qzc-dist-badge.danger { background: #fef2f2; color: #991b1b; }
.qzc-dist-badge.high { background: #fff7ed; color: #9a3412; }
.qzc-dist-badge.moderate { background: #fefce8; color: #854d0e; }
.qzc-dist-badge.safe { background: #f0fdf4; color: #166534; }

/* ===============================================
   INFO CARDS
   =============================================== */
.qzc-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.qzc-info-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e9ecef;
    padding: 22px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.qzc-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.qzc-info-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #fff5f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 20px;
    color: #ff6725;
}
.qzc-info-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}
.qzc-info-card p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

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

/* ===============================================
   FAQ
   =============================================== */
.qzc-faq-item {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.qzc-faq-item:hover {
    border-color: #ff6725;
}
.qzc-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    background: #fff;
    gap: 12px;
}
.qzc-faq-question i {
    color: #ff6725;
    font-size: 12px;
    transition: transform 0.3s;
    flex-shrink: 0;
}
.qzc-faq-item.open .qzc-faq-question i {
    transform: rotate(180deg);
}
.qzc-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.qzc-faq-item.open .qzc-faq-answer {
    max-height: 500px;
    padding: 0 18px 14px;
}
.qzc-faq-answer p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin: 0;
}

/* ===============================================
   LOADING SPINNER
   =============================================== */
.qzc-loader {
    display: none;
    text-align: center;
    padding: 30px;
}
.qzc-loader.active {
    display: block;
}

/* ===============================================
   RESPONSIVE
   =============================================== */
@media (max-width: 768px) {
    .qzc-search-hero-title { font-size: 20px; }
    .qzc-search-hero-desc { font-size: 13px; }
    .qzc-search-hero { padding: 24px 20px 18px; }
    #qzc-map { height: 380px; }
    .qzc-search-container { width: calc(100% - 60px); }
    .qzc-legend { display: none; }
    .qzc-info-grid { grid-template-columns: 1fr 1fr; }
    .qzc-info-cards { grid-template-columns: 1fr; }
    .qzc-ref-table { font-size: 12px; }
    .qzc-ref-table thead th,
    .qzc-ref-table tbody td { padding: 8px 10px; }
}
@media (max-width: 480px) {
    #qzc-map { height: 320px; }
    .qzc-info-grid { grid-template-columns: 1fr; }
    .qzc-search-container { width: calc(100% - 24px); left: 6px; }
}
