/* PRH YTJ - Utility Styles */
/* Toast notifications, loading spinners, and other utilities */

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #0066cc;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.toast-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #333;
}

/* Toast types */
.toast-success {
    border-left-color: #28a745;
    background: #f0fff4;
}

.toast-error {
    border-left-color: #dc3545;
    background: #fff0f0;
}

.toast-warning {
    border-left-color: #ffc107;
    background: #fff9e6;
}

.toast-info {
    border-left-color: #17a2b8;
    background: #e6f7ff;
}

/* ============================================================================
   LOADING OVERLAY
   ============================================================================ */

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

body > .loading-overlay {
    position: fixed;
}

.loading-content {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* ============================================================================
   SMALL INLINE SPINNER
   ============================================================================ */

.spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0066cc;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

/* ============================================================================
   ERROR MESSAGES
   ============================================================================ */

.error-message {
    padding: 12px 16px;
    background: #fff0f0;
    border: 1px solid #ffcccc;
    border-left: 4px solid #dc3545;
    border-radius: 4px;
    color: #721c24;
    margin: 16px 0;
}

.error-message strong {
    display: block;
    margin-bottom: 4px;
}

.success-message {
    padding: 12px 16px;
    background: #f0fff4;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #28a745;
    border-radius: 4px;
    color: #155724;
    margin: 16px 0;
}

.warning-message {
    padding: 12px 16px;
    background: #fff9e6;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    margin: 16px 0;
}

.info-message {
    padding: 12px 16px;
    background: #e6f7ff;
    border: 1px solid #b3e5fc;
    border-left: 4px solid #17a2b8;
    border-radius: 4px;
    color: #0c5460;
    margin: 16px 0;
}

/* ============================================================================
   MOBILE RESPONSIVENESS
   ============================================================================ */

@media (max-width: 768px) {
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
    }
    
    .toast {
        padding: 12px 16px;
    }
    
    .toast-message {
        font-size: 13px;
    }
}

