/**
 * Frontend Styles
 * Typing Text Block
 */

.typing-text-block {
    font-family: inherit;
    font-size: 18px;
    line-height: 1.6;
    padding: 20px 0;
    min-height: 40px;
}

.typing-text-output {
    display: inline-block;
    white-space: pre-wrap;
    word-wrap: break-word;
    position: relative;
}

/* Cursor Styles */
.typing-cursor {
    display: inline-block;
    margin-left: 2px;
    opacity: 1;
}

/* Solid cursor while actively typing */
.typing-cursor.typing-active {
    animation: none;
    opacity: 1;
}

/* Blinking cursor when idle */
.typing-cursor.typing-idle {
    animation: blink 1s step-end infinite;
}

/* Cursor blink animation */
@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Fade out cursor when complete */
.typing-cursor.typing-complete {
    animation: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Responsive font sizing */
@media (max-width: 768px) {
    .typing-text-block {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .typing-text-block {
        font-size: 14px;
    }
}

/* Text alignment support */
.typing-text-block.has-text-align-left {
    text-align: left;
}

.typing-text-block.has-text-align-center {
    text-align: center;
}

.typing-text-block.has-text-align-right {
    text-align: right;
}

/* Print styles - show full text immediately */
@media print {
    .typing-text-block {
        opacity: 1 !important;
    }
    
    .typing-cursor {
        display: none !important;
    }
}

/* Smooth appearance */
.typing-text-block {
    opacity: 0;
    animation: fadeIn 0.3s ease-in forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}
