/* GIS Tools Common Styles - Shared across all GIS check tools */
/* Based on Verify My Land styling */

/* Root Variables */
:root {
    --primary-color: #ff6725;
    --primary-hover: #e55510;
    --primary-light: #ff8a50;
    --primary-bg: #fff5f0;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #333;
    --gray-color: #666;
    --light-gray: #999;
    --bg-gray: #f8f9fa;
    --border-gray: #e9ecef;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-orange: 0 15px 40px rgba(255, 103, 37, 0.25);
    --transition: all 0.3s ease;
}

/* ===============================================
   ANIMATIONS
   =============================================== */

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes markerDrop {
    0% { transform: translateY(-100px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes markerPulse {
    0%, 100% { box-shadow: 0 5px 25px rgba(255, 103, 37, 0.6), 0 0 0 0 rgba(255, 103, 37, 0.7); }
    50% { box-shadow: 0 5px 25px rgba(255, 103, 37, 0.6), 0 0 0 20px rgba(255, 103, 37, 0); }
}

@keyframes loadingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

/* ===============================================
   HEADER SECTION
   =============================================== */

.gis-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 50px 0;
    margin-bottom: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-orange);
    position: relative;
    overflow: hidden;
}

.gis-header-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

.gis-header-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.header-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.header-icon-wrapper i {
    font-size: 40px;
    color: white;
}

.gis-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.6s ease;
}

.gis-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    animation: fadeInUp 0.6s ease 0.2s;
    animation-fill-mode: both;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

/* ===============================================
   MAP SECTION
   =============================================== */

.gis-map-section {
    padding: 30px;
    background: white;
    border-radius: 20px;
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--dark-color);
    position: relative;
    padding-left: 30px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 25px;
    background: var(--primary-color);
    border-radius: 3px;
}

.gis-map-container {
    position: relative;
    height: 550px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: #f0f0f0;
}

.gis-map-container #map {
    height: 100%;
    width: 100%;
    z-index: 1;
}

/* Map Instruction */
.map-instruction {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 25px;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    font-size: 14px;
    color: var(--dark-color);
    z-index: 900;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.map-instruction.visible {
    opacity: 1;
}

.map-instruction i {
    color: var(--primary-color);
}

/* ===============================================
   SEARCH BOX
   =============================================== */

.gis-search-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 900;
    width: 350px;
}

.gis-search-wrapper {
    position: relative;
    width: 100%;
}

.gis-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    font-size: 16px;
}

.gis-search-input {
    width: 100%;
    padding: 14px 45px 14px 45px;
    border: none;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    transition: var(--transition);
    background: white;
}

.gis-search-input:focus {
    outline: none;
    box-shadow: 0 8px 30px rgba(255, 103, 37, 0.25);
    transform: translateY(-2px);
}

.gis-search-input::placeholder {
    color: var(--light-gray);
}

.gis-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    max-height: 350px;
    overflow-y: auto;
    display: none;
    z-index: 1002;
}

.gis-search-result-item {
    padding: 12px 20px;
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-gray);
}

.gis-search-result-item:last-child {
    border-bottom: none;
}

.gis-search-result-item:hover {
    background: var(--primary-bg);
    color: var(--primary-color);
}

/* ===============================================
   MAP CONTROLS
   =============================================== */

.gis-map-controls {
    position: absolute;
    bottom: 30px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 900;
}

.gis-control-btn {
    width: 50px;
    height: 50px;
    background: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
    transition: var(--transition);
}

.gis-control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 103, 37, 0.3);
}

.gis-control-btn i {
    color: var(--primary-color);
    font-size: 20px;
}

.gis-control-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.gis-control-btn.active i {
    color: white;
}

/* ===============================================
   LOADER
   =============================================== */

.gis-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
}

.gis-loader.show {
    display: flex;
}

.loading-animation {
    display: flex;
    gap: 8px;
}

.loading-circle {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: loadingBounce 1.4s infinite ease-in-out both;
}

.loading-circle:nth-child(1) { animation-delay: -0.32s; }
.loading-circle:nth-child(2) { animation-delay: -0.16s; }

.loading-text {
    color: var(--gray-color);
    font-weight: 500;
    margin-top: 20px;
}

/* ===============================================
   RESULT CARD
   =============================================== */

.gis-result-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-top: 30px;
    display: none;
    animation: fadeInUp 0.5s ease;
}

.gis-result-card.show {
    display: block;
}

.gis-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-gray);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.gis-result-header h5 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.gis-result-header .close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
    transition: var(--transition);
}

.gis-result-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.gis-result-body {
    padding: 25px;
}

/* Status Badge */
.gis-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.gis-status-badge.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.gis-status-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.gis-status-badge.danger {
    background: #ffebee;
    color: #c62828;
}

.gis-status-badge.info {
    background: #e3f2fd;
    color: #1565c0;
}

/* Info Grid */
.gis-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.gis-info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: var(--bg-gray);
    border-radius: 12px;
    transition: var(--transition);
}

.gis-info-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.gis-info-item i {
    font-size: 20px;
    color: var(--primary-color);
    margin-top: 3px;
}

.gis-info-item .info-content {
    flex: 1;
}

.gis-info-item .info-label {
    display: block;
    font-size: 12px;
    color: var(--gray-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.gis-info-item .info-value {
    font-size: 15px;
    color: var(--dark-color);
    font-weight: 600;
}

/* ===============================================
   CTA SECTION
   =============================================== */

.gis-cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 15px;
    padding: 25px 30px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.gis-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 150px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='rgba(255,255,255,0.1)' d='M0 100 Q 50 50 100 100 L 100 0 L 0 0 Z'/%3E%3C/svg%3E") no-repeat center right;
    background-size: cover;
}

.gis-cta-section h4 {
    color: white;
    margin-bottom: 10px;
    font-size: 18px;
    position: relative;
    z-index: 1;
}

.gis-cta-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.gis-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--primary-color);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.gis-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    color: var(--primary-hover);
}

/* ===============================================
   CUSTOM MARKER
   =============================================== */

.gis-marker {
    background: transparent;
    border: none;
}

.gis-marker-inner {
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    border: 4px solid white;
    border-radius: 50%;
    box-shadow: 0 5px 25px rgba(255, 103, 37, 0.6);
    position: relative;
}

.gis-marker-inner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.gis-marker.animate {
    animation: markerDrop 0.5s ease, markerPulse 2s ease-in-out infinite;
}

/* ===============================================
   LEGEND
   =============================================== */

.gis-legend {
    position: absolute;
    bottom: 30px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: var(--shadow-md);
    z-index: 800;
    max-width: 200px;
}

.gis-legend h6 {
    margin: 0 0 12px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-color);
}

.gis-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--gray-color);
}

.gis-legend-item:last-child {
    margin-bottom: 0;
}

.gis-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* ===============================================
   RESPONSIVE
   =============================================== */

@media (max-width: 768px) {
    .gis-header {
        padding: 40px 15px;
        margin-bottom: 20px;
    }

    .gis-header h1 {
        font-size: 1.8rem;
    }

    .gis-header p {
        font-size: 1rem;
    }

    .header-icon-wrapper {
        width: 60px;
        height: 60px;
    }

    .header-icon-wrapper i {
        font-size: 30px;
    }

    .gis-map-container {
        height: 400px;
    }

    .gis-search-container {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }

    .gis-legend {
        display: none;
    }

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

    .gis-map-section {
        padding: 20px;
    }
}
