/* Speech Topics Widget Styles */

.st-container {
    width: 100%;
}

.st-items-wrapper {
    width: 100%;
}

.st-item {
    position: relative;
    padding-top: 30px !important;
    border-top-width: 1px !important;
    border-top-style: solid !important;
    border-top-color: rgba(255, 255, 255, 0.1) !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Ensure first item also has border */
.st-item:first-child {
    border-top-width: inherit !important;
    border-top-style: inherit !important;
    border-top-color: inherit !important;
    padding-top: 30px !important;
}

/* Orange accent line */
.st-item:after {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #FF6B35;
    transition: all 0.3s ease;
}

/* Hover effects - change all text colors */
.st-item:hover .st-section-title,
.st-item:hover .st-main-title,
.st-item:hover .st-description,
.st-item:hover .st-read-more {
    color: #EC642D !important;
}

/* Change accent line on hover */
.st-item:hover:after {
    background-color: #EC642D;
    width: 100px;
}

/* Two Column Layout */
.st-item-row {
    display: flex;
    align-items: flex-start;
}

.st-section-title-column {
    flex-shrink: 0;
}

.st-content-column {
    flex: 1;
}

/* Ensure section title stays at top */
.two-column-layout .st-section-title {
    margin-top: 0;
}

/* Single column layout */
.st-item:not(.two-column-layout) .st-section-title {
    margin-bottom: 20px;
}

.st-section-title {
    display: block;
    margin: 0;
    transition: color 0.3s ease;
}

.st-main-title {
    display: block;
    margin: 0;
    transition: color 0.3s ease;
}

.st-description {
    display: block;
    transition: color 0.3s ease;
}

.st-truncated {
    display: inline;
}

.st-read-more {
    display: inline;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Modal Styles */
.st-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    animation: fadeIn 0.3s;
}

.st-modal-content {
    margin: 5% auto;
    border: 1px solid;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s;
}

.st-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
    z-index: 10;
}

.st-modal-body {
    font-size: 16px;
    line-height: 1.8;
}

.st-modal-body .popup-section-title {
    margin: 0 0 15px 0;
    display: block;
}

.st-modal-body .popup-main-title {
    margin: 0 0 20px 0;
    display: block;
}

.st-modal-body .popup-description {
    margin: 0;
    display: block;
}

.st-modal-body .popup-exercise {
    margin: 15px 0;
    display: block;
    color: #CCCCCC;
}

.st-modal-body .popup-themes {
    margin: 15px 0 0 0;
    display: block;
    color: #CCCCCC;
}

/* Exercise and Themes Titles */
.st-modal-body .popup-exercise-title,
.st-modal-body .popup-themes-title {
    margin: 20px 0 10px 0;
    display: block;
    color: #FF6B35;
    font-size: 18px;
    font-weight: 600;
}

/* Popup Divider */
.popup-divider-wrapper {
    width: 100%;
    margin: 0 0 20px 0;
    text-align: left;
}

.popup-divider {
    height: 3px;
    background-color: #FF6B35;
    width: 60px;
    display: inline-block;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .st-modal-content {
        width: 95% !important;
        margin: 10% auto !important;
    }
    
    .st-close {
        right: 15px;
        top: 15px;
        font-size: 24px;
    }
    
    /* Stack columns on mobile */
    .st-item-row {
        flex-direction: column;
    }
    
    .st-section-title-column {
        width: 100% !important;
        margin-bottom: 15px;
    }
    
    .st-content-column {
        width: 100% !important;
        padding-left: 0 !important;
    }
}

/* Accessibility */
.st-read-more:focus {
    outline: 2px dotted currentColor;
    outline-offset: 2px;
}

.st-close:focus {
    outline: 2px dotted currentColor;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .st-modal {
        display: none !important;
    }
    
    .st-read-more {
        display: none !important;
    }
    
    .st-truncated {
        display: none !important;
    }
}

/* Style 2 specific styles */
.st-container[data-widget-style="style2"] .st-description {
    /* For Style 2, ensure description doesn't show truncation styling */
}

.st-container[data-widget-style="style2"] .st-read-more {
    display: none !important; /* Hide read more for Style 2 */
}

/* HTML content in exercise and themes should maintain formatting */
.st-modal-body .popup-exercise p,
.st-modal-body .popup-themes p {
    margin: 0 0 10px 0;
}

.st-modal-body .popup-exercise p:last-child,
.st-modal-body .popup-themes p:last-child {
    margin-bottom: 0;
}

/* Ensure HTML content displays properly */
.st-modal-body .popup-exercise,
.st-modal-body .popup-themes {
    word-wrap: break-word;
}

/* Modal Styles */
.st-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    animation: fadeIn 0.3s;
}

.st-modal-content {
    margin: 5% auto;
    border: 1px solid;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s;
}

.st-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
    z-index: 10;
}

.st-modal-body {
    font-size: 16px;
    line-height: 1.8;
}

.st-modal-body h3,
.st-modal-body h2,
.st-modal-body h4 {
    margin-bottom: 15px;
}

.st-modal-body > *:last-child {
    margin-bottom: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .st-modal-content {
        width: 95% !important;
        margin: 10% auto !important;
    }
    
    .st-close {
        right: 15px;
        top: 15px;
        font-size: 24px;
    }
    
    /* Stack columns on mobile */
    .st-item-row {
        flex-direction: column;
    }
    
    .st-section-title-column {
        width: 100% !important;
        margin-bottom: 15px;
    }
    
    .st-content-column {
        width: 100% !important;
        padding-left: 0 !important;
    }
}

/* Accessibility */
.st-read-more:focus {
    outline: 2px dotted currentColor;
    outline-offset: 2px;
}

.st-close:focus {
    outline: 2px dotted currentColor;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .st-modal {
        display: none !important;
    }
    
    .st-read-more {
        display: none !important;
    }
    
    .st-truncated {
        display: none !important;
    }
}

/* Style 2 specific styles */
.st-container[data-widget-style="style2"] .st-description {
    /* For Style 2, ensure description doesn't show truncation styling */
}

.st-container[data-widget-style="style2"] .st-read-more {
    display: none !important; /* Hide read more for Style 2 */
}

/* HTML content in exercise and themes should maintain formatting */
.st-modal-body .popup-exercise p,
.st-modal-body .popup-themes p {
    margin: 0 0 10px 0;
}

.st-modal-body .popup-exercise p:last-child,
.st-modal-body .popup-themes p:last-child {
    margin-bottom: 0;
}

/* Ensure HTML content displays properly */
.st-modal-body .popup-exercise,
.st-modal-body .popup-themes {
    word-wrap: break-word;
}