/* ASI Monument Proximity Check — Tool CSS */

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

/* Map Container */
.asi-map-wrapper {
    padding: 0;
    position: relative;
}
.asi-map-container {
    height: 500px;
    width: 100%;
    border-radius: 0 0 20px 20px;
    z-index: 1;
}
.asi-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;
    transition: opacity 0.5s;
    pointer-events: none;
    white-space: nowrap;
}
.asi-map-instruction.hidden {
    opacity: 0;
}

/* Search Box Overlay */
.asi-search-container {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1000;
    width: 320px;
}
.asi-search-box {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    outline: none;
}
.asi-search-box:focus {
    box-shadow: 0 2px 16px rgba(255,103,37,0.3);
}
.asi-search-box::placeholder {
    color: #999;
}
.asi-search-results {
    display: none;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
}
.asi-search-result-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    color: #333;
    transition: background 0.15s;
}
.asi-search-result-item:last-child { border-bottom: none; }
.asi-search-result-item:hover { background: #fff5f0; }

/* Map Controls */
.asi-map-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.asi-location-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #333;
    transition: all 0.2s;
}
.asi-location-btn:hover {
    background: #ff6725;
    color: #fff;
}
.asi-location-btn.active {
    background: #ff6725;
    color: #fff;
}

/* Legend */
.asi-legend {
    position: absolute;
    bottom: 40px;
    right: 12px;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    font-size: 12px;
    min-width: 170px;
}
.asi-legend h6 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: #333;
}
.asi-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.asi-legend-item:last-child { margin-bottom: 0; }
.asi-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.asi-legend-color.zone-red { background: #dc3545; }
.asi-legend-color.zone-orange { background: #fd7e14; }
.asi-legend-color.zone-yellow { background: #ffc107; }
.asi-legend-color.zone-green { background: #28a745; }
.asi-legend-color.site-marker { background: #7c3aed; }

/* Result Panel */
.asi-result-panel {
    display: none;
    animation: asiSlideUp 0.35s ease;
}
@keyframes asiSlideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
.asi-result-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}
.asi-zone-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}
.asi-zone-badge i { font-size: 16px; }
.asi-zone-badge.zone-red { background: linear-gradient(135deg, #dc3545, #b02a37); }
.asi-zone-badge.zone-orange { background: linear-gradient(135deg, #fd7e14, #e06b0a); }
.asi-zone-badge.zone-yellow { background: linear-gradient(135deg, #ffc107, #e0a800); color: #333; }
.asi-zone-badge.zone-green { background: linear-gradient(135deg, #28a745, #1e7e34); }

.asi-result-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}
.asi-result-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 4px 0 0;
}
.asi-result-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 18px;
}

/* Nearby Sites List */
.asi-nearby-sites {
    margin-bottom: 18px;
}
.asi-nearby-sites h4 {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px;
}
.asi-site-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.asi-site-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.asi-site-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    background: #7c3aed;
}
.asi-site-icon.type-monument { background: #7c3aed; }
.asi-site-icon.type-fort { background: #2563eb; }
.asi-site-icon.type-tomb { background: #6b7280; }
.asi-site-icon.type-castle { background: #0d6efd; }
.asi-site-icon.type-memorial { background: #059669; }
.asi-site-icon.type-ruins { background: #92400e; }
.asi-site-icon.type-archaeological { background: #b45309; }
.asi-site-icon.type-city_gate { background: #7c3aed; }
.asi-site-icon.type-other { background: #6b7280; }
.asi-site-info { flex: 1; min-width: 0; }
.asi-site-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.asi-site-type {
    font-size: 12px;
    color: #6b7280;
    text-transform: capitalize;
}
.asi-site-distance {
    text-align: right;
    flex-shrink: 0;
}
.asi-distance-value {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}
.asi-distance-value.near-red { color: #dc3545; }
.asi-distance-value.near-orange { color: #fd7e14; }
.asi-distance-value.near-yellow { color: #b45309; }
.asi-distance-value.near-green { color: #28a745; }
.asi-distance-label {
    font-size: 11px;
    color: #999;
}

/* Coordinates Display */
.asi-coords {
    font-size: 12px;
    color: #6b7280;
    margin-top: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    display: inline-block;
}
.asi-coords i { color: #ff6725; margin-right: 4px; }

/* Info Cards Grid */
.asi-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.asi-info-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 20px;
}
.asi-info-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff5f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ff6725;
    margin-bottom: 12px;
}
.asi-info-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px;
}
.asi-info-card p {
    font-size: 13px;
    color: #555;
    line-height: 1.65;
    margin: 0;
}

/* Reference Table */
.asi-ref-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    font-size: 13px;
}
.asi-ref-table thead th {
    background: #f8f9fa;
    color: #1f2937;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}
.asi-ref-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    vertical-align: middle;
}
.asi-ref-table tbody tr:last-child td { border-bottom: none; }
.asi-ref-table tbody tr:hover { background: #fafafa; }

/* FAQ Section */
.asi-faq-item {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.asi-faq-item:hover { border-color: #ffd4c2; }
.asi-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    background: #fff;
    transition: background 0.2s;
}
.asi-faq-question:hover { background: #fafafa; }
.asi-faq-question i {
    font-size: 12px;
    color: #999;
    transition: transform 0.3s;
}
.asi-faq-item.open .asi-faq-question i {
    transform: rotate(180deg);
    color: #ff6725;
}
.asi-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.asi-faq-item.open .asi-faq-answer {
    max-height: 500px;
}
.asi-faq-answer p {
    padding: 0 20px 16px;
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin: 0;
}

/* Loading Spinner */
.asi-loading {
    display: none;
    text-align: center;
    padding: 30px;
}
.asi-loading-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff6725;
    margin: 0 4px;
    animation: asiLoadBounce 1.4s ease-in-out infinite both;
}
.asi-loading-dot:nth-child(1) { animation-delay: -0.32s; }
.asi-loading-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes asiLoadBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Responsive */
@media (max-width: 767px) {
    .asi-search-hero-title { font-size: 20px; }
    .asi-map-container { height: 380px; }
    .asi-search-container { width: calc(100% - 64px); }
    .asi-legend { display: none; }
    .asi-info-grid { grid-template-columns: 1fr; }
    .asi-zone-badge { font-size: 13px; padding: 8px 14px; }
    .asi-result-title { font-size: 16px; }
    .asi-ref-table { font-size: 12px; }
    .asi-ref-table thead th,
    .asi-ref-table tbody td { padding: 10px 12px; }
}
@media (max-width: 480px) {
    .asi-search-hero { padding: 24px 18px 16px; }
    .asi-map-container { height: 320px; }
    .asi-site-card { flex-wrap: wrap; }
}
