/**
 * Required Categories Validation - Visual Feedback Styles
 * Provides visual indicators for required categories and missing selections
 */

/* Required category indicators */
.required-indicator {
    color: #dc3545 !important;
    font-weight: bold !important;
    margin-left: 4px;
}

/* Missing required category section highlighting */
.missing-required-category {
    border-left: 4px solid #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
    animation: pulse-border 2s infinite;
}

.missing-required-category .section-header {
    background-color: rgba(220, 53, 69, 0.08);
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 16px;
}

.missing-required-category .category-title {
    color: #dc3545;
}

/* Missing required navigation highlighting */
.missing-required-nav {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
    animation: pulse-nav 2s infinite;
}

.missing-required-nav:hover {
    background-color: rgba(220, 53, 69, 0.15) !important;
    color: #dc3545 !important;
}

/* Disabled continue button with tooltip styling */
.disabled-with-tooltip {
    cursor: help !important;
    position: relative;
}

.disabled-with-tooltip:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
}

/* Temporary tooltip for click feedback */
.wppb-temporary-tooltip {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    max-width: 300px;
    text-align: center;
}

.wppb-temporary-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: #333;
}

/* Custom tooltip for disabled continue button (fallback) */
.disabled-with-tooltip::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #343a40;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
    pointer-events: none;
    max-width: 300px;
    white-space: normal;
    word-wrap: break-word;
}

.disabled-with-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #343a40;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
    pointer-events: none;
}

.disabled-with-tooltip:hover::after,
.disabled-with-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Animations for attention-grabbing effects */
@keyframes pulse-border {
    0%, 100% {
        border-left-color: #dc3545;
        border-left-width: 4px;
    }
    50% {
        border-left-color: #ff6b7a;
        border-left-width: 6px;
    }
}

@keyframes pulse-nav {
    0%, 100% {
        background-color: rgba(220, 53, 69, 0.1);
    }
    50% {
        background-color: rgba(220, 53, 69, 0.2);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .missing-required-category {
        border-left-width: 3px;
    }
    
    .missing-required-category .section-header {
        padding: 6px 10px;
        margin-bottom: 12px;
    }
    
    .disabled-with-tooltip::after {
        font-size: 11px;
        padding: 6px 10px;
        max-width: 250px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .required-indicator {
        color: #b91c1c !important;
        text-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
    }
    
    .missing-required-category {
        border-left-color: #b91c1c;
        background-color: rgba(185, 28, 28, 0.1);
    }
    
    .missing-required-nav {
        background-color: rgba(185, 28, 28, 0.15) !important;
        color: #b91c1c !important;
        border-color: rgba(185, 28, 28, 0.4) !important;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .missing-required-category,
    .missing-required-nav {
        animation: none;
    }
}

/* Focus states for accessibility */
.missing-required-nav:focus {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

/* Print styles - hide visual indicators */
@media print {
    .required-indicator,
    .missing-required-category,
    .missing-required-nav,
    .disabled-with-tooltip::after,
    .disabled-with-tooltip::before {
        display: none !important;
    }
}