/**
 * Help System CSS
 * Styling for help center, tooltips, and quick help features
 */

/* Help Category Boxes */
.help-category-box {
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.help-category-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.help-category-box .info-box-icon {
    font-size: 45px;
}

/* Search Box */
#help_search {
    font-size: 18px;
    padding: 15px;
    border-radius: 5px;
}

/* Search Results */
.search-result-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

/* Help Modal */
#help_modal .modal-header {
    background-color: #3c8dbc;
    color: white;
}

#help_modal .modal-header .close {
    color: white;
    opacity: 0.8;
}

#help_modal .modal-header .close:hover {
    opacity: 1;
}

#help_modal .modal-body {
    max-height: 500px;
    overflow-y: auto;
}

#help_modal h4 {
    color: #3c8dbc;
    margin-top: 20px;
    margin-bottom: 10px;
}

#help_modal h5 {
    color: #555;
    margin-top: 15px;
    margin-bottom: 10px;
}

#help_modal ul,
#help_modal ol {
    margin-left: 20px;
}

#help_modal .callout {
    margin: 15px 0;
}

/* Quick Help Modal */
#quick_help_modal .modal-header {
    background-color: #3c8dbc;
    color: white;
}

#quick_help_modal .modal-header .close {
    color: white;
    opacity: 0.8;
}

/* Quick Help Button */
#quick_help_button {
    animation: pulse 2s infinite;
}

#show_quick_help:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(60, 141, 188, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(60, 141, 188, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(60, 141, 188, 0);
    }
}

/* Help Icons on Form Fields */
.help-icon {
    cursor: help;
    margin-left: 5px;
    color: #3c8dbc;
    font-size: 16px;
}

.help-icon:hover {
    color: #23527c;
}

/* Form Help Callouts */
.form-help-callout {
    margin-bottom: 20px;
    border-left: 4px solid #3c8dbc;
}

/* Help Page Specific Styles */
.help-page .info-box {
    min-height: 120px;
}

.help-page .box-header {
    border-bottom: 2px solid #f4f4f4;
}

.help-page .panel-heading {
    background-color: #f4f4f4;
}

.help-page .panel-title a {
    display: block;
    padding: 10px 0;
    color: #333;
    text-decoration: none;
}

.help-page .panel-title a:hover {
    color: #3c8dbc;
}

.help-page .panel-title i {
    margin-right: 10px;
}

/* Help Search Results */
#search_results .list-group-item {
    border-left: 3px solid transparent;
    transition: border-color 0.3s ease;
}

#search_results .list-group-item:hover {
    border-left-color: #3c8dbc;
}

/* Responsive Design */
@media (max-width: 768px) {
    #quick_help_button {
        bottom: 10px;
        right: 10px;
    }

    #show_quick_help {
        width: 50px;
        height: 50px;
    }

    #show_quick_help i {
        font-size: 1.5em;
    }

    .help-category-box {
        margin-bottom: 10px;
    }

    #help_search {
        font-size: 16px;
        padding: 10px;
    }
}

/* Help Tour Highlighting */
.help-tour-highlight {
    position: relative;
    z-index: 1051;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    border-radius: 5px;
}

.help-tour-tooltip {
    position: absolute;
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    z-index: 1052;
}

.help-tour-tooltip .arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.help-tour-tooltip.top .arrow {
    bottom: -10px;
    left: 50%;
    margin-left: -10px;
    border-width: 10px 10px 0 10px;
    border-color: white transparent transparent transparent;
}

.help-tour-tooltip.bottom .arrow {
    top: -10px;
    left: 50%;
    margin-left: -10px;
    border-width: 0 10px 10px 10px;
    border-color: transparent transparent white transparent;
}

.help-tour-tooltip .tour-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #3c8dbc;
}

.help-tour-tooltip .tour-content {
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.help-tour-tooltip .tour-buttons {
    text-align: right;
}

.help-tour-tooltip .tour-buttons button {
    margin-left: 5px;
}

/* Tooltip Enhancements */
.tooltip-inner {
    max-width: 300px;
    padding: 8px 12px;
    font-size: 13px;
    text-align: left;
}

/* Help Badge */
.help-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dd4b39;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
}

/* Help Video Player */
.help-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 20px;
}

.help-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Help Accordion */
.help-accordion .panel {
    box-shadow: none;
    border: 1px solid #ddd;
    margin-bottom: 5px;
}

.help-accordion .panel-heading {
    padding: 0;
}

.help-accordion .panel-title a {
    display: block;
    padding: 15px;
}

.help-accordion .panel-body {
    padding: 15px;
    border-top: 1px solid #ddd;
}

/* Help Tags */
.help-tag {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px;
    background-color: #e7e7e7;
    border-radius: 3px;
    font-size: 12px;
    color: #555;
}

.help-tag:hover {
    background-color: #3c8dbc;
    color: white;
    cursor: pointer;
}

/* Print Styles for Help Pages */
@media print {
    #quick_help_button,
    .help-icon,
    .modal,
    .navbar,
    .sidebar {
        display: none !important;
    }

    .help-page {
        margin: 0;
        padding: 0;
    }

    .box {
        page-break-inside: avoid;
    }
}
