/**
 * Custom Elementor Widgets - Base Styles
 * Global styles for all custom widgets
 */

/* Reset and base styles */
.vishaweb-cart-container,
.vishaweb-subscription-status,
.vishaweb-multi-subscription-status {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    direction: rtl;
}

.vishaweb-cart-container *,
.vishaweb-subscription-status *,
.vishaweb-multi-subscription-status * {
    box-sizing: border-box;
}

/* Loading states */
.loading-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button loading states */
.button-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Common button styles */
.widget-button,
.linear-action-btn,
.action-button,
.item-action-btn,
.subscription-button,
.plan-purchase-btn,
.buy-button,
.purchase-button,
.package-buy-btn {
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.widget-button:hover,
.linear-action-btn:hover,
.action-button:hover,
.item-action-btn:hover,
.subscription-button:hover,
.plan-purchase-btn:hover,
.buy-button:hover,
.purchase-button:hover,
.package-buy-btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }

/* Responsive utilities */
@media (max-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
}

@media (max-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
}

.access-denied-message {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.access-denied-message a {
    font-size: 18px;
    font-weight: bold;
    color: #0073e6;
    text-decoration: none;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.5;
    }
}

.access-denied-icon {
    font-size: 48px;
    color: #d63031;
    margin-bottom: 20px;
}

.access-denied-message h3 {
    font-size: 24px;
    color: #2d3436;
    margin-bottom: 15px;
}

.access-denied-message p {
    font-size: 16px;
    color: #636e72;
    margin-bottom: 30px;
}

.subscription-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.subscription-plan {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.subscription-plan:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.subscription-plan h4 {
    font-size: 18px;
    color: #2d3436;
    margin-bottom: 15px;
}

.plan-price {
    font-size: 20px;
    font-weight: 600;
    color: #00b894;
    margin-bottom: 20px;
}

.plan-button {
    display: inline-block;
    padding: 10px 25px;
    background: #00b894;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.plan-button:hover {
    background: #00a884;
    color: #fff;
}

.access-denied-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.access-denied-footer p {
    font-size: 14px;
    color: #636e72;
}

.access-denied-footer a {
    color: #0984e3;
    text-decoration: none;
    font-weight: 500;
}

.access-denied-footer a:hover {
    text-decoration: underline;
}

.elementory-section {
    width: 100%;
    max-width: 100%;
    direction: rtl;
    font-family: inherit;
    margin: 20px 0;
}

.elementory-section, .elementory-section * {
    box-sizing: border-box;
}

.course-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.course-section:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.course-section-title-elementory {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.course-section-title-elementory:hover {
    background: #f1f3f5;
}

.course-section-title-elementory img,
.course-section-title-elementory svg {
    width: 40px;
    height: 40px;
    margin-left: 15px;
    transition: all 0.3s ease;
}

.gheadlinel {
    flex: 1;
}

.gheadlinel span {
    font-size: 18px;
    font-weight: 600;
    color: #2d3436;
    display: block;
    margin-bottom: 5px;
}

.subtitle-lesson {
    font-size: 14px;
    color: #636e72;
    margin: 0;
}

.course-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.course-panel-heading:hover {
    background: #f8f9fa;
}

.course-panel-heading.active {
    background: #f1f3f5;
}

.panel-heading-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.course-lesson-icon {
    width: 40px;
    height: 40px;
    background: #f1f3f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.course-lesson-icon i {
    font-size: 18px;
    color: #2d3436;
}

.panel-heading-left .title h4 {
    font-size: 16px;
    font-weight: 500;
    color: #2d3436;
    margin: 0 0 5px 0;
}

.panel-heading-left .title .subtitle {
    font-size: 13px;
    color: #636e72;
    margin: 0;
}

.badge-item {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
}

.badge-item.free {
    background: #e3fcef;
    color: #00b894;
}

.badge-item.video {
    background: #e3f2fd;
    color: #0984e3;
}

.badge-item.exam {
    background: #fff3e0;
    color: #f39c12;
}

.badge-item.quiz {
    background: #f3e5f5;
    color: #8e44ad;
}

.badge-item.lecture {
    background: #e8f5e9;
    color: #27ae60;
}

.badge-item.practice {
    background: #e0f7fa;
    color: #00bcd4;
}

.badge-item.attachments {
    background: #fce4ec;
    color: #e84393;
}

.badge-item.sound {
    background: #fff8e1;
    color: #ffc107;
}

.panel-heading-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.private-lesson {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.private-lesson i {
    font-size: 14px;
}

.green-lock {
    color: #00b894;
}

.red-lock {
    color: #d63031;
}

.green-text {
    color: #00b894;
}

.red-text {
    color: #d63031;
}

.panel-content {
    display: none;
    padding: 25px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
}

.panel-content.active {
    display: block;
}

.panel-content-inner {
    color: #2d3436;
    line-height: 1.6;
}

/* استایل‌های مودال و اسکرول */
.cas-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
}

.cas-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cas-modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.cas-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cas-modal-title {
    margin: 0;
    font-size: 1.5em;
    color: #333;
}

.cas-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.cas-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

/* استایل اسکرول‌بار */
.cas-modal-body::-webkit-scrollbar {
    width: 8px;
}

.cas-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cas-modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.cas-modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.cas-modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* استایل فرم */
.cas-form-group {
    margin-bottom: 20px;
}

.cas-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.cas-form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.cas-form-control:focus {
    border-color: #0073e6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.2);
}

.cas-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.cas-form-row .cas-form-group {
    flex: 1;
    margin-bottom: 0;
}

/* استایل دکمه‌ها */
.cas-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.cas-button-primary {
    background: #0073e6;
    color: #fff;
}

.cas-button-primary:hover {
    background: #005bbf;
}

.cas-button-secondary {
    background: #f1f1f1;
    color: #333;
}

.cas-button-secondary:hover {
    background: #e1e1e1;
}

.cas-button-danger {
    background: #dc3545;
    color: #fff;
}

.cas-button-danger:hover {
    background: #c82333;
}

/* استایل‌های ریسپانسیو */
@media (max-width: 767px) {
    .course-section-title-elementory {
        padding: 15px 20px;
    }

    .course-panel-heading {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .panel-heading-right {
        width: 100%;
        justify-content: flex-start;
    }

    .subscription-plans {
        grid-template-columns: 1fr;
    }
}

/* استایل‌های محتوای درس */
.lesson-content-wrapper {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.lesson-preview {
    margin-bottom: 20px;
}

.lesson-preview h4 {
    font-size: 18px;
    color: #2d3436;
    margin: 0 0 10px 0;
}

.lesson-preview p {
    font-size: 14px;
    color: #636e72;
    margin: 0;
    line-height: 1.6;
}

.show-content-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #0073e6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-content-btn:hover {
    background: #005bbf;
}

.show-content-btn i {
    font-size: 16px;
}

.lesson-full-content {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.lesson-full-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.lesson-full-content iframe {
    max-width: 100%;
    border-radius: 4px;
    margin: 10px 0;
}

.lesson-full-content a {
    color: #0073e6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lesson-full-content a:hover {
    color: #005bbf;
    text-decoration: underline;
}

/* استایل‌های ریسپانسیو */
@media (max-width: 767px) {
    .lesson-content-wrapper {
        padding: 15px;
    }

    .lesson-preview h4 {
        font-size: 16px;
    }

    .show-content-btn {
        width: 100%;
        justify-content: center;
    }
} 