/**
 * Stortemelk Plattegrond - Styling
 */

/* Container */
.smp-container {
    position: relative;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Kaart wrapper */
.smp-kaart-wrapper {
    position: relative;
    width: 100%;
    line-height: 0;
}

/* Kaart afbeelding */
.smp-kaart {
    width: 100%;
    height: auto;
    display: block;
}

/* Area highlight */
.smp-area-highlight {
    position: absolute;
    background: rgba(46, 163, 242, 0.3);
    border: 3px solid #2ea3f2;
    pointer-events: none;
    animation: smp-pulse 1.5s infinite;
    box-sizing: border-box;
}

@keyframes smp-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Tooltip */
.smp-tooltip {
    position: absolute;
    z-index: 1000;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    max-width: 350px;
    min-width: 200px;
    padding: 0;
    animation: smp-fadeIn 0.2s ease-out;
}

@keyframes smp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tooltip pijl (standaard: onder, wijst omlaag) */
.smp-tooltip::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: var(--smp-arrow-left, 50%);
    transform: translateX(-50%);
    border-width: 10px 10px 0 10px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

/* Tooltip pijl boven (wanneer tooltip onder het punt staat) */
.smp-tooltip-below::after {
    bottom: auto;
    top: -10px;
    border-width: 0 10px 10px 10px;
    border-color: transparent transparent #ffffff transparent;
}

/* Tooltip content */
.smp-tooltip-content {
    padding: 15px 20px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.smp-tooltip-content strong {
    display: block;
    font-size: 16px;
    margin-bottom: 8px;
    color: #2ea3f2;
}

.smp-tooltip-content br {
    display: block;
    margin-bottom: 4px;
    content: "";
}

.smp-tooltip-content a {
    color: #2ea3f2;
    text-decoration: none;
}

.smp-tooltip-content a:hover {
    text-decoration: underline;
}

/* Tooltip sluiten knop */
.smp-tooltip-close {
    position: absolute;
    top: 5px;
    right: 8px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 24px;
    height: 24px;
}

.smp-tooltip-close:hover {
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .smp-tooltip {
        max-width: 280px;
        min-width: 180px;
    }

    .smp-tooltip-content {
        padding: 12px 15px;
        font-size: 13px;
    }

    .smp-tooltip-content strong {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .smp-tooltip {
        position: fixed !important;
        bottom: 20px !important;
        left: 10px !important;
        right: 10px !important;
        top: auto !important;
        max-width: none;
        width: auto;
    }

    .smp-tooltip::after {
        display: none;
    }
}

/* Admin styles */
.smp-admin-wrap {
    max-width: 1200px;
}

.smp-admin-wrap h1 {
    margin-bottom: 20px;
}

.smp-admin-section {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.smp-admin-section h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.smp-locations-table {
    width: 100%;
    border-collapse: collapse;
}

.smp-locations-table th,
.smp-locations-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.smp-locations-table th {
    background: #f9f9f9;
}

.smp-import-area {
    width: 100%;
    height: 200px;
    font-family: monospace;
    font-size: 12px;
}

.smp-shortcode-example {
    background: #f0f0f0;
    padding: 10px 15px;
    font-family: monospace;
    border-radius: 4px;
    display: inline-block;
}

/* Loading state */
.smp-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.smp-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #2ea3f2;
    border-top-color: transparent;
    border-radius: 50%;
    animation: smp-spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes smp-spin {
    to {
        transform: rotate(360deg);
    }
}
