.jormt-container {
    margin: 15px 0;
    position: relative;
    direction: ltr;
}

/* RTL Support */
html[dir="rtl"] .jormt-container {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .jormt-toggle-btn {
    flex-direction: row-reverse;
}

.jormt-hidden-content {
    overflow: hidden;
    opacity: 0;
    max-height: 0;
    transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease;
    margin: 0;
}

.jormt-hidden-content.show {
    max-height: none;
    opacity: 1;
    margin: 15px 0;
}

.jormt-toggle-btn {
    cursor: pointer;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0 !important;
    min-width: 140px;
	color: #fff;
	border-color: #228deb;
    background-color: #228deb;
}

.jormt-toggle-btn:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	border-color: #044cd0;
    background-color: #044cd0;
}

.jormt-toggle-btn:focus {
    outline: 2px solid rgba(0, 86, 179, 0.3);
    outline-offset: 2px;
}

.jormt-toggle-btn:active {
    transform: translateY(0);
}

.jormt-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
    display: inline-block;
    line-height: 1;
    margin: 0 4px;
}
.jormt-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

/* Accessibility improvements */
.jormt-toggle-btn[aria-expanded="true"] .jormt-icon {
    transition: transform 0.3s ease;
}
.jormt-toggle-btn[aria-expanded="false"] .jormt-icon {
    opacity: 1;
}

.jormt-toggle-btn[aria-expanded="true"] .jormt-icon {
    opacity: 1;
}

.jormt-toggle-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.5);
}

/* This rule for no-animation support */
.jormt-container[data-speed="0"] .jormt-hidden-content,
.jormt-container[data-speed="0"] .jormt-toggle-btn,
.jormt-container[data-speed="0"] .jormt-icon {
    transition: none !important;
}

/* Update the existing reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .jormt-hidden-content,
    .jormt-toggle-btn,
    .jormt-icon {
        transition: none !important;
    }
}

/* RTL icon adjustments */
html[dir="rtl"] .jormt-toggle-btn[aria-expanded="true"] .jormt-icon {
    transform: rotate(180deg) scaleX(-1);
}

html[dir="rtl"] .jormt-toggle-btn .jormt-icon {
    transform: scaleX(-1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .jormt-container {
        padding: 12px;
        margin: 12px 0;
    }
    
    .jormt-toggle-btn {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 120px;
    }
    
    html[dir="rtl"] .jormt-toggle-btn {
        padding: 8px 16px;
    }
}

/* Print styles */
@media print {
    .jormt-hidden-content {
        display: block !important;
        max-height: none !important;
        opacity: 1 !important;
    }
    
    .jormt-toggle-btn {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .jormt-container {
        border: 2px solid #000;
    }
    
    .jormt-toggle-btn {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .jormt-hidden-content,
    .jormt-toggle-btn,
    .jormt-icon {
        transition: none !important;
    }
    
    .jormt-toggle-btn:hover {
        transform: none !important;
    }
}