/* Tutorial System Styles - Multilingual Support */
.tutorial-trigger {
    position: relative;
    display: inline-block;
    cursor: pointer;
    color: #007bff;
    font-size: 1.2rem;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
    z-index: 1000;
}

/* RTL Support for Arabic */
[dir="rtl"] .tutorial-trigger {
    margin-left: 0;
    margin-right: 0.5rem;
}

.tutorial-trigger:hover {
    color: #0056b3;
    transform: scale(1.1);
}

.tutorial-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.tutorial-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-content {
    background-color: white;
    margin: auto;
    padding: 0;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    position: relative;
    animation: tutorialSlideIn 0.3s ease-out;
}

@keyframes tutorialSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.tutorial-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.tutorial-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.tutorial-header .close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* RTL Support for close button */
[dir="rtl"] .tutorial-header .close {
    right: auto;
    left: 1rem;
}

.tutorial-header .close:hover {
    opacity: 1;
}

.tutorial-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.tutorial-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #007bff;
}

.tutorial-section h3 {
    color: #007bff;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

.tutorial-section h3 i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* RTL Support for section icons */
[dir="rtl"] .tutorial-section h3 i {
    margin-right: 0;
    margin-left: 0.5rem;
}

.tutorial-section ul {
    margin: 0;
    padding-left: 1.5rem;
}

/* RTL Support for lists */
[dir="rtl"] .tutorial-section ul {
    padding-left: 0;
    padding-right: 1.5rem;
}

.tutorial-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.tutorial-feature {
    background-color: white;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tutorial-feature h4 {
    color: #495057;
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.tutorial-tip {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.tutorial-tip::before {
    content: "💡 ";
    font-size: 1.2rem;
}

.tutorial-warning {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.tutorial-warning::before {
    content: "⚠️ ";
    font-size: 1.2rem;
}

.tutorial-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.tutorial-success::before {
    content: "✅ ";
    font-size: 1.2rem;
}

.tutorial-footer {
    background-color: #f8f9fa;
    padding: 1rem 2rem;
    text-align: center;
    border-top: 1px solid #dee2e6;
}

.tutorial-footer button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tutorial-footer button:hover {
    background-color: #0056b3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tutorial-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .tutorial-header {
        padding: 1rem;
    }
    
    .tutorial-header h2 {
        font-size: 1.5rem;
    }
    
    .tutorial-body {
        padding: 1rem;
    }
    
    .tutorial-section {
        padding: 1rem;
    }
}

/* Animation for tutorial trigger */
.tutorial-trigger {
    animation: tutorialPulse 2s infinite;
}

@keyframes tutorialPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.tutorial-trigger:hover {
    animation: none;
}

/* Auto-opened tutorial styling */
.tutorial-auto-opened {
    animation: tutorialAutoOpen 0.8s ease-out;
}

@keyframes tutorialAutoOpen {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(-100px);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.95) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.tutorial-welcome {
    margin-bottom: 1.5rem;
}

.tutorial-welcome .alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.15);
}

.tutorial-welcome .alert i {
    font-size: 1.2rem;
}

/* Enhanced auto-open notification */
.tutorial-auto-opened .tutorial-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    position: relative;
}

.tutorial-auto-opened .tutorial-header::before {
    content: "🆕";
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 1.5rem;
    background: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* RTL support for auto-open notification */
[dir="rtl"] .tutorial-auto-opened .tutorial-header::before {
    right: auto;
    left: 20px;
}
