/**
 * Matrix Soul Calculator - Styles
 */

/* Results Containers */
.matrix-results-container,
.compatibility-results-container {
    max-width: 1000px;
    margin: 30px auto;
    font-family: 'Arial', sans-serif;
}

/* Matrix Results */
.matrix-results,
.compatibility-results {
    background-color: transparent;
    color: #ffffff;
    border-radius: 10px;
    padding: 30px;
    background-size: contain;
    position: relative;
    overflow: hidden;
    background-repeat: no-repeat;
}

/* Star particles effect */
.matrix-results::before,
.compatibility-results::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, #ffffff 1px, transparent 1px);
    background-size: 100px 100px;
    background-position: 0 0;
    opacity: 0.1;
    pointer-events: none;
}

/* Name and Date Headers */
.matrix-name,
.compatibility-title {
    font-size: 28px;
    text-align: center;
    margin-bottom: 25px;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 1px;
}

.compatibility-dates {
    text-align: center;
    margin-bottom: 25px;
    font-size: 20px;
    color: #dddddd;
}

.date-separator {
    margin: 0 10px;
    color: #ffffff;
    font-weight: bold;
}

/* Matrix Visualization */
.matrix-visualization {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 40px;
}

.matrix-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(173, 216, 230, 0.3));
}

/* Matrix Hexagon */
.matrix-hexagon {
    filter: drop-shadow(0 0 15px rgba(109, 109, 156, 0.5));
}

/* Chakra Chart */
.chakra-chart {
    margin: 40px 0;
}

.chakra-chart h3 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 600;
}

.chakra-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 0 auto;
    max-width: 800px;
    background-color: rgba(10, 5, 45, 0.7);
    border-radius: 8px;
    overflow: hidden;
}

.chakra-table th,
.chakra-table td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chakra-table th {
    background-color: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
}

.chakra-table td {
    font-size: 18px;
    font-weight: 500;
}

/* Chakra Row Colors */
.chakra-row.sahasrara {
    background-color: rgba(143, 0, 255, 0.3);
}

.chakra-row.ajna {
    background-color: rgba(75, 0, 255, 0.3);
}

.chakra-row.vishuddha {
    background-color: rgba(0, 191, 255, 0.3);
}

.chakra-row.anahata {
    background-color: rgba(0, 255, 64, 0.3);
}

.chakra-row.manipura {
    background-color: rgba(255, 255, 0, 0.3);
}

.chakra-row.svadhisthana {
    background-color: rgba(255, 128, 0, 0.3);
}

.chakra-row.muladhara {
    background-color: rgba(255, 0, 0, 0.3);
}

.chakra-row.result {
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: bold;
}

/* Life Purpose Section */
.life-purpose {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 40px 0;
    justify-content: center;
}

.purpose-box {
    flex: 1;
    min-width: 300px;
    background-color: rgba(10, 5, 45, 0.7);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.purpose-box h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: 600;
}

.purpose-description {
    font-size: 14px;
    color: #bbbbbb;
    margin-bottom: 20px;
    line-height: 1.5;
}

.purpose-details {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.purpose-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    justify-content: center;
}

.purpose-item.result {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: bold;
}

.purpose-label {
    font-size: 12px;
    color: #aaaaaa;
}

.purpose-value {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
}

.purpose-symbol {
    color: #aaaaaa;
    font-size: 18px;
}

.general-purpose,
.planetary-purpose {
    min-width: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.general-purpose .purpose-value,
.planetary-purpose .purpose-value {
    font-size: 32px;
    margin-top: 10px;
}

/* Compatibility Results */
.compatibility-score-wrapper {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.compatibility-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(233, 30, 99, 0.8) 0%, rgba(156, 39, 176, 0.8) 100%);
    box-shadow: 0 0 20px rgba(233, 30, 99, 0.5);
    position: relative;
}

.compatibility-score::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.4;
    }
    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.score-value {
    font-size: 48px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.score-label {
    font-size: 14px;
    color: #ffffff;
    margin-top: 5px;
}

/* Compatibility Details */
.compatibility-details {
    margin-top: 40px;
}

.compatibility-section {
    margin-bottom: 30px;
}

.compatibility-section h3 {
    text-align: center;
    font-size: 20px;
    margin-bottom: 15px;
    color: #ffffff;
}

.compatibility-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.compatibility-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 20px;
    text-align: center;
    min-width: 120px;
}

.compatibility-item.result {
    background-color: rgba(233, 30, 99, 0.3);
}

.compatibility-label {
    font-size: 14px;
    color: #bbbbbb;
    margin-bottom: 5px;
    display: block;
}

.compatibility-value {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .matrix-results,
    .compatibility-results {
        padding: 20px;
    }
    
    .life-purpose {
        flex-direction: column;
    }
    
    .purpose-box {
        min-width: auto;
    }
    
    .chakra-table th,
    .chakra-table td {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .compatibility-score {
        width: 120px;
        height: 120px;
    }
    
    .score-value {
        font-size: 36px;
    }
    
    .compatibility-item {
        min-width: 100px;
        padding: 10px 15px;
    }
}

/* Animation for matrix results appearance */
.matrix-results,
.compatibility-results {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Specific styles for the result numbers */
.matrix-cell-value,
.chart-heart-value,
.purpose-value,
.compatibility-value {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Circle points on matrix diagram */
circle {
    filter: drop-shadow(0 0 5px currentColor);
    transition: all 0.3s ease;
}

circle:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px currentColor);
}

/* Add glow effect to specific points based on their color */
circle[fill="#b088ff"] {
    filter: drop-shadow(0 0 8px rgba(176, 136, 255, 0.8));
}

circle[fill="#88c4ff"] {
    filter: drop-shadow(0 0 8px rgba(136, 196, 255, 0.8));
}

circle[fill="#ff8888"] {
    filter: drop-shadow(0 0 8px rgba(255, 136, 136, 0.8));
}

circle[fill="#55bbff"] {
    filter: drop-shadow(0 0 8px rgba(85, 187, 255, 0.8));
}

circle[fill="#88ffcc"] {
    filter: drop-shadow(0 0 8px rgba(136, 255, 204, 0.8));
}

/* Make matrix visualization interactive */
.matrix-svg text {
    font-family: Arial, sans-serif;
    font-size: 14px;
    user-select: none;
}

/* Add some space around the visualization */
.matrix-visualization,
.compatibility-visualization {
    margin-bottom: 40px;
}

/* Background SVG elements */
.background-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.star {
  opacity: 0.7;
  animation: twinkle 3s infinite alternate;
}

.star-medium {
  opacity: 0.8;
  animation: twinkle 4s infinite alternate;
}

.star-large {
  opacity: 0.9;
  animation: twinkle 5s infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* Background shapes */
.blue-crayola, .circle-heliotrope, .light-blue {
  opacity: 0.15;
  mix-blend-mode: screen;
}
.matrix-human-visualization {
    border-radius: 8px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}
.matrix-birth-date {
    text-align: center;
    font-family: 'Heebo', sans-serif;
    color: #fff;

}
.matrix-human-svg {
    width: 100%;
    height: auto;
    max-width: 600px;
    margin: 0 auto;
    display: block;
}

.chakra-point circle {
    transition: all 0.3s ease;
}

.chakra-point:hover circle {
    r: 25;
    filter: brightness(1.2);
}

.chakra-table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
    background: rgba(10, 5, 32, 0.9);
    color: #fff;
}

.chakra-table th,
.chakra-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chakra-table th {
    background-color: rgba(25, 25, 80, 0.8);
    color: #fff;
    font-weight: bold;
}

.chakra-row.sahasrara {
    background-color: rgba(156, 39, 176, 0.7);
}

.chakra-row.ajna {
    background-color: rgba(123, 31, 162, 0.7);
}

.chakra-row.vishuddha {
    background-color: rgba(33, 150, 243, 0.7);
}

.chakra-row.anahata {
    background-color: rgba(76, 175, 80, 0.7);
}

.chakra-row.manipura {
    background-color: rgba(255, 235, 59, 0.6);
    color: #333;
}

.chakra-row.svadhisthana {
    background-color: rgba(255, 152, 0, 0.7);
}

.chakra-row.muladhara {
    background-color: rgba(244, 67, 54, 0.7);
}

.chakra-row.result {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    font-weight: bold;
}

.matrix-calculator-wrapper,
.compatibility-calculator-wrapper {
  padding: 20px;
  position: relative;
}

/* Style for the visualization container in results */
.matrix-human-visualization {
  position: relative; 
  width: 100%; 
  max-width: 700px; /* Optional: Limit max width */
  margin: 20px auto; /* Center the visualization */
}

.matrix-points-overlay {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  animation: fadeInPoints 0.5s ease-out;
}

.matrix-human-visualization img {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1; /* Ensure image is behind the overlay */
}

/* Add other styles as needed for text, tables etc */
.matrix-results h2, .matrix-results h3,
.compatibility-results h2, .compatibility-results h3 {
    /* Example text styling */
    margin-bottom: 15px;
    text-align: center;
}

/* Add some basic styling for the tables */
.chakra-table, 
.compatibility-details table /* Assuming you might use tables */ {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent background */
    border-radius: 8px;
    overflow: hidden; /* For rounded corners */
}

.chakra-table th, .chakra-table td,
.compatibility-details th, .compatibility-details td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

.chakra-table th {
    background-color: #f2f2f2;
}

/* Style for purpose boxes */
.life-purpose {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.purpose-box {
    background-color: rgba(230, 240, 255, 0.85); /* Light blue semi-transparent */
    border: 1px solid #b3d1ff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    flex: 1 1 200px; /* Allow wrapping */
    min-width: 180px;
}
.purpose-box h3 {
    margin-top: 0;
    font-size: 1.1em;
    color: #003366;
}
.purpose-description {
    font-size: 0.9em;
    color: #333;
    min-height: 40px; /* Ensure some space */
}
.purpose-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
    font-weight: bold;
}
.purpose-item .purpose-label {
    font-size: 0.8em;
    display: block;
    color: #555;
}
.purpose-item .purpose-value {
    font-size: 1.4em;
    color: #0056b3;
}
.purpose-symbol {
    font-size: 1.2em;
    color: #555;
}
.purpose-item.result .purpose-value {
    color: #d9534f; /* Highlight result */
    font-size: 1.6em;
}

.general-purpose .purpose-value,
.planetary-purpose .purpose-value {
     font-size: 1.8em;
     font-weight: bold;
     color: #d9534f; /* Highlight result */
     margin-top: 10px;
}

/* Compatibility styles */
.compatibility-visualization {
    padding: 20px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    margin-top: 20px;
}
.compatibility-score-wrapper {
    text-align: center;
    margin-bottom: 25px;
}
.compatibility-score {
    display: inline-block;
    border: 5px solid #4CAF50;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    line-height: 1; /* Adjust line height */
    display: flex; /* Use flexbox for centering */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #e8f5e9;
}
.compatibility-score .score-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #2e7d32;
}
.compatibility-score .score-label {
    font-size: 0.9em;
    margin-top: 5px;
}
.compatibility-details .compatibility-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #f9f9f9;
}
.compatibility-details h3 {
   margin-top: 0;
   border-bottom: 1px solid #ddd;
   padding-bottom: 5px;
   font-size: 1.2em;
}
.compatibility-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-around; /* Distribute items */
    align-items: center;
}
.compatibility-item {
    text-align: center;
}
.compatibility-label {
    font-size: 0.9em;
    display: block;
}
.compatibility-value {
    font-size: 1.3em;
    font-weight: bold;
}
.compatibility-item.result .compatibility-value {
    color: #d9534f; /* Highlight results */
    font-size: 1.5em;
}

/* Matrix Loading Animation */
.matrix-loading {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.matrix-loading svg {
  filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.6));
}

/* Ensure background image is always visible - NOW FOR INLINE SVG */
.matrix-visualization-background-wrapper {
  position: relative; /* Crucial for absolute positioning of overlay */
  width: 100%;
  max-width: 700px;
  margin: 0 auto 0;
  /* height: auto; or a specific aspect ratio if needed */
}

.matrix-background-svg-inline-wrapper {
  width: 100%;
  height: auto; /* Or set a specific height if your SVG needs it */
  line-height: 0; /* Prevent extra space if SVG is display: inline-block by default */
}

.matrix-background-svg-inline-wrapper svg {
  width: 100%;
  height: auto;
  display: block; /* Good practice for SVGs to control layout */
}

/* This is the container for the points SVG, which is loaded via AJAX */
.matrix-results-ajax-target {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2; /* Ensure it's above the background SVG */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* This is the actual points SVG loaded into the ajax-target */
.matrix-points-overlay {
  width: 100%;
  height: 100%;
  /* position: absolute; NOT needed here as its parent .matrix-results-ajax-target is already absolute */
  /* top: 0; left: 0; */
  z-index: 10; /* If it needs to be above anything within ajax-target, but ajax-target handles layer above background */
  animation: fadeInPoints 0.5s ease-out;
}

/* Initial placeholder (empty state) */
.matrix-initial-placeholder {
  width: 100%;
  height: 100%;
  background: transparent;
  position: relative;
}

/* Initial connection lines SVG */
.matrix-initial-connection-lines {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  opacity: 1;
  animation: fadeInLines 0.8s ease-out;
}

/* Animation for initial connection lines */
@keyframes fadeInLines {
  from {
    opacity: 0;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
  }
  to {
    opacity: 1;
    stroke-dasharray: 0;
    stroke-dashoffset: 0;
  }
}

/* Style for error messages */
.matrix-error {
  color: #ff5252;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 15px;
  border-radius: 5px;
  font-weight: bold;
  width: 80%;
  margin: 0 auto;
}

/* Animation for when results load */
@keyframes fadeInPoints {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* SVG circle animations */
.matrix-points-overlay circle {
  transition: all 0.3s ease;
}

.matrix-points-overlay circle:hover {
  filter: brightness(1.2) drop-shadow(0 0 8px currentColor);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .matrix-loading svg {
    width: 60px;
    height: 60px;
  }
}

/* Ensure compatibility shortcode follows the same structure */
.compatibility-visualization-background-wrapper {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto 20px;
}

.compatibility-background-image-persistent {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
}

.compatibility-results-ajax-target {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compatibility-initial-placeholder {
  width: 100%;
  height: 100%;
  background: transparent;
}

.matrix-person-info {
  text-align: center;
  margin-bottom: 30px;
}

/* Basic Analysis Styles */
.basic-analysis {
  max-width: 700px;
  margin: 0 auto;
}

.matrix-key-points {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.matrix-key-points h3 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.key-points-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 15px;
}

.key-point {
  background-color: #f5f5f5;
  border-radius: 5px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.key-point-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.key-point-value {
  font-size: 24px;
  font-weight: bold;
  color: #0056b3;
}
.matrix-calculator-output-area {
  direction: rtl;;
}
/* Modern Dark-themed Chakra Chart */
.matrix-health-chart {
  background-color: #1c1c1c;
  border-radius: 20px;
  padding: 20px;
  color: #ffffff;
  max-width: inherit; /* Adjusted for potentially wider content */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  /* dir="rtl" is set in HTML, CSS will respect it */
}

.chart-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
  letter-spacing: 1px;
  color: #ffffff;
  text-align: start; /* Align title to the right for RTL */
}

/* Header for the chakra value columns */
.chakra-list-header {
  display: flex;
  padding: 10px 0;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 14px;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.7);
}

.header-item {
  text-align: center;
}

.info-header {
  flex-grow: 1; 
  text-align: right; /* Align info header to the right for RTL */
  padding-right: 65px; /* Approx width of icon + margin, now on the right */
  padding-left: 0; /* Reset left padding */
}

.value-header {
  min-width: 50px; 
  margin-right: 10px; /* Use margin-right for RTL spacing */
  margin-left: 0;
  text-align: center;
}

.chakra-list {
  display: flex;
  flex-direction: column;
}

.chakra-item {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.chakra-item:last-child {
  border-bottom: none;
}

.chakra-icon {
  width: 50px;
  height: 50px;
  margin-left: 15px; /* Icon on the right for RTL, so margin-left */
  margin-right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0; 
  order: 1; /* Move icon to the right of chakra-info */
}

.chakra-svg {
  width: 40px;
  height: 40px;
}

/* Styling for actual chakra SVG files */
.chakra-icon .actual-chakra-svg {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chakra-icon .actual-chakra-svg svg {
  width: 100%;
  height: 100%;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
}

.chakra-info {
  flex-grow: 1;
  padding-left: 10px; /* Text on the left of icon, so padding-left */
  padding-right: 0;
  text-align: right; /* Align chakra info text to the right for RTL */
  order: 2; /* Ensure info is to the left of values */
}

.chakra-name {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 4px 0;
}

.chakra-description {
  font-size: 14px;
  margin: 0 0 2px 0;
  opacity: 0.8;
}

.chakra-location {
  font-size: 12px;
  margin: 0;
  opacity: 0.6;
}

.chakra-values-container {
  display: flex;
  flex-shrink: 0; 
  margin-left: auto; /* Push values to the far left in RTL */
  order: 3; /* Values after info */
}

.chakra-value {
  font-size: 16px;
  font-weight: bold;
  min-width: 50px; 
  text-align: center;
  margin-right: 10px; /* Use margin-right for RTL spacing */
  margin-left: 0;
  color: #ffffff; 
  opacity: 1; 
}
.chakra-value:first-child {
    margin-right: 0; /* No margin for the first value in RTL */
    margin-left: 10px; /* Add left margin if it's not the very first overall item in the row */
}

/* Chakra colors (applied to icon and name) */
.chakra-item.sahasrara .chakra-icon svg,
.chakra-item.sahasrara .chakra-name {
  color: #9C27B0;
}

.chakra-item.ajna .chakra-icon svg,
.chakra-item.ajna .chakra-name {
  color: #7B1FA2;
}

.chakra-item.vishuddha .chakra-icon svg,
.chakra-item.vishuddha .chakra-name {
  color: #2196F3;
}

.chakra-item.anahata .chakra-icon svg,
.chakra-item.anahata .chakra-name {
  color: #4CAF50;
}

.chakra-item.manipura .chakra-icon svg,
.chakra-item.manipura .chakra-name {
  color: #FFEB3B;
}

.chakra-item.svadhisthana .chakra-icon svg,
.chakra-item.svadhisthana .chakra-name {
  color: #FF9800;
}

.chakra-item.muladhara .chakra-icon svg,
.chakra-item.muladhara .chakra-name {
  color: #F44336;
}

.chakra-item.summary .chakra-icon svg {
    color: #888888;
}

/* Remove old basic analysis styles if they exist, or ensure they don't conflict */
.basic-analysis, .matrix-key-points, .key-points-grid, .key-point-item {
    display: none; /* Hide old basic analysis if it was still being generated elsewhere */
}

/* Responsive styles */
@media (max-width: 600px) {
  .info-header {
    padding-right: 10px; /* Adjust for smaller screens */
    min-width: 100px; /* Give a bit more space for info */
  }
  .header-item.value-header,
  .chakra-value {
    min-width: 30px; /* Make value columns smaller */
    font-size: 13px;
    margin-right: 5px;
  }
  .chakra-icon {
      margin-left: 10px; /* Adjust icon margin for smaller screens */
  }
  .chakra-info {
      padding-left: 5px;
  }
}

/* Save to PDF Button */
.matrix-actions-container {
  text-align: center;
  margin-top: 30px; /* Increased margin */
  margin-bottom: 20px;
}

.matrix-action-button {
  background-color: #182430;
  border: 1px solid #9FDDFF;
  color: #9FDDFF; /* Assuming initial text color to contrast with dark background */
  padding: 12px 25px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-family: 'Heebo', sans-serif; /* Added Heebo font */
  font-size: 18px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.matrix-action-button:hover {
  background-color: #9FDDFF;
  color: #182430;
  border-color: #9FDDFF; /* Ensure border color remains or changes as desired on hover */
}

/* Tooltip Styles */
.matrix-tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  z-index: 10000; /* Ensure it's on top */
  max-width: 250px;
  text-align: left;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  display: none; /* Initially hidden, shown by JS */
}

/* Optional: Add a small arrow to the tooltip */
.matrix-tooltip::after {
  content: '';
  position: absolute;
  bottom: -5px; /* Position arrow at the bottom center */
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
}