/**
 * Usability Heuristics Styles
 * Styles untuk mendukung implementasi 10 Usability Heuristics
 */

/* Heuristic 1: Visibility of System Status */
.page-loading {
    opacity: 0.7;
    pointer-events: none;
}

.page-loaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Loading spinner animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Heuristic 3: User Control - Breadcrumbs */
.breadcrumb-item {
    transition: color 0.2s ease;
}

.breadcrumb-item:hover {
    color: #FFA84A;
}

/* Heuristic 5: Error Prevention - Form Validation */
.form-field-error {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-field-success {
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Heuristic 6: Recognition - Active States */
.active-indicator {
    position: relative;
}

.active-indicator::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #FFA84A;
}

/* Heuristic 7: Keyboard Shortcuts - Visual Indicators */
kbd {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: #374151;
    background-color: #F3F4F6;
    border: 1px solid #D1D5DB;
    border-radius: 0.25rem;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

/* Heuristic 9: Error Messages */
.error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.error-message svg {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
}

.help-text {
    font-size: 0.75rem;
    color: #6B7280;
    margin-top: 0.25rem;
}

/* Heuristic 10: Tooltips */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip {
    position: absolute;
    z-index: 1000;
    padding: 0.5rem 0.75rem;
    background-color: #1F2937;
    color: #FFFFFF;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tooltip-container:hover .tooltip {
    opacity: 1;
}

.tooltip-top {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0.5rem;
}

.tooltip-bottom {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
}

.tooltip-left {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 0.5rem;
}

.tooltip-right {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0.5rem;
}

/* Focus states for accessibility */
.focus-visible:focus-visible {
    outline: 2px solid #FFA84A;
    outline-offset: 2px;
}

/* Skip to content link (accessibility) */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #102A66;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Smooth transitions */
* {
    transition-property: color, background-color, border-color, opacity, transform;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

/* Disabled states */
.disabled,
[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid #FFA84A;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

