/*
 * utilities.css
 * Global utility and accessibility styles.
 * Contains: reduced-motion media query overrides, skeleton loading
 * placeholder animations.
 */

/* ═══════════════════════════════════════════════════════════════════════════
   REDUCED MOTION SUPPORT
   Respect user preferences for reduced motion
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .tl-payment-reason,
    .tl-type-payment-failed,
    .tl-type-flag,
    .tl-highlight-urgent {
        animation: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SKELETON LOADING STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
.skeleton {
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    display: inline-block;
    height: 1em;
    min-width: 60px;
    vertical-align: middle;
}

.skeleton-text.wide { min-width: 120px; }
.skeleton-text.narrow { min-width: 40px; }

.section-card.loading {
    opacity: 0.7;
}

.empty-state {
    text-align: center;
    padding: 20px;
    color: #888;
    font-style: italic;
}

/* Modal status feedback (charge/refund results) */
.modal-status {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-style: normal;
    font-size: 13px;
    text-align: left;
    line-height: 1.5;
    word-break: break-word;
}
.modal-status.success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}
.modal-status.error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}
.modal-status .error-title {
    font-weight: 600;
    margin-bottom: 4px;
}
.modal-status .error-detail {
    font-size: 12px;
    opacity: 0.85;
}
[data-theme="dark"] .modal-status.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #86efac;
}
[data-theme="dark"] .modal-status.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

