/* ===================================
   Typing Animation Overlay Styles
   =================================== */

.typing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    /* background: rgba(0, 0, 0, 0.4); */
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    pointer-events: none;
    padding: 40px;
}

.typing-content {
    text-align: left;
    width: 40%;
    max-width: none;
}

.typing-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
}

.typing-line {
    height: auto;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
    width: 100%;
}

.typing-line.active {
    opacity: 1;
    transform: translateY(0);
}

.typing-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    font-family: 'Inter', sans-serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    letter-spacing: 1px;
    overflow: hidden;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.2;
    border-right: 4px solid transparent;
    display: inline-block;
    width: 100%;
    max-width: 100%;
}

.typing-cursor {
    font-size: 2.5rem;
    color: white;
    animation: blink 1.2s ease-in-out infinite;
    margin-left: 2px;
    font-weight: 700;
    transition: opacity 0.3s ease;
}

.typing-text.typing {
    border-right-color: white;
    animation: typing-width var(--typing-duration, 2s) steps(var(--char-count, 20), end) forwards;
}

.typing-text.typed {
    border-right-color: transparent;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    40% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    90% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes typing-width {
    from {
        width: 0;
        border-right-color: white;
    }

    to {
        width: 100%;
        border-right-color: white;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .typing-overlay {
        padding: 30px 20px;
    }

    .typing-content {
        width: 40%;
        /* Keep consistent 40% width */
    }

    .typing-text {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .typing-cursor {
        font-size: 1.8rem;
    }

    .typing-line {
        min-height: 50px;
    }
}

@media (max-width: 576px) {
    .typing-overlay {
        padding: 20px 15px;
    }

    .typing-content {
        width: 40%;
        /* Keep consistent 40% width */
    }

    .typing-text {
        font-size: 1.4rem;
        line-height: 1.4;
    }

    .typing-cursor {
        font-size: 1.4rem;
    }

    .typing-line {
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .typing-overlay {
        padding: 15px 10px;
    }

    .typing-content {
        width: 40%;
        /* Keep consistent 40% width */
    }

    .typing-text {
        font-size: 1.2rem;
        letter-spacing: 0.5px;
        line-height: 1.4;
    }

    .typing-cursor {
        font-size: 1.2rem;
    }

    .typing-line {
        min-height: 35px;
    }
}