/* Dashboard-specific styles */

/* Dashboard Layout */
.dashboard-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, white 0%, #fafbfc 100%);
    backdrop-filter: blur(10px);
}

.dashboard-main {
    background: linear-gradient(135deg, var(--gray-50) 0%, #f8fafc 100%);
    min-height: calc(100vh - 200px);
}

.dashboard-section {
    position: relative;
}

/* Mobile-First Dashboard Cards */
.dashboard-card {
    transition: all 0.3s ease-in-out;
    background: white;
    border-radius: 0.75rem;
    width: 100%;
    min-height: 44px; /* Touch target */
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 10px -3px rgba(0, 0, 0, 0.05);
}

.dashboard-card .card-header {
    padding: 1.25rem 1.5rem 1rem;
    background: transparent !important;
    border-bottom: 1px solid var(--gray-200) !important;
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

/* Touch-Friendly Metric Cards */
.metric-icon {
    width: clamp(40px, 8vw, 48px);
    height: clamp(40px, 8vw, 48px);
    min-width: 44px; /* Touch target */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-value {
    font-size: clamp(1.5rem, 4vw, 2rem);
    line-height: 1.2;
}

.metric-large {
    font-size: clamp(2rem, 5vw, 2.5rem);
    line-height: 1.1;
}

.metric-item {
    padding: 0.75rem 0;
}

.progress-sm {
    height: 6px;
}

.progress-bar {
    transition: width 0.8s ease-in-out;
}

/* Touch-Friendly Initiative Icons */
.initiative-icon {
    width: clamp(48px, 10vw, 64px);
    height: clamp(48px, 10vw, 64px);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Communication Items */
.communication-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.communication-item:last-child {
    border-bottom: none;
}

.comm-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Talent Items */
.talent-item {
    transition: all 0.2s ease-in-out;
}

.talent-item:hover {
    background-color: var(--gray-100) !important;
    transform: translateX(2px);
}

/* Resource Chart Placeholder */
.resource-chart-placeholder {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%) !important;
    border: 2px dashed var(--gray-300);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.bg-exxon-blue {
    background-color: var(--exxon-blue) !important;
}

/* Breadcrumb */
.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 0.5rem;
}

.breadcrumb-item a {
    text-decoration: none;
    font-weight: 500;
}

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

/* Touch-Friendly Button Styles */
.btn-outline-exxon-blue {
    border-color: var(--exxon-blue);
    color: var(--exxon-blue);
    background: transparent;
    transition: all 0.2s ease-in-out;
    min-height: 44px;
    min-width: 44px;
    padding: 0.875rem 1.5rem;
    font-size: clamp(0.875rem, 2vw, 1rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-outline-exxon-blue:hover {
    background-color: var(--exxon-blue);
    border-color: var(--exxon-blue);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
}

.btn-outline-exxon-blue:focus {
    background-color: var(--exxon-blue);
    border-color: var(--exxon-blue);
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(30, 64, 175, 0.25);
}

/* Touch-Friendly Quick Actions */
.btn.py-3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    min-height: 44px;
    min-width: 44px;
    gap: 0.5rem;
}

/* Status Indicators */
.badge.bg-success {
    background-color: #10b981 !important;
}

.badge.bg-info {
    background-color: #0ea5e9 !important;
}

.badge.bg-warning {
    background-color: #f59e0b !important;
}

.text-success {
    color: #10b981 !important;
}

.text-primary {
    color: var(--exxon-blue) !important;
}

.text-info {
    color: #0ea5e9 !important;
}

.text-warning {
    color: #f59e0b !important;
}

.bg-success {
    background-color: #10b981 !important;
}

.bg-primary {
    background-color: var(--exxon-blue) !important;
}

.bg-info {
    background-color: #0ea5e9 !important;
}

.bg-warning {
    background-color: #f59e0b !important;
}

/* Mobile-First Responsive Dashboard */
/* Base mobile styles (320px+) */
.dashboard-header .container {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.dashboard-main {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.dashboard-card .card-body {
    padding: 1rem;
}

.dashboard-card .card-header {
    padding: 1rem 1rem 0.75rem;
}

/* Stack header elements on mobile */
.dashboard-header .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
}

.dashboard-header .header-logo {
    align-self: flex-end;
}

/* Small mobile (375px+) */
@media (min-width: 375px) {
    .dashboard-card .card-body {
        padding: 1.25rem;
    }
}

/* Large mobile (576px+) */
@media (min-width: 576px) {
    .dashboard-header .d-flex {
        flex-direction: row;
        align-items: center !important;
        gap: 0;
    }
    
    .dashboard-header .header-logo {
        align-self: auto;
        margin-left: auto;
    }
}

/* Tablet (768px+) */
@media (min-width: 768px) {
    .dashboard-header .container {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .dashboard-main {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .dashboard-card .card-body {
        padding: 1.5rem;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .dashboard-header .container {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .dashboard-main {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .dashboard-card .card-body {
        padding: 2rem;
    }
}

/* Focus styles for accessibility */
.dashboard-card:focus-within,
.btn:focus,
.metric-item:focus {
    outline: 3px solid var(--exxon-blue);
    outline-offset: 2px;
}

.exxon-logo:focus {
    outline: 3px solid var(--exxon-blue);
    outline-offset: 4px;
}

/* Keyboard navigation styles */
.dashboard-card[tabindex]:focus,
.btn[tabindex]:focus {
    background-color: var(--gray-50);
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .dashboard-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    /* Increase touch targets on touch devices */
    .btn, .dashboard-card {
        min-height: 48px;
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .dashboard-card,
    .btn,
    .metric-value,
    .metric-large,
    .project-marker {
        animation: none !important;
        transition: none !important;
    }
    
    .dashboard-card:hover,
    .btn:hover {
        transform: none !important;
    }
}

/* Animation for metrics (only if motion is not reduced) */
@media (prefers-reduced-motion: no-preference) {
    @keyframes countUp {
        from { opacity: 0; transform: translateY(20px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .metric-value, .metric-large {
        animation: countUp 0.6s ease-out;
    }
}

/* Hover effects for interactive elements */
.dashboard-card .metric-item:hover {
    background-color: var(--gray-50);
    border-radius: 0.375rem;
    margin: 0 -0.5rem;
    padding: 0.75rem 0.5rem;
}

/* Focus states for accessibility */
.dashboard-card:focus-within {
    outline: 2px solid var(--exxon-blue);
    outline-offset: 2px;
}

/* Geographic Map Styles */
.map-container {
    position: relative;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border-radius: 0.5rem;
    overflow: hidden;
}

.interactive-map {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
    background-color: #f8fafc;
}

.world-map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0.5rem;
}

.map-markers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.project-marker {
    position: absolute;
    pointer-events: all;
    cursor: pointer;
    animation: markerPulse 2s ease-in-out infinite;
    transform: translate(-50%, -50%);
}

.marker-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.marker-label {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: var(--gray-900);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    min-width: 16px;
    text-align: center;
}

.project-marker:hover {
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 10;
}

.project-marker:hover .marker-dot {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@keyframes markerPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

/* Map Legend */
.map-legend {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 140px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Regional Breakdown */
.region-item {
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
}

.region-item:hover {
    background-color: white !important;
    border-color: var(--exxon-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.circular-progress {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.circular-progress svg {
    transform: rotate(-90deg);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.circular-progress .progress-text {
    position: absolute;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-700);
}

/* Responsive Map */
@media (max-width: 1199.98px) {
    .interactive-map {
        height: 350px !important;
    }
    
    .map-legend {
        position: relative !important;
        margin: 1rem !important;
        display: inline-block;
    }
    
    .project-marker {
        animation: none;
    }
    
    .marker-dot {
        width: 14px;
        height: 14px;
        border-width: 2px;
    }
    
    .marker-label {
        font-size: 9px;
        padding: 1px 3px;
    }
}

@media (max-width: 767.98px) {
    .interactive-map {
        height: 280px !important;
    }
    
    .map-container .row {
        flex-direction: column;
    }
    
    .marker-dot {
        width: 12px;
        height: 12px;
    }
    
    .marker-label {
        font-size: 8px;
        padding: 1px 2px;
        top: -6px;
    }
    
    .circular-progress svg {
        width: 32px;
        height: 32px;
    }
    
    .circular-progress .progress-text {
        font-size: 9px;
    }
    
    .region-item {
        padding: 0.75rem !important;
    }
}

/* Map Tooltip Enhancement */
.tooltip {
    font-size: 12px;
}

.tooltip-inner {
    background-color: var(--gray-900);
    border-radius: 4px;
    padding: 6px 10px;
}

/* Print styles */
@media print {
    .dashboard-header,
    .btn,
    .badge {
        background: white !important;
        color: black !important;
        border: 1px solid black !important;
    }
    
    .dashboard-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .map-markers,
    .interactive-map {
        background: white !important;
        border: 1px solid #ccc !important;
    }
    
    .project-marker {
        animation: none !important;
    }
}