/**
 * Text Reveal on Hover Widget Styles
 */

.wml-text-reveal {
    background-color: #1d1c20;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.wml-tr-text-container {
    height: 160px;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.wml-tr-text {
    font-size: 48px;
    font-weight: 700;
    padding: 40px 0;
    margin: 0;
    line-height: 1.2;
}

/* Base layer (always visible) */
.wml-tr-base-layer {
    position: relative;
    width: 100%;
    mask-image: linear-gradient(to bottom, transparent, white, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, white, transparent);
}

.wml-tr-base-text {
    color: #323238;
    background: linear-gradient(to bottom, #323238, #1a1a1a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Reveal layer (shown on hover with clip-path) */
.wml-tr-reveal-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1d1c20;
    z-index: 20;
    will-change: clip-path;
    clip-path: inset(0 100% 0 0);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.wml-tr-reveal-layer.active {
    opacity: 1;
    transition: opacity 0s;
}

.wml-tr-reveal-text {
    color: #ffffff;
    background: linear-gradient(to bottom, #ffffff, #d4d4d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 4px 4px 15px rgba(0, 0, 0, 0.5);
}

/* Cursor line */
.wml-tr-cursor {
    position: absolute;
    top: 0;
    left: 0;
    height: 160px;
    width: 8px;
    background: linear-gradient(to bottom, transparent, #737373, transparent);
    z-index: 50;
    will-change: transform, opacity;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.wml-tr-cursor.active {
    opacity: 1;
    transition: opacity 0s;
}

/* Stars background */
.wml-tr-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.wml-tr-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: white;
    border-radius: 50%;
    opacity: 0;
    animation: wml-star-twinkle linear infinite;
}

@keyframes wml-star-twinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .wml-text-reveal {
        padding: 24px;
    }

    .wml-tr-text {
        font-size: 32px;
    }

    .wml-tr-text-container {
        height: 120px;
    }

    .wml-tr-cursor {
        height: 120px;
    }
}