/**
 * NetZero ESG - Sistema de Ajuda e Tutoriais
 * Estilos customizados
 *
 * @version 1.0.0
 * @author NetZero Tech
 */

/* =========================================================================
   VARIÁVEIS CSS
   ========================================================================= */

:root {
    --nz-primary: #10b981;
    --nz-primary-dark: #059669;
    --nz-primary-light: rgba(16, 185, 129, 0.1);
    --nz-secondary: #6c757d;
    --nz-success: #10b981;
    --nz-info: #0dcaf0;
    --nz-warning: #ffc107;
    --nz-danger: #dc3545;
    --nz-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --nz-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --nz-radius: 12px;
    --nz-radius-sm: 8px;
}

/* =========================================================================
   BOTÃO FLUTUANTE
   ========================================================================= */

.help-floating-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9990;
}

.help-floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nz-primary), var(--nz-primary-dark));
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--nz-shadow);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.4);
}

.help-floating-btn.active {
    transform: rotate(45deg);
    background: var(--nz-danger);
}

/* =========================================================================
   MENU FLUTUANTE
   ========================================================================= */

.help-floating-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: var(--nz-radius);
    box-shadow: var(--nz-shadow);
    overflow: hidden;
}

.help-menu-header {
    background: linear-gradient(135deg, var(--nz-primary), var(--nz-primary-dark));
    color: white;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 15px;
}

.help-menu-items {
    padding: 8px 0;
}

.help-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s ease;
    gap: 14px;
}

.help-menu-item:hover {
    background: var(--nz-primary-light);
    color: var(--nz-primary-dark);
}

.help-menu-item i {
    font-size: 18px;
    color: var(--nz-primary);
    width: 24px;
    text-align: center;
}

.help-menu-item div {
    flex: 1;
}

.help-menu-item strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.help-menu-item small {
    display: block;
    color: #888;
    font-size: 12px;
}

/* Animação de entrada */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================================
   CARDS DE TOUR
   ========================================================================= */

.tour-card {
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tour-card:hover {
    border-color: var(--nz-primary);
    box-shadow: var(--nz-shadow-sm);
    transform: translateY(-2px);
}

.tour-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--nz-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nz-primary);
    font-size: 18px;
}

/* =========================================================================
   CARDS DE CATEGORIA
   ========================================================================= */

.category-card {
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    color: #333;
}

.category-card:hover {
    border-color: var(--nz-primary);
    box-shadow: var(--nz-shadow-sm);
    transform: translateY(-2px);
    color: var(--nz-primary-dark);
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--nz-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nz-primary);
    font-size: 22px;
}

/* =========================================================================
   CARDS DE VÍDEO
   ========================================================================= */

.video-card {
    transition: all 0.3s ease;
    color: #333;
}

.video-card:hover {
    transform: translateY(-2px);
    color: var(--nz-primary-dark);
}

.video-thumbnail {
    position: relative;
    border-radius: var(--nz-radius-sm);
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.video-card:hover .video-play-overlay {
    opacity: 1;
}

/* Thumbnail pequena (sidebar) */
.video-thumbnail-sm {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
}

.video-thumbnail-sm img {
    width: 100%;
    height: 60px;
    object-fit: cover;
}

.video-duration-sm {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
}

/* =========================================================================
   HERO DE BUSCA
   ========================================================================= */

.help-search-hero {
    background: linear-gradient(135deg, var(--nz-primary-light), #f8f9fa);
    border-radius: var(--nz-radius);
}

.help-search-form .form-control {
    border-color: var(--nz-primary);
    font-size: 16px;
    padding: 12px 20px;
}

.help-search-form .form-control:focus {
    border-color: var(--nz-primary-dark);
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

/* =========================================================================
   CUSTOMIZAÇÃO DO DRIVER.JS
   ========================================================================= */

.driver-popover {
    background: white !important;
    border-radius: var(--nz-radius) !important;
    box-shadow: var(--nz-shadow) !important;
    max-width: 400px !important;
}

.driver-popover-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a472a !important;
}

.driver-popover-description {
    font-size: 14px !important;
    color: #666 !important;
    line-height: 1.6 !important;
}

.driver-popover-progress-text {
    color: var(--nz-primary) !important;
    font-size: 12px !important;
}

.driver-popover-footer {
    padding-top: 12px !important;
    border-top: 1px solid #eee !important;
    margin-top: 12px !important;
}

.driver-popover-prev-btn,
.driver-popover-next-btn {
    border-radius: 6px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

.driver-popover-next-btn {
    background: var(--nz-primary) !important;
    color: white !important;
    border: none !important;
}

.driver-popover-next-btn:hover {
    background: var(--nz-primary-dark) !important;
}

.driver-popover-prev-btn {
    background: transparent !important;
    color: var(--nz-secondary) !important;
    border: 1px solid #ddd !important;
}

.driver-popover-prev-btn:hover {
    background: #f8f9fa !important;
}

.driver-popover-close-btn {
    color: #999 !important;
}

.driver-popover-close-btn:hover {
    color: var(--nz-danger) !important;
}

/* Highlight */
.driver-active-element {
    outline: 3px solid var(--nz-primary) !important;
    outline-offset: 4px !important;
    border-radius: 4px !important;
}

/* =========================================================================
   SEÇÃO DE FEEDBACK
   ========================================================================= */

.feedback-section .btn-outline-success:hover {
    background-color: var(--nz-success);
    border-color: var(--nz-success);
}

.feedback-section .btn-outline-danger:hover {
    background-color: var(--nz-danger);
    border-color: var(--nz-danger);
}

/* =========================================================================
   ACCORDION (FAQ)
   ========================================================================= */

.accordion-button:not(.collapsed) {
    background-color: var(--nz-primary-light);
    color: var(--nz-primary-dark);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
    border-color: var(--nz-primary);
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23059669'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* =========================================================================
   LIST GROUP HOVER
   ========================================================================= */

.list-group-item-action:hover {
    background-color: var(--nz-primary-light);
}

/* =========================================================================
   RESPONSIVO
   ========================================================================= */

@media (max-width: 768px) {
    .help-floating-container {
        bottom: 16px;
        right: 16px;
    }

    .help-floating-btn {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

    .help-floating-menu {
        width: calc(100vw - 32px);
        right: -8px;
        bottom: 62px;
    }

    .driver-popover {
        max-width: calc(100vw - 40px) !important;
    }

    .help-search-form .form-control {
        font-size: 14px;
        padding: 10px 16px;
    }

    .tour-icon,
    .category-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* =========================================================================
   PRINT
   ========================================================================= */

@media print {
    .help-floating-container,
    .feedback-section,
    .driver-popover {
        display: none !important;
    }
}

/* =========================================================================
   ANIMAÇÕES ADICIONAIS
   ========================================================================= */

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}
