/* Main heatmap container */
.heatmap-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.heatmap-main {
    flex: 0 0 auto;
}

.heatmap-content {
    padding: 16px;
    font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
    max-width: 1100px;
    margin: 0 auto;
}

.heatmap-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.heatmap-title {
    font-size: 14px;
    text-align: right;
}

.heatmap-title-main {
    font-weight: bold;
    font-size: 24px;
}

.heatmap-title-sub {
    font-weight: normal;
}

.heatmap-probability-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-weight: bold;
    margin-bottom: 12px;
    margin-left: 40px;
    height: 24px;
}

.heatmap-grid-container {
    display: flex;
    flex-direction: column;
}

.heatmap-matrix-container {
    display: flex;
    position: relative;
    overflow: visible;
    border-radius: 8px;
    padding: 0 40px 40px 0;
}

.heatmap-background-image {
    content: "";
    position: absolute;
    top: 0;
    left: 128px;
    width: 508px;
    height: 400px;
    background: 
        radial-gradient(ellipse at top right, rgba(239, 68, 68, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at top left, rgba(20, 184, 166, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(234, 179, 8, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(59, 130, 246, 0.35) 0%, transparent 50%);
    background-repeat: no-repeat;
    background-position: left;
    z-index: 0;
    border-radius: 8px;
}

.heatmap-matrix-content {
    display: flex;
    position: relative;
    z-index: 1;
    width: 100%;
}

.heatmap-probability-column {
    width: 120px;
    margin-right: 8px;
    display: flex;
    flex-direction: column;
    background-color: white;
}

.heatmap-probability-cell {
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding-right: 8px;
    background-color: white;
}

.heatmap-probability-level {
    font-size: 14px;
    font-weight: 600;
}

.heatmap-probability-range {
    font-size: 12px;
    color: #666;
}

.heatmap-matrix-cells {
    display: flex;
    flex-direction: column;
    border: 1px solid #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.heatmap-matrix-row {
    display: flex;
}

.heatmap-cell {
    width: 127px;
    min-width: 127px;
    height: 80px;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0px;
    box-sizing: border-box;
}

.heatmap-item {
    border-radius: 16px;
    width: 45px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin: 2px;
    padding: 0 6px;
    z-index: 1;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.25),
        0 2px 6px rgba(0, 0, 0, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.heatmap-item:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.3),
        0 3px 8px rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.heatmap-item-id {
    margin-right: 3px;
    font-size: 12px;
    font-weight: normal;
}

.heatmap-label-container {
    display: flex;
    margin-top: -28px;
    margin-left: 128px;
}

.heatmap-consequence-label {
    width: 128px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.heatmap-consequence-label-container {
    display: flex;
    justify-content: flex-end;
    margin-left: 175px;
    width: 468px;
}

.heatmap-consequence-label-text {
    text-align: right;
    font-weight: bold;
    font-size: 14px;
    margin-top: 10px;
    padding-right: 8px;
    width: 100%;
}

/* Legend styles */
.heatmap-legend {
    display: flex;
    justify-content: center;
    padding: 16px;
    margin-top: 16px;
    border-top: 1px solid #ccc;
}

.heatmap-legend-title {
    width: 150px;
    text-align: right;
    padding-right: 8px;
    margin-right: 16px;
    font-weight: bold;
    font-size: 14px;
}

.heatmap-legend-item {
    display: flex;
    align-items: center;
    margin-right: 16px;
}

.heatmap-legend-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    border-radius: 12px;
    margin-right: 2px;
}

.heatmap-legend-label {
    font-size: 12px;
    margin-top: -2px;
}

/* Tooltip styles */
.heatmap-tooltip {
    /* All styling is now handled inline in the tooltip content */
}

/* Expansion table styles */
.heatmap-expansion-table {
    flex: 1;
    margin-left: 24px;
    margin-top: 16px;
    min-width: 300px;
}

.heatmap-expansion-table-inner {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.heatmap-expansion-header {
    border-bottom: 2px solid #eee;
}

.heatmap-expansion-header-cell {
    text-align: left;
    padding: 8px;
}

.heatmap-expansion-header-cell:first-child {
    width: 40px;
}

.heatmap-expansion-row {
    cursor: pointer;
}

.heatmap-expansion-row.expanded {
    background: #f9fafb;
}

.heatmap-expansion-cell {
    padding: 8px;
}

.heatmap-expansion-row.expanded .heatmap-expansion-cell {
    font-weight: bold;
}

.heatmap-expansion-detail {
    padding: 0;
    background: #fff;
}

.heatmap-expansion-detail-content {
    margin: 16px;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.heatmap-expansion-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.heatmap-expansion-detail-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--orca-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 22px;
    color: #fff;
}

.heatmap-expansion-detail-title {
    font-size: 18px;
    font-weight: 600;
}

.heatmap-expansion-detail-owner {
    color: #666;
    font-size: 14px;
}

.heatmap-expansion-detail-category {
    margin-left: auto;
    background: #065f46;
    color: #fff;
    border-radius: 16px;
    padding: 4px 16px;
    font-size: 12px;
}

.heatmap-expansion-detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 12px;
}

.heatmap-expansion-chip-label {
    color: #888;
    font-size: 12px;
    margin-bottom: 4px;
}

.heatmap-expansion-chip {
    border-radius: 12px;
    padding: 2px 12px;
    display: inline-block;
}

/* Chip/Badge styles - ensure rounded corners work without Tailwind */
.heatmap-expansion-detail-content span[class*="inline-flex"],
.heatmap-expansion-detail-content .rounded-full {
    border-radius: 9999px !important;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    border-width: 1px;
    border-style: solid;
}

/* Fallback for any badge/chip elements */
.heatmap-expansion-detail-chips span {
    border-radius: 9999px !important;
}

/* Loading, error, and empty states */
.heatmap-loading {
    padding: 16px;
}

.heatmap-error {
    padding: 16px;
    color: #ef4444;
}

.heatmap-empty {
    padding: 16px;
}