/* ===== Loading Spinner ===== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--neutral-15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.loading-spinner-sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.loading-spinner-lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading .loading-spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    vertical-align: middle;
    margin-right: 6px;
}

/* ===== Toast ===== */
.toast-message {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: #64666B;
    color: var(--neutral-0);
    font-size: 15px;
    font-weight: 500;
    padding: 16px 20px;
    border-radius: 12px;
    z-index: var(--z-toast);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    max-width: 520px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-message.show {
    opacity: 1;
    pointer-events: auto;
}

.toast-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.toast-text {
    flex: 1;
    white-space: normal;
    word-break: keep-all;
}

.toast-action {
    background: rgba(255, 255, 255, 0.2);
    color: var(--neutral-0);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

.toast-action:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--neutral-0);
}

@media (max-width: 576px) {
    .toast-message {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: calc(100% - 32px);
    }
}

/* Legacy toast (azito-toast class) */
.azito-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--btn-dark);
    color: var(--neutral-0);
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: var(--z-toast);
    white-space: nowrap;
}

.azito-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ===== Global Warning Banner ===== */
.global-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #FDECEE;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 16px 28px 0;
    color: #B02A37;
}

.global-warning-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 1px;
}

.global-warning-body {
    flex: 1;
    min-width: 0;
}

.global-warning-title {
    font-weight: 700;
    font-size: 14px;
    color: #DC3545;
    margin-bottom: 4px;
}

.global-warning-message {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
}

.global-warning-action {
    flex-shrink: 0;
    align-self: center;
    margin-left: 8px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .global-warning {
        margin: 12px 16px 0;
    }
}
