/* 360Talent Map Popup Styles */
/* Enhanced modern popup design matching the 360Talent ecosystem */

.maplibregl-popup.custom-map-popup {
    border-radius: 12px !important;
    overflow: hidden !important;
}

.maplibregl-popup-content {
    padding: 0 !important;
    border-radius: 12px !important;
}

.maplibregl-popup-tip {
    border-radius: 0 0 12px 12px !important;
}

.map-popup-card {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: popupSlideIn 0.2s ease-out;
}

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

/* [360TALENT] Enhanced button styles */
.map-popup-card button {
    font-family: inherit;
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
}

.map-popup-card button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}

.map-popup-card button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}

/* [360TALENT] Stat box enhancements */
.stat-box {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.stat-box:hover {
    transform: scale(1.02);
}

/* [360TALENT] Talent badge animations */
.talent-badge {
    position: relative;
    overflow: hidden;
}

.talent-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

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

/* [360TALENT] Mobile responsive popups */
@media (max-width: 767.98px) {
    .map-popup-card {
        min-width: 260px !important;
        max-width: 280px !important;
    }
    
    .map-popup-card button {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    
    .stat-box {
        padding: 6px 4px !important;
    }
}

/* [360TALENT] High contrast mode support */
@media (prefers-contrast: high) {
    .map-popup-card {
        border: 2px solid #000;
    }
    
    .map-popup-card button {
        border: 2px solid currentColor;
    }
}

/* [360TALENT] Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .map-popup-card {
        animation: none;
    }
    
    .map-popup-card button {
        transition: none;
    }
    
    .stat-box {
        transition: none;
    }
}

.map-chip-xs {
    font-size: 0.65rem;
}

.map-confidence-label {
    font-size: 0.65rem;
}

.map-confidence-score {
    font-size: 0.65rem;
}

.map-confidence-vote-btn {
    font-size: 0.65rem;
}

.map-confidence-progress {
    height: 4px;
}

.map-confidence-meta {
    font-size: 0.7rem;
}

.map-teaser-mask {
    filter: blur(4px);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

.map-stat-label-xs {
    font-size: 0.6rem;
}

.map-live-dot-icon {
    font-size: 0.5rem;
}

.map-vision-empty-icon,
.map-vision-error-icon {
    font-size: 3rem;
}

.map-popup-body-font {
    font-family: var(--bs-body-font-family);
}

.map-popup-min-w-260 {
    min-width: 260px;
}

.map-popup-min-w-280 {
    min-width: 280px;
}

.map-role-avatar {
    width: 40px;
    height: 40px;
}

.map-role-avatar--contractor {
    background-color: #3b7dd8;
}

.map-role-avatar--project {
    background-color: #5c6bc0;
}

.map-role-avatar--consultant {
    background-color: #8e24aa;
}

.map-role-avatar--service {
    background-color: #00acc1;
}

.map-role-avatar--completed-project {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background-color: #2e7d32;
}

.map-role-btn--contractor {
    background-color: #3b7dd8;
}

.map-role-btn--supplier {
    background-color: #fb8c00;
}

.map-role-btn--consultant {
    background-color: #8e24aa;
}

.map-role-btn--service {
    background-color: #00acc1;
}

.map-role-btn--completed-project {
    background-color: #2e7d32;
}

.map-role-btn,
.map-live-pill {
    border-radius: 8px !important;
}

.map-completed-project-cover {
    max-height: 140px;
    object-fit: cover;
}

.map-popup-badge-xs {
    font-size: 0.65rem;
}

.map-popup-badge-xxs {
    font-size: 0.6rem;
}

.map-role-badge--consultant {
    border-color: #8e24aa !important;
}

.map-role-badge--service {
    border-color: #00acc1 !important;
}

.map-live-pill {
    font-size: 0.5rem;
    animation: pulse 1.5s infinite;
}

.map-vision-label {
    font-size: 0.75rem;
}

.map-clickable-row {
    cursor: pointer;
}

.map-video-thumb {
    width: 60px;
    height: 40px;
    flex-shrink: 0;
}

.map-video-thumb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-video-thumb-placeholder {
    width: 100%;
    height: 100%;
}

.map-video-thumb-phase {
    font-size: 0.5rem;
    padding: 1px;
}

.map-min-w-0 {
    min-width: 0;
}

.map-video-thumb-title {
    font-size: 0.7rem;
}

.map-video-thumb-subtitle {
    font-size: 0.6rem;
}

.map-logo-40 {
    width: 40px;
    height: 40px;
    object-fit: contain;
    object-position: center;
    box-sizing: border-box;
    padding: 4px;
    background: #ffffff;
}

.map-logo-fallback-40 {
    width: 40px;
    height: 40px;
}

.map-report-link-btn {
    font-size: 0.7rem;
    text-align: left;
}

.map-popup-text-sm {
    font-size: 0.8rem;
}

.map-inline-icon-xs {
    margin-right: 4px;
}

.map-inline-icon-xxs {
    margin-right: 2px;
}

.map-stat-box {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    text-align: center;
    padding: 8px 6px;
}

.map-stat-box-icon {
    position: absolute;
    top: 4px;
    right: 4px;
    opacity: 0.1;
    font-size: 16px;
}

.map-stat-box-value {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.2;
}

.map-stat-box-label {
    font-size: 9px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.map-stat-box--emerald {
    background: #d1fae5;
    color: #065f46;
}

.map-stat-box--amber {
    background: #fef9c3;
    color: #854d0e;
}

.map-stat-box--sky {
    background: #e0f2fe;
    color: #0369a1;
}

.map-stat-box--slate,
.map-stat-box--gray {
    background: #f3f4f6;
    color: #374151;
}

.map-stat-box--blue {
    background: #dbeafe;
    color: #1e40af;
}

.map-stat-box--fuchsia {
    background: #fae8ff;
    color: #86198f;
}

.map-stat-box--violet {
    background: #ede9fe;
    color: #5b21b6;
}

.map-stat-box--orange {
    background: #ffedd5;
    color: #9a3412;
}

.map-stat-box--indigo {
    background: #e0e7ff;
    color: #3730a3;
}

.map-action-btn {
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
    border: 1px solid transparent;
}

.map-action-btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.map-action-btn--primary {
    background: #2e7d32;
    color: #fff;
    border-color: #1b5e20;
}

.map-action-btn--secondary {
    background: #1976d2;
    color: #fff;
    border-color: #1565c0;
}

.map-action-btn--outline {
    background: transparent;
    color: #1976d2;
    border-color: #1976d2;
}

.map-action-btn--success {
    background: #388e3c;
    color: #fff;
    border-color: #2e7d32;
}

.map-action-btn-icon {
    margin-right: 6px;
}

.map-prop-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f3f4f6;
    padding: 4px 0;
}

.map-prop-row-label {
    font-size: 11px;
    color: #6b7280;
}

.map-prop-row-value {
    font-size: 11px;
    font-weight: 600;
    color: #374151;
}

.map-popup-pill {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.map-popup-pill--locked {
    background: #fee2e2;
    color: #991b1b;
}

.map-popup-pill--gold {
    background: #fef3c7;
    color: #92400e;
}

.map-popup-pill--silver {
    background: #f3f4f6;
    color: #374151;
}

.map-popup-pill--bronze {
    background: #ffedd5;
    color: #9a3412;
}

.map-popup-pill--project {
    background: #dcfce7;
    color: #166534;
}

.map-popup-pill--neutral {
    background: #e2e8f0;
    color: #4b5563;
}

.map-popup-stack-sm {
    margin-top: 8px;
}

.map-popup-center-row {
    margin-top: 8px;
    text-align: center;
}

.map-tender-pill {
    color: #fff;
    padding: 3px 8px;
    border-radius: var(--radius-2026, 20px);
    font-size: 10px;
    font-weight: 700;
}

.map-tender-pill--open {
    background: #16a34a;
}

.map-tender-pill--muted {
    background: #9ca3af;
}

.map-popup-panel {
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
}

.map-popup-panel--opportunity {
    background: #f0fdf4;
    border-left: 3px solid #16a34a;
}

.map-popup-panel--jobs {
    background: #f0f9ff;
    border-left: 3px solid #0284c7;
}

.map-popup-panel--dna {
    margin-top: 8px;
    padding: 8px;
    background: #fff1f2;
    border-left: 3px solid #e11d48;
}

.map-popup-panel--active-jobs {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
}

.map-popup-panel--available {
    background: #ecfdf5;
    border-left: 3px solid #10b981;
}

.map-popup-panel--hiring {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
}

.map-popup-panel--locked {
    margin-top: 4px;
    padding: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    text-align: center;
}

.map-popup-panel--soft {
    margin-top: 12px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
}

.map-popup-panel--talent {
    margin-top: 8px;
    padding: 8px;
    background: #e8f4fb;
    border: 1px solid #b8dff1;
    color: #285d77;
    border-radius: 8px;
}

.map-popup-panel-head {
    display: flex;
    justify-content: space-between;
}

.map-popup-panel-head--dna {
    font-size: 11px;
    font-weight: 700;
    color: #9f1239;
    margin-bottom: 4px;
}

.map-popup-panel-title {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
}

.map-popup-panel-title--opportunity {
    color: #166534;
    margin-bottom: 4px;
}

.map-popup-panel-title--jobs {
    color: #0c4a6e;
}

.map-popup-panel-title--active-jobs,
.map-popup-panel-title--hiring {
    color: #92400e;
}

.map-popup-panel-title--available {
    color: #065f46;
    margin-bottom: 4px;
}

.map-popup-panel-title--locked {
    font-size: 11px;
    color: #991b1b;
    font-weight: 600;
    margin-bottom: 8px;
}

.map-popup-panel-title--talent {
    font-size: 11px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 6px;
    text-align: center;
}

.map-popup-mini-badge {
    font-size: 9px;
    background: #ffe4e6;
    padding: 1px 5px;
    border-radius: 4px;
}

.map-popup-mini-note {
    text-align: center;
    font-size: 9px;
    color: #9f1239;
    margin-top: 2px;
}

.map-dna-item {
    font-size: 10px;
    color: #4b5563;
    padding: 2px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.map-dna-item-label {
    font-weight: 700;
}

.map-dna-supplier {
    color: #f59e0b;
    font-weight: 600;
}

.map-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.map-grid-2--tight {
    gap: 6px;
}

.map-grid-2--mt {
    margin-top: 10px;
}

.map-mt-8 {
    margin-top: 8px;
}

.map-mt-12 {
    margin-top: 12px;
}

.map-popup-counter-card {
    background: #fef3c7;
    border-radius: 6px;
    padding: 6px;
    margin-bottom: 8px;
    text-align: center;
}

.map-popup-counter-value {
    font-size: 16px;
    font-weight: 800;
    color: #92400e;
}

.map-popup-counter-label {
    font-size: 9px;
    color: #92400e;
    text-transform: uppercase;
}

.map-role-subtitle {
    margin: 8px 0 4px;
    font-size: 11px;
    color: #6b7280;
    font-style: italic;
    font-weight: 600;
}

.map-sector-line {
    margin: 8px 0;
    font-size: 11px;
    color: #4b5563;
    font-weight: 600;
}

.map-hourly-rate {
    font-size: 13px;
    font-weight: 700;
    color: #065f46;
}

.map-status-note {
    margin-top: 8px;
    padding: 6px;
    background: #f8fafc;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    color: #64748b;
}

.map-talent-badge {
    margin: 8px 0;
    border-radius: var(--radius-2026, 20px);
    padding: 8px 12px;
    text-align: center;
    border: 1px solid;
}

.map-talent-badge-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.map-talent-badge-value {
    font-size: 16px;
    font-weight: 800;
    margin-top: 2px;
}

.map-talent-badge--high {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.13), rgba(46, 125, 50, 0.07));
    border-color: rgba(46, 125, 50, 0.27);
    color: #2e7d32;
}

.map-talent-badge--mid {
    background: linear-gradient(135deg, rgba(245, 124, 0, 0.13), rgba(245, 124, 0, 0.07));
    border-color: rgba(245, 124, 0, 0.27);
    color: #f57c00;
}

.map-talent-badge--low {
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.13), rgba(211, 47, 47, 0.07));
    border-color: rgba(211, 47, 47, 0.27);
    color: #d32f2f;
}

.map-vision-card {
    margin-top: 10px;
    padding: 8px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.map-vision-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.map-vision-card-title {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

.map-vision-card-badges {
    display: flex;
    gap: 4px;
}

.map-vision-chip {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
}

.map-vision-chip--live {
    background: #dc2626;
    animation: pulse 1.5s infinite;
}

.map-vision-watch-link {
    display: block;
    width: 100%;
    background: #fff;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: #0284c7;
    text-align: center;
    text-decoration: none;
}

.map-popup-card--module {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-width: 280px;
    max-width: 320px;
    padding: 0;
    border-radius: var(--radius-2026, 20px);
    overflow: hidden;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    background: #fff;
}

.map-popup-header {
    padding: 16px;
    position: relative;
    background: linear-gradient(135deg, #285d77 0%, #14b8a6 100%);
}

.map-popup-card--contractor .map-popup-header {
    background: linear-gradient(135deg, #3b7dd8 0%, #2a5ca8 100%);
}

.map-popup-card--property .map-popup-header {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
}

.map-popup-card--project .map-popup-header {
    background: linear-gradient(135deg, #5c6bc0 0%, #3f51b5 100%);
}

.map-popup-card--supplier .map-popup-header {
    background: linear-gradient(135deg, #fb8c00 0%, #e65100 100%);
}

.map-popup-card--consultant .map-popup-header {
    background: linear-gradient(135deg, #8e24aa 0%, #6a1b9a 100%);
}

.map-popup-card--service .map-popup-header {
    background: linear-gradient(135deg, #00acc1 0%, #00838f 100%);
}

.map-popup-card--job_posting .map-popup-header {
    background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 100%);
}

.map-popup-card--gig_request .map-popup-header {
    background: linear-gradient(135deg, #e53935 0%, #b71c1c 100%);
}

.map-popup-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.map-popup-type-badge {
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: var(--radius-2026, 20px);
}

.map-popup-title {
    margin: 0;
    font-size: 16px;
    color: #fff;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.map-popup-location {
    margin-top: 6px;
    font-size: 11px;
    display: flex;
    align-items: center;
}

.map-popup-location--header {
    color: rgba(255, 255, 255, 0.9);
}

.map-popup-content {
    padding: 16px;
    background: #fff;
}

.map-popup-content--locked {
    opacity: 0.6;
    pointer-events: none;
    filter: blur(0.5px);
}

.map-popup-footer {
    padding: 12px 16px 16px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 575.98px) {
    .map-stat-box-label { font-size: 11px; }
    .map-popup-mini-badge { font-size: 11px; }
    .map-popup-mini-note { font-size: 11px; }
    .map-popup-counter-label { font-size: 11px; }
    .map-vision-chip { font-size: 11px; }
}
