/* Loader styles for buttons and global overlay */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}
.btn-loading .btn-text { visibility: hidden; }
.btn-loading .spinner { display: inline-block; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  -webkit-animation: spin 0.8s linear infinite;
  animation: spin 0.8s linear infinite;
}
@-webkit-keyframes spin {
  to { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Optional global overlay to indicate processing */
.global-loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.2);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.global-loader-overlay.show { display: flex; }
.global-loader-overlay .spinner-large {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
