/**
 * Case Flow Guide System Styles
 * 
 * Beautiful, animated UI for user onboarding and help
 * Matches Amos PLLC branding (Burgundy/Red theme)
 * 
 * @package CaseFlow
 * @since 1.9.0
 */

/* ========================================
   WELCOME GUIDE MODAL
   ======================================== */

.guide-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.guide-modal-overlay.active {
    opacity: 1;
}

.guide-modal {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.guide-modal-overlay.active .guide-modal {
    transform: scale(1);
}

.guide-header {
    background: linear-gradient(135deg, #8B0000 0%, #C41E3A 100%);
    color: #ffffff;
    padding: 2rem;
    text-align: center;
}

.guide-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
}

.guide-role-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
}

.guide-content {
    padding: 2rem;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .guide-content {
        grid-template-columns: 1fr;
    }
}

.guide-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0;
    animation: slideInUp 0.5s ease forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guide-card:hover {
    border-color: #8B0000;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.1);
}

.guide-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.guide-card h3 {
    margin: 0 0 1rem 0;
    color: #8B0000;
    font-size: 1.25rem;
    font-weight: 700;
}

.guide-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #555;
    line-height: 1.6;
}

.guide-card li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #C41E3A;
    font-weight: bold;
}

.guide-card li strong {
    color: #8B0000;
}

.guide-card li em {
    color: #999;
    font-size: 0.9rem;
}

.guide-card kbd {
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    border: 1px solid #ced4da;
}

.guide-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.guide-checkbox {
    padding: 0 2rem 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
}

.guide-checkbox input {
    cursor: pointer;
}

/* ========================================
   BUTTONS
   ======================================== */

.guide-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 1rem;
}

.guide-btn-primary {
    background: linear-gradient(135deg, #8B0000 0%, #C41E3A 100%);
    color: #ffffff;
}

.guide-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

.guide-btn-secondary {
    background: #f8f9fa;
    color: #8B0000;
    border: 2px solid #8B0000;
}

.guide-btn-secondary:hover {
    background: #8B0000;
    color: #ffffff;
}

.guide-btn-text {
    background: transparent;
    color: #666;
    padding: 0.75rem 1rem;
}

.guide-btn-text:hover {
    color: #8B0000;
}

.guide-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ========================================
   FLOATING HELP BUTTON
   ======================================== */

.guide-help-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B0000 0%, #C41E3A 100%);
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
    z-index: 99998;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-help-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
}

.guide-help-button:active {
    transform: scale(0.95);
}

/* ========================================
   HELP PANEL
   ======================================== */

.guide-help-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.guide-help-panel.active {
    right: 0;
}

@media (max-width: 768px) {
    .guide-help-panel {
        width: 100%;
        right: -100%;
    }
}

.guide-help-header {
    background: linear-gradient(135deg, #8B0000 0%, #C41E3A 100%);
    color: #ffffff;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.guide-help-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.guide-role-small {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.guide-help-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.guide-help-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.guide-help-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.guide-help-section {
    margin-bottom: 2rem;
}

.guide-help-section h4 {
    margin: 0 0 1rem 0;
    color: #8B0000;
    font-size: 1.125rem;
    font-weight: 700;
}

.guide-help-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-help-section li {
    padding: 0.75rem;
    background: #f8f9fa;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    border-left: 3px solid #8B0000;
    transition: all 0.2s ease;
}

.guide-help-section li:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

/* ========================================
   PERMISSION GRID
   ======================================== */

.guide-permission-grid {
    display: grid;
    gap: 0.75rem;
}

.guide-permission-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.guide-permission-item.allowed {
    border-left: 3px solid #28a745;
}

.guide-permission-item.denied {
    border-left: 3px solid #dc3545;
    opacity: 0.6;
}

.guide-permission-icon {
    font-size: 1.25rem;
}

/* ========================================
   LIFECYCLE STAGES
   ======================================== */

.guide-stages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.guide-stage-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #8B0000;
}

.guide-stage-icon {
    font-size: 1.5rem;
}

.guide-stage-item strong {
    display: block;
    color: #8B0000;
    margin-bottom: 0.25rem;
}

.guide-stage-item p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* ========================================
   HELP ACTIONS
   ======================================== */

.guide-help-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* ========================================
   INTERACTIVE TOUR
   ======================================== */

.guide-tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.guide-tour-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.guide-tour-highlight {
    position: relative;
    z-index: 999999 !important;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7), 0 0 20px rgba(139, 0, 0, 0.5) !important;
    border-radius: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7), 0 0 20px rgba(139, 0, 0, 0.5);
    }

    50% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7), 0 0 30px rgba(196, 30, 58, 0.8);
    }
}

.guide-tour-tooltip {
    position: fixed;
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    z-index: 9999999;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.guide-tour-tooltip.active {
    opacity: 1;
    transform: scale(1);
}

.guide-tour-tooltip h4 {
    margin: 0 0 0.75rem 0;
    color: #8B0000;
    font-size: 1.25rem;
}

.guide-tour-tooltip p {
    margin: 0 0 1.5rem 0;
    color: #555;
    line-height: 1.6;
}

.guide-tour-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.guide-tour-nav {
    display: flex;
    gap: 0.5rem;
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */

.guide-help-content::-webkit-scrollbar,
.guide-content::-webkit-scrollbar {
    width: 8px;
}

.guide-help-content::-webkit-scrollbar-track,
.guide-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.guide-help-content::-webkit-scrollbar-thumb,
.guide-content::-webkit-scrollbar-thumb {
    background: #8B0000;
    border-radius: 10px;
}

.guide-help-content::-webkit-scrollbar-thumb:hover,
.guide-content::-webkit-scrollbar-thumb:hover {
    background: #C41E3A;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .guide-modal {
        width: 95%;
        max-height: 95vh;
    }

    .guide-header h2 {
        font-size: 1.5rem;
    }

    .guide-card-icon {
        font-size: 2rem;
    }

    .guide-help-button {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 1rem;
        right: 1rem;
    }

    .guide-tour-tooltip {
        max-width: 90%;
        left: 5% !important;
        right: 5%;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {

    .guide-modal-overlay,
    .guide-help-button,
    .guide-help-panel,
    .guide-tour-overlay,
    .guide-tour-tooltip {
        display: none !important;
    }
}