/**
 * Heritage Zone Check CSS
 * Orange Theme (#ff6725)
 * Zone Colors: Prohibited=#dc3545, Regulated=#fd7e14, Safe=#28a745
 */

:root {
    --hz-primary: #ff6725;
    --hz-primary-dark: #e55a1f;
    --hz-primary-light: #ff8f5c;
    --hz-primary-lighter: #ffb88c;
    --hz-prohibited: #dc3545;
    --hz-regulated: #fd7e14;
    --hz-safe: #28a745;
    --hz-monument: #6f42c1;
}

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

/* ===== Map Container ===== */
#map {
    height: 500px !important;
    width: 100% !important;
    border-radius: 0 0 20px 20px;
    border: none;
    position: relative;
    z-index: 1;
}

.map-container {
    position: relative;
    width: 100%;
    height: 500px;
}

/* Map Instruction Overlay */
#mapInstruction {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    white-space: nowrap;
}
#mapInstruction.visible {
    opacity: 1;
}

/* ===== Search Box ===== */
.survey-map-search-container,
.map-controls-container {
    position: absolute !important;
    z-index: 500 !important;
}

.survey-map-search-container {
    top: 15px;
    left: 15px;
    width: 350px;
}

.map-controls-container {
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
}

.survey-map-search-box {
    width: 100%;
    padding: 12px 20px;
    border-radius: 25px;
    border: 2px solid #ff6725;
    background: white;
    box-shadow: 0 3px 10px rgba(255, 103, 37, 0.15);
    font-size: 14px;
    transition: all 0.3s;
}
.survey-map-search-box:focus {
    outline: none;
    border-color: #ff8f5c;
    box-shadow: 0 3px 15px rgba(255, 103, 37, 0.25);
}

/* Search Results Dropdown */
.survey-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #ff6725;
    border-top: none;
    border-radius: 0 0 15px 15px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(255, 103, 37, 0.15);
    z-index: 600;
    display: none;
    margin-top: -2px;
}
.survey-search-results div {
    padding: 14px 20px;
    border-bottom: 1px solid #f5f5f5;
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
    transition: all 0.2s;
    font-size: 14px;
}
.survey-search-results div:hover {
    background: #fff5f0;
    padding-left: 25px;
    color: #ff6725;
}

/* ===== Location Button ===== */
#currentLocationBtn,
.location-button {
    background: white;
    border: 2px solid #ff6725;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
    box-shadow: 0 3px 10px rgba(255, 103, 37, 0.15);
    transition: all 0.3s;
    color: #ff6725;
    font-size: 18px;
}
#currentLocationBtn:hover,
.location-button:hover {
    background: linear-gradient(135deg, #ff6725, #ff8f5c);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 103, 37, 0.3);
}

/* ===== Map Legend ===== */
.map-legend,
#mapLegend {
    position: absolute !important;
    bottom: 20px !important;
    left: 20px !important;
    z-index: 1000 !important;
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid #ff672520;
    width: 175px;
}
.map-legend h6 {
    margin: 0 0 10px 0;
    color: #ff6725;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
    color: #2d3748;
}
.legend-item:last-child {
    margin-bottom: 0;
}
.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-right: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}
.legend-color.hz-prohibited {
    background: #dc3545;
}
.legend-color.hz-regulated {
    background: #fd7e14;
}
.legend-color.hz-safe {
    background: #28a745;
}
.legend-color.hz-monument {
    background: #6f42c1;
}
.legend-color.hz-selected {
    background: #ff6725;
}

/* ===== Loader ===== */
#loader {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    text-align: center;
    z-index: 9999;
    display: none;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
#loader .loader-content {
    background: rgba(255, 255, 255, 0.98);
    padding: 30px 40px;
    min-width: 280px;
    max-width: 350px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.loader-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--hz-primary);
    border-radius: 50%;
    animation: hzSpin 1s linear infinite;
}
@keyframes hzSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loader-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}
.loader-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}
.loader-dots {
    display: inline-block;
    animation: hzDots 1.5s steps(4, end) infinite;
}
@keyframes hzDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}
.loader-progress {
    width: 100%;
    height: 4px;
    background: #f3f3f3;
    border-radius: 2px;
    overflow: hidden;
}
.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--hz-primary), var(--hz-primary-light));
    animation: hzProgressBar 2s ease-in-out infinite;
}
@keyframes hzProgressBar {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ===== Result Cards ===== */
.result-card {
    position: absolute !important;
    bottom: 20px !important;
    left: 20px !important;
    width: 420px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    z-index: 1000 !important;
    animation: hzSlideInUp 0.4s ease;
    display: none;
    overflow: hidden;
}
@keyframes hzSlideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.result-card .card-header {
    padding: 18px 24px;
    background: linear-gradient(135deg, #FF6725 0%, #FF8A56 100%);
    color: white;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.result-card .card-body {
    padding: 20px 24px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 450px;
    background: white;
}

/* ===== Zone Badge ===== */
.hz-zone-badge-wrapper {
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 16px;
}
.hz-zone-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.hz-zone-badge.zone-prohibited {
    background: #dc354520;
    color: #dc3545;
}
.hz-zone-badge.zone-regulated {
    background: #fd7e1420;
    color: #fd7e14;
}
.hz-zone-badge.zone-safe {
    background: #28a74520;
    color: #28a745;
}
.hz-distance-text {
    font-size: 13px;
    color: #718096;
    font-weight: 500;
}

/* ===== Property Header ===== */
.property-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}
.property-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #FF6725 0%, #FF8A56 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 103, 37, 0.25);
    flex-shrink: 0;
}
.property-icon.hz-monument-icon {
    background: linear-gradient(135deg, #6f42c1 0%, #9b6fd4 100%);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.25);
}
.property-title h5 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: -0.3px;
}
.property-title p {
    margin: 0;
    font-size: 13px;
    color: #718096;
    font-weight: 500;
}

/* ===== Info Grid ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.info-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}
.info-item:hover {
    border-color: #ff672540;
    box-shadow: 0 4px 12px rgba(255, 103, 37, 0.08);
    transform: translateY(-2px);
}
.info-item-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ff672510 0%, #ff672508 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #ff6725;
    flex-shrink: 0;
}
.info-item-content {
    flex: 1;
    min-width: 0;
}
.info-item-label {
    font-size: 10px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}
.info-item-value {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    word-break: break-word;
}

/* ===== Regulation Sections ===== */
.regulation-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    margin-top: 12px;
}
.regulation-header {
    margin: 0 0 10px 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.regulation-header.regulations {
    color: #dc3545;
}
.regulation-header.approval {
    color: #fd7e14;
}
.regulation-header.property-buyer {
    color: #17a2b8;
}
.hz-regulation-status {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-block;
}
.hz-regulation-status.status-prohibited {
    background: #dc354515;
    color: #dc3545;
}
.hz-regulation-status.status-regulated {
    background: #fd7e1415;
    color: #fd7e14;
}
.hz-regulation-status.status-safe {
    background: #28a74515;
    color: #28a745;
}

.regulation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.regulation-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
    color: #374151;
    font-size: 12px;
    line-height: 1.6;
}
.regulation-list li:last-child {
    margin-bottom: 0;
}
.regulation-list li:before {
    content: "\2022";
    position: absolute;
    left: 0;
    width: 18px;
    height: 18px;
    background: #dc3545;
    color: white;
    font-weight: bold;
    font-size: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 1px;
}
.regulation-list.hz-permissions-list li:before {
    background: #28a745;
}

/* ===== Nearby Monuments List ===== */
.hz-nearby-list {
    max-height: 180px;
    overflow-y: auto;
}
.hz-nearby-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    transition: all 0.2s;
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
}
.hz-nearby-item:hover {
    border-color: #ff672540;
    box-shadow: 0 2px 8px rgba(255,103,37,0.08);
}
.hz-nearby-item:last-child {
    margin-bottom: 0;
}
.hz-nearby-item-name {
    font-weight: 600;
    color: #2d3748;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hz-nearby-item-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    margin-left: 8px;
}
.hz-nearby-item-badge.badge-prohibited {
    background: #dc354520;
    color: #dc3545;
}
.hz-nearby-item-badge.badge-regulated {
    background: #fd7e1420;
    color: #fd7e14;
}
.hz-nearby-item-badge.badge-safe {
    background: #28a74520;
    color: #28a745;
}

/* ===== Close Buttons ===== */
#closeResult,
#closeSafe {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}
#closeResult:hover,
#closeSafe:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ===== Content Animation ===== */
.land-details-section {
    animation: hzFadeInContent 0.5s ease;
}
@keyframes hzFadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Monument Popup ===== */
.hz-monument-popup {
    font-size: 13px;
    line-height: 1.5;
    min-width: 200px;
}
.hz-monument-popup h6 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: #1a202c;
}
.hz-monument-popup .hz-popup-type {
    font-size: 11px;
    color: #6f42c1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}
.hz-monument-popup .hz-popup-detail {
    font-size: 12px;
    color: #4a5568;
    margin-bottom: 2px;
}

/* ===== Scrollbar Styling ===== */
.result-card .card-body::-webkit-scrollbar,
.hz-nearby-list::-webkit-scrollbar {
    width: 6px;
}
.result-card .card-body::-webkit-scrollbar-track,
.hz-nearby-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.result-card .card-body::-webkit-scrollbar-thumb,
.hz-nearby-list::-webkit-scrollbar-thumb {
    background: var(--hz-primary);
    border-radius: 10px;
}

/* ===== FAQ Section ===== */
.hz-faq-section {
    margin-top: 20px;
}
.hz-faq-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.3s;
}
.hz-faq-item:hover {
    border-color: #ff672540;
    box-shadow: 0 2px 10px rgba(255, 103, 37, 0.06);
}
.hz-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
    font-weight: 600;
    font-size: 15px;
    color: #2d3748;
    gap: 12px;
    min-height: 56px;
}
.hz-faq-question i {
    color: #ff6725;
    font-size: 13px;
    transition: transform 0.3s;
    flex-shrink: 0;
}
.hz-faq-item.open .hz-faq-question i {
    transform: rotate(180deg);
}
.hz-faq-answer {
    display: none;
    padding: 0 20px 16px;
    font-size: 14px;
    color: #4a5568;
    line-height: 1.7;
}
.hz-faq-item.open .hz-faq-answer {
    display: block;
}
.hz-faq-answer p {
    margin: 0;
}

/* ===== Map Disabled ===== */
.map-disabled {
    pointer-events: none;
    opacity: 0.6;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hz-search-hero {
        padding: 24px 20px 18px;
    }
    .hz-search-hero-title {
        font-size: 20px;
    }
    .hz-search-hero-desc {
        font-size: 13px;
    }

    #map {
        height: 400px !important;
    }
    .map-container {
        height: 400px;
    }

    .result-card {
        width: calc(100% - 20px);
        left: 10px !important;
        right: 10px;
        bottom: 10px !important;
    }
    .result-card .card-body {
        max-height: 350px;
    }

    .map-legend,
    #mapLegend {
        bottom: 60px !important;
        left: 10px !important;
        font-size: 11px;
        width: 155px;
        padding: 10px;
    }

    .survey-map-search-container {
        width: calc(100% - 80px);
        left: 10px;
    }

    .map-controls-container {
        top: 10px;
        right: 10px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .property-header {
        gap: 12px;
    }
    .property-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    .property-title h5 {
        font-size: 16px;
    }

    .hz-faq-question {
        font-size: 14px;
        padding: 14px 16px;
    }
    .hz-faq-answer {
        font-size: 13px;
        padding: 0 16px 14px;
    }

    #mapInstruction {
        font-size: 12px;
        padding: 8px 16px;
        white-space: normal;
        text-align: center;
        max-width: 80%;
    }
}

@media (max-width: 480px) {
    #map {
        height: 350px !important;
    }
    .map-container {
        height: 350px;
    }
    .result-card .card-body {
        max-height: 300px;
    }
    .hz-zone-badge {
        font-size: 13px;
        padding: 6px 14px;
    }
}

/* ===== Print Styles ===== */
@media print {
    .hz-search-hero,
    .survey-map-search-container,
    .map-controls-container,
    .map-legend,
    #mapLegend,
    #mapInstruction,
    #loader,
    #hzSafeCard,
    #hz-results-actions,
    #currentLocationBtn,
    #closeResult,
    #closeSafe,
    .location-button,
    nav[aria-label="breadcrumb"],
    .hz-faq-section,
    #tool-article,
    .dashboard-aside,
    .dash-aside-navbar,
    header,
    footer {
        display: none !important;
    }

    .result-card {
        position: relative !important;
        width: 100% !important;
        left: auto !important;
        bottom: auto !important;
        box-shadow: none !important;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .result-card .card-body {
        max-height: none;
        overflow: visible;
    }

    #map {
        height: 300px !important;
    }

    body::after {
        content: "Source: tg.verified.realestate | Heritage Zone Check";
        display: block;
        text-align: center;
        font-size: 11px;
        color: #999;
        margin-top: 20px;
        padding-top: 10px;
        border-top: 1px solid #ddd;
    }
}
