/* Tutor LMS Integration Styles */
/* Enterprise-level design with blue/white color scheme */

/* Floating Help Button */
.tutor-help-floating-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    font-family: 'Cairo', sans-serif;
}

.help-btn-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.help-btn-icon:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 102, 204, 0.6);
}

.help-btn-icon:active {
    transform: scale(0.95);
}

.help-btn-tooltip {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.help-btn-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

.tutor-help-floating-btn:hover .help-btn-tooltip {
    opacity: 1;
}

/* Help Panel */
.tutor-help-panel {
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 380px;
    max-width: calc(100vw - 60px);
    max-height: calc(100vh - 150px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: none;
    overflow: hidden;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tutor-help-panel.active {
    display: block;
}

.help-panel-header {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.help-panel-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.help-panel-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.help-panel-content {
    padding: 20px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.help-panel-content::-webkit-scrollbar {
    width: 6px;
}

.help-panel-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.help-panel-content::-webkit-scrollbar-thumb {
    background: #0066cc;
    border-radius: 10px;
}

.help-panel-content::-webkit-scrollbar-thumb:hover {
    background: #004499;
}

/* Quick Actions */
.help-quick-actions {
    margin-bottom: 25px;
}

.help-quick-actions h4 {
    color: #0066cc;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e6f2ff;
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: #333;
}

.quick-action-item:hover {
    background: #e6f2ff;
    transform: translateX(-5px);
}

.quick-action-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.quick-action-content {
    flex: 1;
}

.quick-action-title {
    font-weight: 600;
    color: #0066cc;
    margin-bottom: 4px;
    font-size: 14px;
}

.quick-action-desc {
    font-size: 12px;
    color: #666;
}

/* Search in Panel */
.help-panel-search {
    margin-bottom: 20px;
}

.help-panel-search input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e6f2ff;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
}

.help-panel-search input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Help Articles List */
.help-articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-article-link {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.help-article-link:hover {
    background: #e6f2ff;
    transform: translateX(-3px);
}

.help-article-link a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: block;
}

.help-article-link a:hover {
    text-decoration: underline;
}

/* Contextual Help Panels */
.tutor-help-contextual-help {
    background: #e6f2ff;
    border: 2px solid #0066cc;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.tutor-help-contextual-help .help-panel-header {
    background: transparent;
    color: #0066cc;
    padding: 0 0 15px 0;
    border-bottom: 2px solid #0066cc;
    margin-bottom: 15px;
}

.tutor-help-contextual-help .help-panel-header h3 {
    color: #0066cc;
    font-size: 18px;
    margin: 0;
}

.tutor-help-contextual-help .help-panel-close {
    background: #0066cc;
    color: white;
}

.tutor-help-contextual-help .help-panel-content {
    padding: 0;
}

/* Help Icons in Forms */
.tutor-help-field-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    cursor: pointer;
    color: #0066cc;
    vertical-align: middle;
    position: relative;
}

.tutor-help-field-icon:hover {
    color: #004499;
}

.tutor-help-field-icon svg {
    width: 100%;
    height: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .tutor-help-floating-btn {
        bottom: 20px;
        left: 20px;
    }
    
    .tutor-help-panel {
        left: 20px;
        right: 20px;
        width: auto;
        bottom: 90px;
        max-height: calc(100vh - 120px);
    }
    
    .help-btn-icon {
        width: 56px;
        height: 56px;
    }
    
    .help-panel-content {
        padding: 15px;
    }
    
    .quick-action-item {
        padding: 10px;
    }
    
    .quick-action-icon {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .tutor-help-panel {
        left: 10px;
        right: 10px;
        bottom: 80px;
    }
    
    .help-panel-header {
        padding: 15px;
    }
    
    .help-panel-header h3 {
        font-size: 16px;
    }
    
    .help-panel-content {
        padding: 12px;
    }
}

/* Touch-friendly */
@media (hover: none) and (pointer: coarse) {
    .help-btn-icon,
    .help-panel-close,
    .quick-action-item {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Loading State */
.help-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.help-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e6f2ff;
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

