/**
 * Public CSS for SVG Map Connector
 *
 * @package SVG_Map_Connector
 * @since 1.0.0
 */

/* SVG Map Container */
.smc-svg-map-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.smc-svg-map-container svg {
    max-width: 100%;
    height: auto;
    display: block;
    pointer-events: all !important;
}

/* SVG Path Styles */
.smc-svg-map-container svg path {
    transition: fill 0.3s ease, stroke 0.3s ease;
    cursor: pointer;
    pointer-events: all !important;
}

.smc-svg-map-container svg path:not([fill="#243D88"],[fill="#5B6DA6"]):hover {
    fill: #ffc60b !important;
    stroke: #ffc60b !important;
    stroke-width: 2px !important;
}

.smc-svg-map-container svg path.smc-clickable-path {
    cursor: pointer;
	z-index:1;
}

.smc-svg-map-container svg path.smc-clickable-path:not([fill="#243D88"],[fill="#5B6DA6"]):hover {
    fill: #ffc60b !important;
    stroke: #ffc60b !important;
    stroke-width: 2px !important;
}

.smc-svg-map-container svg path.smc-clickable-path[fill="#243D88"]:not([data-post-id]){
    pointer-events: none !important;
    z-index: -999;
}

/* Error States */
.smc-no-svg,
.smc-error {
    padding: 20px;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    color: #666;
}

.smc-error {
    background: #ffe6e6;
    border-color: #ff9999;
    color: #cc0000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .smc-svg-map-container svg {
        width: 100% !important;
        height: auto !important;
    }
}

/* Loading State */
.smc-loading {
    position: relative;
}

.smc-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: smc-spin 1s linear infinite;
}

@keyframes smc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tooltip Styles */
.smc-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.smc-tooltip.show {
    opacity: 1;
}

/* Accessibility */
.smc-svg-map-container svg path:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .smc-svg-map-container svg path:hover {
        fill: inherit !important;
        stroke: inherit !important;
        stroke-width: inherit !important;
    }
}
