body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}
header {
    background: #333;
    color: #fff;
    padding: 10px 20px;
    text-align: center;
}
nav {
    margin: 10px 0;
}
nav a {
    color: #fff;
    margin: 0 15px;
    text-decoration: none;
}
.container {
    display: flex;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}
.content {
    flex: 3; /* Main content area */
    margin-right: 20px;
}
.sidebar {
    flex: 1; /* Sidebar area */
    background: #f4f4f4;
    padding: 15px;
}

.tooltip {
    display: none;
    position: absolute;
    background-color: #555;
    color: #fff;
    padding: 5px;
    border-radius: 6px;
    z-index: 1;
}
.tooltip-trigger {
    position: relative;
    display: inline-block;
}

/* Grid container */
.grid-container {
    display: grid;
    grid-template-areas: "controlpanel mandalaarea";
    gap: 24px;
    align-items: start;
}

/* Control panel area under tooltip */
.controlpanel {
    grid-area: controlpanel;
    margin-top: 50px;           /* space below tooltip */
    margin-bottom: 40px;
    padding: 10px;
    background: #f9f9f9;        /* light background to separate from page */
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
    /* width: fit-content; */
}

/* Each dropdown group */
.controlpanel .field { margin-bottom: 10px;font-size: 1.5rem;;}
.controlpanel label { display: block; font-size: 1.5rem;}
.controlpanel select {
    width: 100%;
    padding: 6px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.panel-header h3 {
  margin: 0;
  font-size: 16px;
}

.hide-btn {
  background: #ccc;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.panel-body {
  transition: max-height 0.3s ease;
  display: block;
}

.mandalaarea {
    grid-area: mandalaarea;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mandalaarea svg {  
    display: block; /* Required for margin auto */  
    max-width: 100%;
    height: auto;
}  

svg[id^="mandala"] {
  touch-action: none; /* lets the class handle panning/zooming */
  cursor: grab;
}

article {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
    font-size: 1.5rem;
}
.zoom-controls {
    margin-top: 12px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;       /* nice on small screens */
}
.zoom-button {
    background-color: #043D66; /* Blue */
    color: white;
    border: none;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 4px; /* Rounded corners */
    transition-duration: 0.4s; /* Smooth hover effect */
    cursor: pointer;
}

.next-post {
    background-color: #043D66; /* Blue */
    color: white;
    border: none;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 4px; /* Rounded corners */
    transition-duration: 0.4s; /* Smooth hover effect */
    cursor: pointer;
    position: absolute; /* Positioning the button */
    right: 20px; /* Distance from the right edge */
    /*bottom: 20px;  Optional: Distance from the bottom edge */
}
.prev-post {
    background-color: #043D66; /* Blue */
    color: white;
    border: none;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 4px; /* Rounded corners */
    transition-duration: 0.4s; /* Smooth hover effect */
    cursor: pointer;
    position: absolute; /* Positioning the button */
    right: 123px; /* Distance from the right edge */
    /*bottom: 20px;  Optional: Distance from the bottom edge */
}

.toggle-btn {
    grid-area: toggle-btn;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1em;
    line-height: .5;
    margin-right: 0.5em;
}

.icon-btn {
  background: #eee;
  border: none;
  border-radius: 50%;
  padding: 0.5em;
  cursor: pointer;
  color: #444;
  font-size: 1.2em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5em;      /* space between buttons */
  transition: background 0.2s, color 0.2s;
}

.icon-btn:hover {
  background: #ddd;
}

.icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.icon-btn:focus {
  outline: 2px solid #666;
  outline-offset: 2px;
}

/* Special coloring */
.add-btn:hover {
  background: #d4edda;   /* light green */
  color: #155724;        /* dark green icon */
}

.delete-btn:hover {
  background: #f8d7da;   /* light red */
  color: #b00020;        /* dark red icon */
}


.controlpanel.collapsed .panel-body {
    display: none;
}

footer {
    text-align: center;
    padding: 10px 0;
    background: #333;
    color: #fff;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* General slider track */
input[type="range"] {
  -webkit-appearance: none; /* reset default iOS look */
  height: 30px;             /* bigger touch area */
  width: 80%;
  background: transparent;  /* let track styles show */
  touch-action: none;       /* avoid page scrolling while dragging */
  margin: 1px 0;
}

/* Track */
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: #ddd;
  border-radius: 3px;
}
input[type="range"]::-moz-range-track {
  height: 6px;
  background: #ddd;
  border-radius: 3px;
}

/* Thumb (the draggable knob) */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 28px;
  width: 28px;
  border-radius: 50%;
  background: #666;
  border: 2px solid #fff;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
  margin-top: -11px; /* aligns thumb vertically with track */
  transition: transform 0.15s ease;
} 
/* While dragging (active state) */
input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(2); /* thumb grows bigger while sliding */
}

input[type="range"]::-moz-range-thumb {
  height: 28px;
  width: 28px;
  border-radius: 50%;
  background: #666;
  border: 2px solid #fff;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
  transition: transform 0.15s ease;
}
input[type="range"]:active::-moz-range-thumb {
  transform: scale(2);
}

/* Focus ring (accessibility) */
input[type="range"]:focus {
  outline: none;
}
input[type="range"]:focus::-webkit-slider-thumb {
  background: #444;
}
input[type="range"]:focus::-moz-range-thumb {
  background: #444;
}

