/* Incident Smart Suggestions Styles */

/* Suggestion Dropdown */
.suggestion-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestion-header i {
    font-size: 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.suggestion-items {
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.suggestion-item:hover {
    background: #f8f9ff;
    color: #667eea;
    transform: translateX(4px);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item i {
    color: #28a745;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.suggestion-item:hover i {
    transform: rotate(90deg);
}

/* Measure Suggestions */
.measure-suggestions {
    background: white;
    border: 2px solid #28a745;
    border-radius: 12px;
    margin-top: 8px;
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.1);
    animation: expandIn 0.3s ease-out;
}

@keyframes expandIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.measure-suggestions .suggestion-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-all-measures {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-all-measures:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.measures-list {
    padding: 16px;
    display: grid;
    gap: 12px;
}

.measure-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.measure-checkbox:hover {
    background: #f8f9fa;
}

.measure-checkbox input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #28a745;
    cursor: pointer;
}

.measure-checkbox span {
    font-size: 14px;
    line-height: 1.4;
    color: #495057;
}

.measure-checkbox input[type="checkbox"]:checked + span {
    color: #28a745;
    font-weight: 500;
}

/* Wizard Overlay */
.wizard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

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

.wizard-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wizard-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 24px 32px;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.wizard-header h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
}

.wizard-progress {
    font-size: 14px;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
}

.wizard-body {
    padding: 32px;
}

.wizard-body p {
    font-size: 16px;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 20px;
}

.wizard-help {
    background: #e7f3ff;
    border-left: 4px solid #0066cc;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: #0066cc;
    font-style: italic;
}

.wizard-footer {
    padding: 24px 32px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.wizard-footer button {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 14px;
}

.wizard-prev {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.wizard-prev:hover:not(:disabled) {
    background: #e9ecef;
    transform: translateY(-1px);
}

.wizard-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wizard-next {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.wizard-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.wizard-skip {
    background: transparent;
    color: #6c757d;
    text-decoration: underline;
    padding: 8px 16px;
}

.wizard-skip:hover {
    color: #495057;
}

/* Wizard Field Highlighting */
.wizard-highlight {
    position: relative;
    animation: highlight 0.5s ease-out;
}

.wizard-highlight::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #6366f1;
    border-radius: 12px;
    pointer-events: none;
    animation: highlightPulse 2s infinite;
}

@keyframes highlight {
    from {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    }
    to {
        transform: scale(1);
        box-shadow: none;
    }
}

@keyframes highlightPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.02);
    }
}

/* Help Tooltip */
.smart-help-tooltip {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-width: 350px;
    z-index: 9999;
    animation: tooltipSlideIn 0.3s ease-out;
}

@keyframes tooltipSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.help-content {
    padding: 20px;
}

.help-content h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 16px;
}

.help-content p {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.help-example {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #495057;
    font-style: italic;
}

.close-help {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-help:hover {
    background: #f8f9fa;
    color: #666;
}

/* Suggestion Notification */
.suggestion-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: notificationSlideIn 0.3s ease-out;
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.suggestion-notification.fade-out {
    animation: notificationFadeOut 0.3s ease-out forwards;
}

@keyframes notificationFadeOut {
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

.suggestion-notification i {
    font-size: 16px;
    animation: sparkle 1.5s infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Form Group Positioning for Suggestions */
.form-group {
    position: relative;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wizard-content {
        width: 95%;
        margin: 20px;
    }
    
    .wizard-header,
    .wizard-body,
    .wizard-footer {
        padding: 20px;
    }
    
    .wizard-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .wizard-footer button {
        width: 100%;
    }
    
    .suggestion-dropdown {
        position: fixed;
        left: 10px;
        right: 10px;
        top: auto;
        bottom: 10px;
    }
    
    .smart-help-tooltip {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
    }
}

/* Smart Button for Wizard Mode */
.wizard-mode-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.wizard-mode-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.wizard-mode-btn i {
    font-size: 14px;
}

/* Smart Suggestions Toggle */
.smart-suggestions-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #f8f9ff;
    border: 1px solid #e0e4ff;
    border-radius: 8px;
}

.smart-suggestions-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
}

.smart-suggestions-toggle label {
    font-size: 14px;
    color: #4c5563;
    cursor: pointer;
    margin: 0;
}

/* Field Help Tooltip */
.field-help-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #6366f1;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
    z-index: 1000;
    margin-top: 8px;
    animation: helpSlideIn 0.3s ease-out;
}

@keyframes helpSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.field-help-tooltip .help-content {
    padding: 16px 20px;
}

.field-help-tooltip h4 {
    margin: 0 0 12px 0;
    color: #6366f1;
    font-size: 16px;
    font-weight: 600;
}

.field-help-tooltip p {
    margin: 0 0 16px 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
}

.help-tips, .help-levels, .help-categories, .help-approach {
    margin-bottom: 16px;
}

.help-tips strong, .help-levels strong, .help-categories strong, .help-approach strong {
    color: #374151;
    font-size: 13px;
    display: block;
    margin-bottom: 8px;
}

.help-tips ul, .help-categories ul, .help-approach ul {
    margin: 0;
    padding-left: 20px;
    color: #6b7280;
    font-size: 13px;
}

.help-tips li, .help-categories li, .help-approach li {
    margin-bottom: 4px;
}

.level-item {
    background: #f3f4f6;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
}

.level-item strong {
    color: #6366f1;
    text-transform: capitalize;
}

.field-help-tooltip .close-help {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 16px;
    color: #9ca3af;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.field-help-tooltip .close-help:hover {
    background: #f3f4f6;
    color: #6b7280;
}