/* ==========================================
   WP Türkiye Harita - Public Styles
   ========================================== */

.wth-map-wrapper {
    position: relative;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wth-map-wrapper .wth-map-responsive-wrap {
    position: relative;
    height: 0;
    overflow: hidden;
}

.wth-map-wrapper .wth-map-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}

.wth-map-wrapper .wth-map-container>div {
    left: 0 !important;
}

/* Info Panel */
.wth-info-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 320px;
    max-width: 90%;
    max-height: calc(100% - 40px);
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 0;
    z-index: 100;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
    will-change: opacity, transform;
}

.wth-info-panel.wth-panel-visible {
    opacity: 1;
    transform: translateY(0);
}

.wth-info-panel.wth-panel-hiding {
    opacity: 0;
    transform: translateY(-10px);
}

/* Close button */
.wth-info-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: none;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    border-radius: 50%;
    transition: all 0.15s ease;
    z-index: 10;
}

.wth-info-close:hover {
    background: #e0e0e0;
    color: #1d2327;
    transform: rotate(90deg);
}

.wth-info-close:active {
    background: #ccc;
    transform: rotate(90deg) scale(0.9);
}

.wth-info-title {
    margin: 0;
    padding: 16px 50px 12px 20px;
    font-size: 18px;
    font-weight: 700;
    color: #1d2327;
    border-bottom: 1px solid #f0f0f1;
}

.wth-info-content {
    padding: 16px 20px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.wth-info-content p {
    margin: 0 0 10px;
}

.wth-info-content p:last-child {
    margin-bottom: 0;
}

/* ==========================================
   WP Türkiye Harita - Grid Styles
   ========================================== */

.wth-grid-wrapper {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wth-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.wth-grid-item {
    border: 2px solid #C4C4C4;
    border-radius: 5px;
    padding: 10px;
    background: #fff;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.wth-grid-item:hover {
    border-color: #999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.wth-grid-province-name {
    font-weight: 700;
    font-size: 15px;
    color: #1d2327;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8e8e8;
}

.wth-grid-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.wth-grid-content p {
    margin: 0 0 8px;
}

.wth-grid-content p:last-child {
    margin-bottom: 0;
}

.wth-grid-content a {
    color: #ee2f2f;
    text-decoration: none;
    word-break: break-all;
}

.wth-grid-content a:hover {
    text-decoration: underline;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
    .wth-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1 column */
@media (max-width: 600px) {
    .wth-grid-container {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .wth-info-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        max-height: 60vh;
        border-radius: 12px 12px 0 0;
    }

    .wth-info-panel.wth-panel-visible {
        animation: wth-slide-up 0.3s ease-out;
    }

    .wth-info-panel.wth-panel-hiding {
        animation: wth-slide-down 0.2s ease-in;
    }

    @keyframes wth-slide-up {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    @keyframes wth-slide-down {
        from {
            transform: translateY(0);
        }

        to {
            transform: translateY(100%);
        }
    }
}