.wml-read-more-text-reveal {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
}

.wml-read-more-container {
    position: relative;
    margin: 0;
    padding: 0;
    margin-bottom: 0 !important;
}

.wml-read-more-text {
    position: relative;
    margin-bottom: 0;
    word-wrap: break-word;
}

.wml-read-more-text .wml-visible-text {
    display: block;
    margin-bottom: 0;
}

/* Hide hidden text initially - will be shown when expanded with smooth animation */
.wml-read-more-text .wml-hidden-text {
    display: block;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.wml-read-more-text.expanded .wml-hidden-text {
    max-height: 5000px;
    margin-top: 1rem;
    opacity: 1;
    transform: translateY(0);
}

/* Button Styles */
.wml-read-more-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem; /* Default padding, can be overridden by inline styles */
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1.5;
    vertical-align: baseline;
}

/* Inline button styles */
.wml-read-more-btn-inline {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.5rem 1rem; /* Default padding, can be overridden by inline styles */
    font-size: 0.9em;
    vertical-align: baseline;
    white-space: nowrap;
}

/* Block button styles */
.wml-read-more-btn-block {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Container adjustments for inline button */
.wml-read-more-container.button-inline {
    display: inline;
}

.wml-read-more-container.button-inline .wml-read-more-text {
    margin-bottom: 0;
    display: inline;
}

.wml-read-more-container.button-inline .wml-visible-text {
    display: inline;
}

.wml-read-more-container.button-inline .wml-hidden-text {
    display: block;
    margin-top: 0.5rem;
}

.wml-read-more-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wml-read-more-btn:active {
    transform: translateY(0);
}

/* Modal/Popup Styles */
.wml-read-more-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

.wml-read-more-modal.active {
    display: flex;
}

.wml-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
    animation: fadeIn 0.3s ease;
}

.wml-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;
    animation: slideUp 0.3s ease;
    padding: 2rem;
    margin: auto;
}

.wml-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    z-index: 10;
}

.wml-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #000000;
}

.wml-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    padding-right: 3rem;
    color: inherit;
}

.wml-modal-body {
    color: inherit;
    line-height: 1.6;
}

.wml-modal-body .wml-modal-visible-text,
.wml-modal-body .wml-modal-hidden-text {
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .wml-read-more-modal {
        padding: 1rem;
    }
    
    .wml-modal-content {
        padding: 1.5rem;
        max-height: 95vh;
    }
    
    .wml-modal-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .wml-modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 2rem;
        height: 2rem;
        font-size: 1.5rem;
    }
}

