* 
{ box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'JetBrains Mono', monospace; color: #404040; }
.map-container { display: flex; height: 100vh; flex-direction: row; }
#map { flex: 1; order: 1; position: relative; }   

.search-container { 
    position: absolute;
    top: 10px; 
    left: 10px; 
    z-index: 100; 
    width: 50px;
    height: 50px;
    display: block;
    transition: width 0.3s ease;
}

.search-container.expanded {
    width: 350px;
}

.search-container.visible { display: block; }     

#kindergartenSearch { 
    width: 100%;
    height: 50px;
    font-family: 'Material Symbols Outlined', 'Noto Sans Georgian', sans-serif;
    font-size: 24px;
    border: 2px solid #6c86cf; 
    border-radius: 25px;
    background: white;
    box-shadow: 0 0 5px 0 #d0e8fd;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

#kindergartenSearch.expanded {
    font-family: 'Noto Sans Georgian', sans-serif;
    font-size: 14px;
    padding: 12px 16px; 
    text-align: left;
    cursor: text;
}

#kindergartenSearch::placeholder {
    font-family: 'Material Symbols Outlined';
    font-size: 24px;
    color: #6c86cf;
}

#kindergartenSearch.expanded::placeholder {
    font-family: 'Noto Sans Georgian', sans-serif;
    font-size: 14px;
    color: #999;
}
   
#kindergartenSearch:focus { 
    outline: none; 
    border-color: #810f7c; 
    box-shadow: 0 0 10px 0 #e9d0fd; 
}

.search-results { 
    margin-top: 8px; 
    background: white; 
    border-radius: 5px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); 
    max-height: 400px; 
    overflow-y: auto; 
    display: none; 
}

.search-result-item { 
    padding: 12px 16px; 
    border-bottom: 1px solid #f0f0f0; 
    cursor: pointer; 
    font-family: 'Noto Sans Georgian', sans-serif; 
    font-size: 13px; 
}

.search-result-item:hover { background: #f4f4f4; }
.search-result-item:last-child { border-bottom: none; }
.result-name { font-weight: bold; color: #6c86cf; margin-bottom: 4px; }
.result-address { color: #666; font-size: 12px; }
.result-phone { color: #999; font-size: 11px; margin-top: 2px; }
.sidebar { order:0; width: 30%; overflow-y: auto; background: #f4f4f4; border-left: 1px solid #ddd; padding: 20px; }
h1 { font-size: 5rem; text-align: center; background: transparent; margin: 0; color: rgba(255, 255, 255, 0.25); -webkit-text-stroke: 1px #6c86cf; }
h3 { font-size: 1.25rem; font-weight: 400; padding-bottom: 20px; text-align: center; background: transparent; margin: 0; color: #8095ce; }
.section { margin-bottom: 10px; padding: 10px; background: #f4f4f4; border-radius: 5px; }
.section h3 { font-size: 14px; margin-bottom: 10px; color: #333; }
select, input { width: 100%; padding: 8px; font-size: 13px; border: 1px solid #ddd; border-radius: 3px; font-family: inherit; }
.toggle-group { display: flex; width: 50%; gap: 10px; justify-content: center; margin: 20px auto; }
.toggle { flex: 1; padding: 10px; text-align: center; border-radius: 5px; cursor: pointer; transition: all 0.2s; font-size: 13px; box-shadow: 0 0 20px 0 #d0e8fd; }
.toggle:hover { background: #f4f4f4; color: #810f7c; box-shadow: 4px 4px 0 #810f7c; transform: translate(-4px, -4px);}
.toggle.active { background: rgb(21, 22, 27); color: #f4f4f4; box-shadow: 4px 4px 0 #810f7c; transform: translate(-4px, -4px);}
.modal { font-family: JetBrains Mono, monospace; display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); }
.modal-content { background: #f4f4f4; margin: 3% auto; padding: 25px; border-radius: 10px; max-width: 600px; max-height: 85vh; overflow-y: auto; } 
.close { background: none; float: right; font-size: 28px; padding: 0; font-weight: bold; width: 32px; height: 32px; display: flex; cursor: pointer; color: #6b7280; border-radius: 6px; justify-content: center;}
.close:hover { background: #f3f4f6; color: #1f2937; }
.question { margin: 15px 0; padding: 12px; background: #ffffff; border-left: 3px solid #6c86cf; }
.question label { margin: 0 0 8px 0; font-weight: bold; font-size: 14px}
.radio-group label { display: flex; font-size: 13px; align-items: center; margin: 5px 0; font-weight: normal; line-height: 1.5rem; }
.radio-group input { width: auto; margin-right: 8px; }
.checkbox-group label { display: flex; font-size: 13px; align-items: left; margin: 5px 0; font-weight: normal; line-height: 1.5rem; }
.checkbox-group input { width: auto; margin-right: 8px; }
.time-interval, .travel-mode {
    background: #f4f4f4; 
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    color: #000000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 50%;
    text-align: left;
    font-size: 14px;
} 
.results { background: #f4f4f4; /*padding: 15px;*/ border-radius: 5px; margin-top: 15px; }
.info-box { border-radius: 3px; margin-bottom: 15px; font-size: 12px; line-height: 1.5; }
.three-word-name { font-size: 16px; font-weight: bold; color: #6c86cf; margin: 5px 0; }
.tab-buttons { display: flex; width: 75%; gap: 10px; justify-content: center; margin: 10px auto; }
.tab-btn { font-family: JetBrains Mono, monospace; box-shadow: 0 0 20px 0 #d0e8fd; flex: 1; padding: 12px; background: #f4f4f4; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; font-size: 13px; position: relative}
.tab-btn:hover { background: #f4f4f4; box-shadow: 4px 4px 0 #810f7c; transform: translate(-4px, -4px); }
.tab-btn.active { color: white; background: rgb(21, 22, 27); box-shadow: 4px 4px 0 #810f7c; transform: translate(-4px, -4px); }
.tab-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
   /* pointer-events: none;*/
}

.tab-btn.disabled:hover{
    box-shadow: none; transform: none;
   /* pointer-events: none;*/
}

.tab-btn.disabled:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 14px;
    margin-bottom: 8px;
    z-index: 1000;
}
.tab-btn.disabled:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(3px);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

button.send { width: 100%; padding: 10px; background: #f4f4f4; color: #810f7c; border: none; border-radius: 5px; font-size: 14px; font-weight: bold; cursor: pointer; margin-top: 8px; }
button.send:hover { background: #f4f4f4; box-shadow: 4px 4px 0 #810f7c; transform: translate(-4px, -4px) }
.tab-content { display: none; }
.tab-content.active { display: block; }
#timeResults { 
    appearance: none; 
    margin-left: 25px; 
    display: inline-block; 
    width: 15%; height: 50px; 
    font-size: 14px; border: thin solid rgb(194, 194, 247); border-radius: 2px; box-shadow: 0 0 20px 0 #d0e8fd; text-align-last: center; padding-left: 5px; }
.aggregate-stat { padding: 8px; margin: 5px 0; background: #f4f4f4; border-radius: 3px; }
.zaxis { display: block; position: absolute; bottom: 25px; right: 15px; z-index: 10; }
.zaxis p { font-family: 'JetBrains Mono', monospace; font-size: 7px; text-align: center; color: white }
.chart-container { background: #f4f4f4; padding: 12px; border-radius: 3px; }
.chart-container h4 { margin: 0 0 8px 0; font-size: 13px; color: #666; font-weight: 500; letter-spacing: 0.5px; }
.chart-wrapper { position: relative; height: 300px; margin-bottom: 5px; }
.chart-wrapper.small { height: 200px; }
.chart-wrapper.tiny { height: 200px; }
.dropdown-header { 
    background: #f4f4f4; 
    padding: 12px 14px; cursor: pointer; 
    border-radius: 3px; margin-bottom: 8px; 
    display: flex; justify-content: space-between; 
    align-items: center; font-weight: bold; font-size: 13px; 
    transition: background 0.2s; border-radius: 5px; border: 1px solid #6c86cf; }
.dropdown-toggle {
    background: #f4f4f4; 
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    color: #000000;
    border: none;
    padding: 10px 0 0 0;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-size: 14px;
}   
.instruction-list {
    list-style: none;
    counter-reset: step-counter;
    font-size: 12px;
    line-height: 1.8;
    padding-left: 0;
    margin: 0;
}
.instruction-list li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 40px;
    margin-bottom: 10px;
    display: flex;
    align-items: center; /* ✅ vertically centers the text with the circle */
}

.instruction-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%); /* ✅ centers the circle vertically */
    width: 24px;
    height: 24px;
    background-color: #1d91c0;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}
.dropdown-item {
    display: none;
    padding: 20px;
    margin: 20px 0 20px 0;
    border-radius: 25px;
    background: #f8f8f8;
    box-shadow: 0 0 20px 0 #d0e8fd;
    font-size: 12px;
    line-height: 1.6;
} 
.dropdown-header:hover { background: #d0e8fd; }
.dropdown-arrow { transition: transform 0.3s; font-size: 18px; }
.dropdown-arrow.open { transform: rotate(180deg); }
.dropdown-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.dropdown-content.open { max-height: 2000px; transition: max-height 0.5s ease-in; }
.kindergarten-list { max-height: 400px; overflow-y: auto; }
.kindergarten-item { padding: 10px; background: #f9f9f9; border-radius: 0 3px; margin-bottom: 8px; font-size: 12px; border-left: 3px solid #810f7c; }
.kindergarten-item.selected { background-color: #f9d2fb; border-left-color: #e63946; }
.kindergarten-item:hover { background-color: #f768a14c; }
.kindergarten-item h4 { color: #810f7c; margin: 0 0 6px 0; font-size: 13px; }
.kindergarten-item p { margin: 3px 0; color: #666; }

@keyframes pulse-kindergarten {
    0% { box-shadow: 0 0 0 0 rgba(213, 62, 79, 0.7); }
    50% { box-shadow: 0 0 0 15px rgba(213, 62, 79, 0); }
    100% { box-shadow: 0 0 0 30px rgba(213, 62, 79, 0); }
}

@keyframes pulse-school {
    0% { box-shadow: 0 0 0 0 rgba(177, 231, 41, 0.7); }
    50% { box-shadow: 0 0 0 15px rgba(177, 231, 41, 0); }
    100% { box-shadow: 0 0 0 30px rgba(177, 231, 41, 0); }
}

.pulsating-dot-kindergarten { width: 20px; height: 20px; background: #e7298a; border-radius: 50%; animation: pulse-kindergarten 2s infinite; box-shadow: 0 0 10px rgba(231, 41, 138)}
.pulsating-dot-school { width: 20px; height: 20px; background: #b1e729; border-radius: 50%; animation: pulse-school 2s infinite; box-shadow: 0 0 10px rgb(231, 41, 209)}

#routePopup { 
    position: absolute; 
    top: 10px;
    right: 50px;
    background: rgba(58, 111, 161, 0.193); 
    color: #fff; 
    backdrop-filter: blur(2px); 
    padding: 15px; 
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.25rem;
    box-shadow: 0 0 30px 0 rgba(255, 255, 255, 0.25);
    max-width: 300px;
    z-index: 999;
}

.accident-list { max-height: 300px; overflow-y: auto; }
.accident-item { padding: 10px; background: #fff5f5; margin-bottom: 8px; font-size: 12px; border-left: 3px solid #e63946; }
.accident-item h4 { color: #e63946; margin: 0 0 6px 0; font-size: 13px; }
.accident-item p { margin: 3px 0; color: #666; }

/* GOOGLE STREET VIEW INTEGRATION */

/* Street View Images Styles */
.streetview-section {
    /*margin-top: 20px;*/
    display: none;
}

.streetview-images {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.streetview-card {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.streetview-card:hover {
    border-color: #6c86cf;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.streetview-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.streetview-info {
    padding: 10px;
}

.streetview-distance {
    font-size: 11px;
    color: #6c86cf;
    font-weight: 600;
    margin-bottom: 4px;
}

.streetview-direction {
    font-size: 11px;
    color: #64748b;
}

.loading-streetview {
    text-align: center;
    padding: 40px;
  }
  
  .loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #183ac1;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px auto;
  }
  
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

.no-streetview {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 12px;
}
        
/* DRAGGABLE DIVIDER FOR MOBILE */
.resize-handle {
    display: none;
    position: absolute;
    width: 100%;
    height: 10px;
    background: #6c86cf;
    cursor: ns-resize;
    z-index: 100;
    left: 0;
    top: 0;
    touch-action: none;
}

.resize-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 4px;
    background: white;
    border-radius: 2px;
}

.resize-handle:hover,
.resize-handle:active {
    background: #810f7c;
}

/* SCHOOL ANALYSIS STYLING */

.school-summary-container {
    font-family: 'JetBrains Mono', monospace; 
    font-size: 12px;
    text-align: left;
}

.summary-section {
    margin-bottom: 24px;
    text-align: left;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 10px;
}

.stat-card {
    background: #f8fafc;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 30px;
}

.stat-sublabel {
    font-size: 12px;
    color: #666;
    margin: 10px 0 10px 0;
    line-height: 1.5rem;
}

.condition-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.condition-card {
    padding: 16px;
    border-radius: 0 8px 8px 0;
    text-align: center;
    position: relative;
}

.condition-value {
    font-size: 30px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 4px;
}

.condition-label {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 2px;
}

.condition-percent {
    font-size: 12px;
    color: #666;
}

.stat-mini {
    padding: 12px;
    border-radius: 6px;
    text-align: center;
}

.stat-mini-value {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 4px;
}

.stat-mini-label {
    font-size: 10px;
    color: #64748b;
}

.investment-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.investment-item {
    position: relative;
}

.investment-bar {
    height: 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    transition: width 0.5s ease;
}

.investment-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.investment-label {
    font-weight: 500;
}

.investment-amount {
    font-weight: 600;
    color: #334155;
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.insight-item {
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 0 6px 6px 0;
    border-left: 3px solid #1d91c0;
    font-size: 12px;
    text-align: left;
    line-height: 1.5;
}

/* DATA & FEEDBACK BUTTONS */

.map-action-btn {
    background: #ffffff;
    border: none;
}

.map-action-btn:hover {
    background: #f2f2f2;
}

.info-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #f4f4f4;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 10000;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.info-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

.info-popup-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.info-popup-header h2{
    color: #333333;
}

.info-popup-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.info-popup-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.info-popup-content {
    color: #374151;
    line-height: 1.8;
}

.data-source-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.data-source-item {
    padding: 15px;
    margin-bottom: 12px;
    background: #f9fafb;
    border-left: 3px solid #810f7c;
    border-radius: 0 6px 6px 0;
}

.data-source-item h4 {
    margin: 0 0 8px 0;
    color: #810f7c;
    font-size: 13px;
}

.data-source-item p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.data-source-item a {
    color: #1d91c0;
    text-decoration: none;
    font-weight: 500;
}

.data-source-item a:hover {
    text-decoration: underline;
}

/* SHARE BUTTON */

.icon-panel {
    position: absolute;
    bottom: 5%;    
    left: 5px;
    padding: 5px;
    display: flex;
    gap: 10px;
    z-index: 999;
}

.share-btn {
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.share-btn img {
    width: 22px;
    height: 22px;
    transition: transform 0.2s;
}

.share-btn:hover img {
    transform: scale(1.05);
}

#copyMessage {
    display: none;
    text-align: left;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgb(255, 255, 255);
}

@media (max-width: 768px) {
    body {
        overflow: hidden;
    }
    
    .map-container { 
        flex-direction: column; 
        position: relative;
        height: 100vh;
    }
    
    #map { 
        height: 65vh;
        order: 0;
    }
    
    .sidebar { 
        width: 100%; 
        height: 35vh;
        border-left: none; 
        border-top: 1px solid #ddd;
        order: 1;
        position: relative;
        overflow-y: auto;
    }
    
    .resize-handle {
        display: block;
    }
    
    .search-container { 
        width: 50px; 
    }
    
    .search-container.expanded { 
        width: calc(100% - 70px);
        max-width: 350px;
    }
    
    #routePopup {
        right: 10px;
        max-width: calc(100% - 70px);
    }
}