.text-widget {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-widget-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Text alignment variants */
.text-widget-content[style*=\"text-align: left\"] {
  justify-content: flex-start;
  text-align: left;
}

.text-widget-content[style*=\"text-align: right\"] {
  justify-content: flex-end;
  text-align: right;
}

.text-widget-content[style*=\"text-align: center\"] {
  justify-content: center;
  text-align: center;
}

.text-widget-content[style*=\"text-align: justify\"] {
  text-align: justify;
}

/* Scrollable text for overflow content */
.text-widget-scrollable {
  overflow-y: auto;
  overflow-x: hidden;
}

.text-widget-scrollable::-webkit-scrollbar {
  width: 6px;
}

.text-widget-scrollable::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.text-widget-scrollable::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

.text-widget-scrollable::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* Responsive font sizing */
@media (max-width: 768px) {
  .text-widget-content {
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  .text-widget-content {
    font-size: 0.8em;
  }
}