/**
 * Pretpot Expandable Text 1 Widget Styles
 * 
 * @package Pretpot_Elementor_Kit
 * @since 2.7.6
 */

/* Wrapper and Layout */
.pretpot-expandable-text {
    position: relative;
    width: 100%;
}

.pretpot-expandable-heading {
    margin: 0 0 15px 0;
    padding: 0;
}

/* Content containers */
.pretpot-expandable-content {
    margin: 0 0 15px 0;
    overflow: hidden;
}

/* Truncated content indicator */
.pretpot-expandable-content.pretpot-truncated {
    position: relative;
}

/* Full content container */
.pretpot-expandable-full-content {
    display: none;
    margin: 0 0 15px 0;
    animation: pretpotFadeIn 0.3s ease;
}

/* Expanded state - inline mode */
.pretpot-expandable-wrapper.is-expanded .pretpot-truncated {
    display: none;
}

.pretpot-expandable-wrapper.is-expanded .pretpot-expandable-full-content {
    display: block;
}

@keyframes pretpotFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Animation prevention state */
.pretpot-expandable-wrapper.is-animating {
    pointer-events: none;
}

/* Button Styles */
.pretpot-expandable-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid currentColor;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pretpot-expandable-btn:hover {
    opacity: 0.8;
}

.pretpot-expandable-btn:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.pretpot-btn-icon {
    display: inline-flex;
    transition: transform 0.3s ease;
}

.pretpot-expandable-wrapper.is-expanded .pretpot-btn-icon {
    transform: rotate(180deg);
}

/* Modal Styles */
.pretpot-expandable-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pretpot-expandable-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.pretpot-expandable-modal-content {
    position: relative;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.pretpot-expandable-modal-overlay.is-active .pretpot-expandable-modal-content {
    transform: scale(1);
}

.pretpot-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.pretpot-modal-close:hover {
    opacity: 1;
}

.pretpot-modal-heading {
    margin: 0 0 20px 0;
    padding-right: 40px;
}

.pretpot-modal-body {
    line-height: 1.6;
}

/* Prevent body scroll when modal is open */
body.pretpot-modal-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .pretpot-expandable-modal-content {
        padding: 30px 20px;
        max-height: 95vh;
    }
    
    .pretpot-expandable-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .pretpot-expandable-content,
    .pretpot-expandable-btn,
    .pretpot-btn-icon,
    .pretpot-expandable-modal-overlay,
    .pretpot-expandable-modal-content,
    .pretpot-expandable-full-content {
        transition: none;
        animation: none;
    }
}

/* Print Styles */
@media print {
    .pretpot-expandable-content {
        display: block !important;
    }
    
    .pretpot-expandable-full-content,
    .pretpot-expandable-truncated,
    .pretpot-expandable-btn,
    .pretpot-expandable-modal-overlay {
        display: none !important;
    }
}