
/* RTL Support */
[dir="rtl"] .popup-close {
    right: auto;
    left: 15px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .popup-content {
        background: #2d2d2d;
        color: #fff;
        border: 1px solid #444;
    }
    
    .popup-header {
        border-bottom-color: #555;
    }
    
    .popup-header h3 {
        color: #fff;
    }
    
    .popup-body {
        color: #ddd;
    }
    
    .popup-close {
        background: rgba(255, 255, 255, 0.1);
        color: #ccc;
    }
    
    .popup-close:hover {
        background: rgba(255, 0, 0, 0.2);
        color: #ff6b6b;
    }
}

/* Loading state */
.popup-loading .popup-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.popup-loading .popup-body::before {
    content: "";
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/******************************************/
/* Article content styling */
.popup-article h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.article-content {
    line-height: 1.6;
    color: #555;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

.article-content p {
    margin-bottom: 15px;
}

/* Module content styling */
.popup-module {
    width: 100%;
}

.popup-module .module {
    margin: 0;
    padding: 0;
}

/******************************************/
/* Enhanced module functionality */
/* Enhanced module functionality */
.popup-module {
    width: 100%;
    position: relative;
    background: transparent;
    padding: 0;
    margin: 0;
}

.popup-module .module-title {
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #007cba;
    color: #333;
    font-size: 16px;
    background: transparent;
}

/* Search modules enhanced */
.popup-module.module-mod_search,
.popup-module.module-mod_finder {
    min-height: auto;
    background: transparent;
}

.popup-module.module-mod_search form,
.popup-module.module-mod_finder form {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
}

.popup-module.module-mod_search input[type="text"],
.popup-module.module-mod_finder input[type="text"],
.popup-module.module-mod_search input[type="search"],
.popup-module.module-mod_finder input[type="search"] {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
}

.popup-module.module-mod_search input[type="text"]:focus,
.popup-module.module-mod_finder input[type="text"]:focus,
.popup-module.module-mod_search input[type="search"]:focus,
.popup-module.module-mod_finder input[type="search"]:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.popup-module.module-mod_search input[type="submit"],
.popup-module.module-mod_finder input[type="submit"],
.popup-module.module-mod_search button[type="submit"],
.popup-module.module-mod_finder button[type="submit"] {
    padding: 10px 20px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.popup-module.module-mod_search input[type="submit"]:hover,
.popup-module.module-mod_finder input[type="submit"]:hover,
.popup-module.module-mod_search button[type="submit"]:hover,
.popup-module.module-mod_finder button[type="submit"]:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

/* Login module enhanced */
.popup-module.module-mod_login {
    min-width: 300px;
    background: transparent;
}

.popup-module.module-mod_login .form-group,
.popup-module.module-mod_login .control-group {
    margin-bottom: 15px;
    background: transparent;
}

.popup-module.module-mod_login label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    background: transparent;
}

.popup-module.module-mod_login input[type="text"],
.popup-module.module-mod_login input[type="password"],
.popup-module.module-mod_login input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
}

.popup-module.module-mod_login input[type="text"]:focus,
.popup-module.module-mod_login input[type="password"]:focus,
.popup-module.module-mod_login input[type="email"]:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.popup-module.module-mod_login button,
.popup-module.module-mod_login input[type="submit"] {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.popup-module.module-mod_login button:hover,
.popup-module.module-mod_login input[type="submit"]:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

/* General form enhancements */
.popup-module form {
    margin: 0;
    padding: 0;
    background: transparent;
}

.popup-module input,
.popup-module select,
.popup-module textarea {
    font-family: inherit;
}

.popup-module button,
.popup-module input[type="submit"] {
    transition: all 0.2s ease;
}

/* حذف فضاهای اضافی */
.popup-module * {
    box-sizing: border-box;
}

.popup-module .mod-search,
.popup-module .mod-finder,
.popup-module .mod-login {
    background: transparent;
    padding: 0;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .popup-module.module-mod_search form,
    .popup-module.module-mod_finder form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .popup-module.module-mod_login {
        min-width: auto;
    }
}

/******************************************/
/* Custom content direction support */
.popup-custom-content {
    line-height: 1.6;
    text-align: start;
}

.popup-custom-content.rtl-content {
    direction: rtl;
    text-align: right;
    font-family: 'Tahoma', 'Arial Unicode MS', sans-serif;
}

.popup-custom-content.ltr-content {
    direction: ltr;
    text-align: left;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

.popup-custom-content p {
    margin-bottom: 15px;
}

.popup-custom-content p:last-child {
    margin-bottom: 0;
}

.popup-custom-content h1,
.popup-custom-content h2,
.popup-custom-content h3,
.popup-custom-content h4,
.popup-custom-content h5,
.popup-custom-content h6 {
    margin-top: 20px;
    margin-bottom: 10px;
}

.popup-custom-content h1:first-child,
.popup-custom-content h2:first-child,
.popup-custom-content h3:first-child,
.popup-custom-content h4:first-child,
.popup-custom-content h5:first-child,
.popup-custom-content h6:first-child {
    margin-top: 0;
}

/* RTL specific styles */
.popup-custom-content.rtl-content ul,
.popup-custom-content.rtl-content ol {
    padding-right: 20px;
    padding-left: 0;
}

.popup-custom-content.rtl-content blockquote {
    border-right: 3px solid #ccc;
    border-left: none;
    padding-right: 15px;
    padding-left: 0;
    margin-right: 0;
    margin-left: 20px;
}

/* LTR specific styles */
.popup-custom-content.ltr-content ul,
.popup-custom-content.ltr-content ol {
    padding-left: 20px;
    padding-right: 0;
}

.popup-custom-content.ltr-content blockquote {
    border-left: 3px solid #ccc;
    border-right: none;
    padding-left: 15px;
    padding-right: 0;
    margin-left: 0;
    margin-right: 20px;
}

/* Mixed content support - for bilingual content */
.popup-custom-content .force-rtl {
    direction: rtl;
    text-align: right;
}

.popup-custom-content .force-ltr {
    direction: ltr;
    text-align: left;
}


/* Enhanced popup module styles */
.mod-popup-content {
    margin: 10px 0;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    backdrop-filter: blur(2px);
    transition: all 0.3s ease-in-out;
}

.popup-overlay.popup-opening {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(2px);
    }
}

.popup-content {
    position: absolute;
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-in-out;
}

.popup-opening .popup-content {
    animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
    from { 
        transform: translate(-50%, -60%);
        opacity: 0;
        scale: 0.9;
    }
    to { 
        transform: translate(-50%, -50%);
        opacity: 1;
        scale: 1;
    }
}

/* ===========================================
   موقعیت‌های جدید پاپ‌آپ
=========================================== */

/* Position classes */
.popup-content.position-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.popup-content.position-top-left {
    top: 20px;
    left: 20px;
    transform: none;
}

.popup-content.position-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.popup-content.position-top-right {
    top: 20px;
    right: 20px;
    left: auto;
    transform: none;
}

.popup-content.position-center-left {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

.popup-content.position-center-right {
    top: 50%;
    right: 20px;
    left: auto;
    transform: translateY(-50%);
}

.popup-content.position-bottom-left {
    bottom: 20px;
    top: auto;
    left: 20px;
    transform: none;
}

.popup-content.position-bottom-center {
    bottom: 20px;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
}

.popup-content.position-bottom-right {
    bottom: 20px;
    top: auto;
    right: 20px;
    left: auto;
    transform: none;
}

/* ===========================================
   انیمیشن‌های جدید
=========================================== */

/* Animation classes */
.popup-overlay.animation-fade .popup-content {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-overlay.animation-fade.show .popup-content {
    opacity: 1;
}

/* Slide Animation */
.popup-overlay.animation-slide .popup-content {
    opacity: 0;
    transition: all 0.3s ease;
}

.popup-overlay.animation-slide .popup-content.position-center {
    transform: translate(-50%, -150px);
}

.popup-overlay.animation-slide.show .popup-content.position-center {
    transform: translate(-50%, -50%);
    opacity: 1;
}

.popup-overlay.animation-slide .popup-content.position-top-center {
    transform: translate(-50%, -100px);
}

.popup-overlay.animation-slide.show .popup-content.position-top-center {
    transform: translateX(-50%);
    opacity: 1;
}

.popup-overlay.animation-slide .popup-content.position-bottom-center {
    transform: translate(-50%, 100px);
}

.popup-overlay.animation-slide.show .popup-content.position-bottom-center {
    transform: translateX(-50%);
    opacity: 1;
}

.popup-overlay.animation-slide .popup-content.position-center-left {
    transform: translate(-100px, -50%);
}

.popup-overlay.animation-slide.show .popup-content.position-center-left {
    transform: translateY(-50%);
    opacity: 1;
}

.popup-overlay.animation-slide .popup-content.position-center-right {
    transform: translate(100px, -50%);
}

.popup-overlay.animation-slide.show .popup-content.position-center-right {
    transform: translateY(-50%);
    opacity: 1;
}

.popup-overlay.animation-slide .popup-content.position-top-left,
.popup-overlay.animation-slide .popup-content.position-top-right,
.popup-overlay.animation-slide .popup-content.position-bottom-left,
.popup-overlay.animation-slide .popup-content.position-bottom-right {
    transform: translateY(-100px);
}

.popup-overlay.animation-slide.show .popup-content.position-top-left,
.popup-overlay.animation-slide.show .popup-content.position-top-right,
.popup-overlay.animation-slide.show .popup-content.position-bottom-left,
.popup-overlay.animation-slide.show .popup-content.position-bottom-right {
    transform: none;
    opacity: 1;
}

/* Zoom Animation */
.popup-overlay.animation-zoom .popup-content {
    opacity: 0;
    transition: all 0.3s ease;
}

.popup-overlay.animation-zoom .popup-content.position-center {
    transform: translate(-50%, -50%) scale(0.7);
}

.popup-overlay.animation-zoom.show .popup-content.position-center {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.popup-overlay.animation-zoom .popup-content.position-top-center {
    transform: translateX(-50%) scale(0.7);
}

.popup-overlay.animation-zoom.show .popup-content.position-top-center {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.popup-overlay.animation-zoom .popup-content.position-bottom-center {
    transform: translateX(-50%) scale(0.7);
}

.popup-overlay.animation-zoom.show .popup-content.position-bottom-center {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.popup-overlay.animation-zoom .popup-content.position-center-left {
    transform: translateY(-50%) scale(0.7);
}

.popup-overlay.animation-zoom.show .popup-content.position-center-left {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

.popup-overlay.animation-zoom .popup-content.position-center-right {
    transform: translateY(-50%) scale(0.7);
}

.popup-overlay.animation-zoom.show .popup-content.position-center-right {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

.popup-overlay.animation-zoom .popup-content.position-top-left,
.popup-overlay.animation-zoom .popup-content.position-top-right,
.popup-overlay.animation-zoom .popup-content.position-bottom-left,
.popup-overlay.animation-zoom .popup-content.position-bottom-right {
    transform: scale(0.7);
}

.popup-overlay.animation-zoom.show .popup-content.position-top-left,
.popup-overlay.animation-zoom.show .popup-content.position-top-right,
.popup-overlay.animation-zoom.show .popup-content.position-bottom-left,
.popup-overlay.animation-zoom.show .popup-content.position-bottom-right {
    transform: scale(1);
    opacity: 1;
}

/* Bounce Animation */
.popup-overlay.animation-bounce .popup-content {
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.popup-overlay.animation-bounce .popup-content.position-center {
    transform: translate(-50%, -50%) scale(0.3);
}

.popup-overlay.animation-bounce.show .popup-content.position-center {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.popup-overlay.animation-bounce .popup-content.position-top-center {
    transform: translateX(-50%) scale(0.3);
}

.popup-overlay.animation-bounce.show .popup-content.position-top-center {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.popup-overlay.animation-bounce .popup-content.position-bottom-center {
    transform: translateX(-50%) scale(0.3);
}

.popup-overlay.animation-bounce.show .popup-content.position-bottom-center {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.popup-overlay.animation-bounce .popup-content.position-center-left {
    transform: translateY(-50%) scale(0.3);
}

.popup-overlay.animation-bounce.show .popup-content.position-center-left {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

.popup-overlay.animation-bounce .popup-content.position-center-right {
    transform: translateY(-50%) scale(0.3);
}

.popup-overlay.animation-bounce.show .popup-content.position-center-right {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

.popup-overlay.animation-bounce .popup-content.position-top-left,
.popup-overlay.animation-bounce .popup-content.position-top-right,
.popup-overlay.animation-bounce .popup-content.position-bottom-left,
.popup-overlay.animation-bounce .popup-content.position-bottom-right {
    transform: scale(0.3);
}

.popup-overlay.animation-bounce.show .popup-content.position-top-left,
.popup-overlay.animation-bounce.show .popup-content.position-top-right,
.popup-overlay.animation-bounce.show .popup-content.position-bottom-left,
.popup-overlay.animation-bounce.show .popup-content.position-bottom-right {
    transform: scale(1);
    opacity: 1;
}

.popup-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.popup-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.popup-body {
    line-height: 1.6;
    color: #555;
    max-height: calc(100% - 60px);
}

/* Enhanced button styles */
.popup-trigger-button {
    transition: all 0.2s ease;
    font-weight: 500;
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.popup-trigger-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
    background: #005a87;
}

.popup-trigger-button:active {
    transform: translateY(0);
}

.popup-trigger-link {
    color: #007cba;
    text-decoration: none;
    cursor: pointer;
}

.popup-trigger-link:hover {
    text-decoration: underline;
}

/* Hide trigger when auto display is enabled */
.mod-popup-content.auto-display-enabled .popup-trigger-hidden {
	display: none !important;
}

/* Enhanced close button */
.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    z-index: 1;
    transition: all 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
}

.popup-close:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
    transform: scale(1.1);
}

/* Responsive design */
@media (max-width: 768px) {
    .popup-content {
        width: 95% !important;
        height: 85% !important;
        margin: 10px;
        border-radius: 12px;
    }
    
    .popup-content.position-top-left,
    .popup-content.position-top-right,
    .popup-content.position-bottom-left,
    .popup-content.position-bottom-right {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: auto;
        transform: none;
    }
    
    .popup-content.position-center-left,
    .popup-content.position-center-right {
        left: 10px;
        right: 10px;
        transform: none;
    }
    
    .popup-trigger-button {
        width: 100%;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .popup-content {
        width: 98% !important;
        height: 90% !important;
        margin: 5px;
    }
}

/* RTL Support */
[dir="rtl"] .popup-close {
    right: auto;
    left: 15px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .popup-content {
        background: #2d2d2d;
        color: #fff;
        border: 1px solid #444;
    }
    
    .popup-header {
        border-bottom-color: #555;
    }
    
    .popup-header h3 {
        color: #fff;
    }
    
    .popup-body {
        color: #ddd;
    }
    
    .popup-close {
        background: rgba(255, 255, 255, 0.1);
        color: #ccc;
    }
    
    .popup-close:hover {
        background: rgba(255, 0, 0, 0.2);
        color: #ff6b6b;
    }
}

/* Loading state */
.popup-loading .popup-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.popup-loading .popup-body::before {
    content: "";
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

بقیه CSS فایل شما دست نخورده باقی بماند...
