/* Custom styles for DevArb WebApp */

/* HTMX loading animations */
.htmx-indicator {
    opacity: 0;
    transition: opacity 500ms ease-in;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Custom button hover effects */
.btn-hover-scale:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
}

/* Custom focus styles */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    margin-bottom: 0.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(8px);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
}

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

.toast.hide {
    transform: translateX(100%);
    opacity: 0;
}

.toast-success {
    background-color: rgba(34, 197, 94, 0.95);
    color: white;
    border-left: 4px solid #16a34a;
}

.toast-error {
    background-color: rgba(239, 68, 68, 0.95);
    color: white;
    border-left: 4px solid #dc2626;
}

.toast-warning {
    background-color: rgba(245, 158, 11, 0.95);
    color: white;
    border-left: 4px solid #d97706;
}

.toast-info {
    background-color: rgba(59, 130, 246, 0.95);
    color: white;
    border-left: 4px solid #2563eb;
}

.toast-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.toast-icon {
    margin-right: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.toast-message {
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.toast-close {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.75rem;
    border-radius: 0.25rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.toast-close:hover {
    opacity: 1;
}

.toast-close svg {
    width: 1rem;
    height: 1rem;
}
