/* Help Drawer Styles - Microsoft Dynamics Style */

/* Dialog as Drawer Styling */
.rz-dialog.help-drawer-dialog {
    position: fixed !important;
    right: 0 !important;
    top: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    height: 100vh !important;
    transform: none !important;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Drawer Container */
.help-drawer {
    background-color: #ffffff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
}

.help-drawer-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.help-drawer-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e1dfdd;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background-color: #faf9f8;
}

.help-drawer-close-button {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: transparent !important;
    border: 1px solid #e1dfdd !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

.help-drawer-close-button:hover {
    background-color: #f3f2f1 !important;
    border-color: #c8c6c4 !important;
}

.help-drawer-close-button .rz-button-icon {
    color: #605e5c !important;
    font-size: 20px !important;
}

.help-drawer-close-button:hover .rz-button-icon {
    color: #323130 !important;
}

.help-drawer-close-button .rz-button-icon::before {
    content: "⚡";
    margin-right: 6px;
    font-size: 16px;
}

.help-drawer-content {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar Styling */
.help-drawer-content::-webkit-scrollbar {
    width: 6px;
}

.help-drawer-content::-webkit-scrollbar-track {
    background: #f3f2f1;
}

.help-drawer-content::-webkit-scrollbar-thumb {
    background: #c8c6c4;
    border-radius: 3px;
}

.help-drawer-content::-webkit-scrollbar-thumb:hover {
    background: #a19f9d;
}

/* Typography */
.help-drawer-content h1 {
    font-size: 24px;
    font-weight: 600;
    color: #323130;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #0078d4;
}

.help-drawer-content h2 {
    font-size: 18px;
    font-weight: 600;
    color: #323130;
    margin: 24px 0 12px 0;
}

.help-drawer-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #605e5c;
    margin: 16px 0 8px 0;
}

.help-drawer-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #605e5c;
    margin: 0 0 12px 0;
}

.help-drawer-content ul,
.help-drawer-content ol {
    font-size: 14px;
    line-height: 1.8;
    color: #605e5c;
    margin: 0 0 12px 0;
    padding-left: 24px;
}

.help-drawer-content li {
    margin-bottom: 4px;
}

/* Strong text */
.help-drawer-content strong {
    font-weight: 600;
    color: #323130;
}

/* Links */
.help-drawer-content a {
    color: #0078d4;
    text-decoration: none;
    transition: color 0.2s;
}

.help-drawer-content a:hover {
    color: #106ebe;
    text-decoration: underline;
}

/* Code blocks */
.help-drawer-content code {
    background-color: #f3f2f1;
    padding: 2px 6px;
    border-radius: 2px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #d83b01;
}

.help-drawer-content pre {
    background-color: #f3f2f1;
    padding: 12px;
    border-radius: 2px;
    overflow-x: auto;
    margin: 0 0 12px 0;
}

.help-drawer-content pre code {
    background-color: transparent;
    padding: 0;
    color: #323130;
}

/* Tables */
.help-drawer-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 16px 0;
    font-size: 14px;
}

.help-drawer-content th {
    background-color: #f3f2f1;
    border: 1px solid #e1dfdd;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: #323130;
}

.help-drawer-content td {
    border: 1px solid #e1dfdd;
    padding: 8px 12px;
    color: #605e5c;
}

.help-drawer-content tr:hover {
    background-color: #faf9f8;
}

/* Blockquotes */
.help-drawer-content blockquote {
    border-left: 4px solid #0078d4;
    margin: 0 0 12px 0;
    padding: 8px 0 8px 16px;
    color: #605e5c;
    background-color: #f3f2f1;
}

/* Horizontal Rule */
.help-drawer-content hr {
    border: none;
    border-top: 1px solid #e1dfdd;
    margin: 24px 0;
}

/* Close Button Enhancement */
.help-drawer .rz-drawer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.help-drawer .rz-drawer-close:hover {
    background-color: #f3f2f1;
}

/* Help Button Enhancement */
.dynamics-quick-action-button.help-button {
    background-color: #107c10 !important;
    border-color: #107c10 !important;
}

.dynamics-quick-action-button.help-button:hover {
    background-color: #0e6e0e !important;
    border-color: #0e6e0e !important;
}

/* Emoji Support */
.help-drawer-content .emoji {
    font-size: 1.2em;
    vertical-align: middle;
    margin-right: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .help-drawer {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .help-drawer-content {
        padding: 16px;
    }
    
    .help-drawer-content h1 {
        font-size: 20px;
    }
    
    .help-drawer-content h2 {
        font-size: 16px;
    }
}