/* ===== Button Component (mc-btn) ===== */
.mc-btn {
  --mc-btn-bg: #1a1a2e;
  --mc-btn-color: #ffffff;
  --mc-btn-border-width: 0px;
  --mc-btn-border-style: solid;
  --mc-btn-border-color: transparent;
  --mc-btn-radius: 8px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;

  background: var(--mc-btn-bg);
  color: var(--mc-btn-color);
  border: var(--mc-btn-border-width) var(--mc-btn-border-style) var(--mc-btn-border-color);
  border-radius: var(--mc-btn-radius);

  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease, filter .15s ease;
}

.mc-btn svg { width: 1em; height: 1em; flex-shrink: 0; }

.mc-btn:hover,
.mc-btn:focus {
  background: var(--mc-btn-bg) !important;
  color: var(--mc-btn-color) !important;
}

/* ---- Size ---- */
.mc-btn--sm  { padding: 6px 14px;  font-size: 13px; }
.mc-btn--md  { padding: 10px 20px; font-size: 15px; }
.mc-btn--lg  { padding: 14px 28px; font-size: 17px; }
.mc-btn--full { width: 100%; }

/* ---- Shape ---- */
.mc-btn--rounded { --mc-btn-radius: 8px; }
.mc-btn--pill     { --mc-btn-radius: 999px; }
.mc-btn--circle   { --mc-btn-radius: 50%; width: 44px; height: 44px; padding: 0; }
.mc-btn--sharp    { --mc-btn-radius: 0px; }

/* ---- Variant (màu mặc định, có thể override bằng inline var) ---- */
.mc-btn--primary {
  --mc-btn-bg: linear-gradient(135deg,#075985 0%,#0284c7 52%,#22d3ee 115%);
  --mc-btn-color: #ffffff;
  border: none;
}
.mc-btn--primary:hover { filter: brightness(1.08); }

.mc-btn--ghost {
  --mc-btn-bg: rgba(255,255,255,0.08);
  --mc-btn-color: #ffffff;
  --mc-btn-border-width: 1px;
  --mc-btn-border-color: rgba(255,255,255,0.25);
}
.mc-btn--ghost:hover { --mc-btn-bg: rgba(255,255,255,0.16) !important; }

.mc-btn--light { --mc-btn-bg: #f3f4f8; --mc-btn-color: #1a1a2e; }
.mc-btn--light:hover { --mc-btn-bg: #e6e8f0; }

.mc-btn--outline {
  --mc-btn-bg: transparent;
  --mc-btn-color: #2f5eff;
  --mc-btn-border-width: 1.5px;
  --mc-btn-border-color: #2f5eff;
}
.mc-btn--outline:hover { --mc-btn-bg: rgba(47,94,255,0.08); }

.mc-btn--link {
  --mc-btn-bg: transparent;
  --mc-btn-color: #2f5eff;
  padding-left: 0;
  padding-right: 0;
}
.mc-btn--link:hover { text-decoration: underline; }

.mc-btn--text {
  --mc-btn-bg: transparent;
  --mc-btn-color: inherit;
  border: none;
}
.mc-btn--text:hover { 
  background: transparent !important;
  opacity: 0.7; 
}

.mc-btn--icon-only { padding: 10px; }

/* ---- Shadow / Elevation ---- */
.mc-btn--shadow-soft  { box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.mc-btn--shadow-glow  { box-shadow: 0 0 16px rgba(47,94,255,0.45); }
.mc-btn--shadow-hover-lift:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.18); }

/* ---- Backdrop blur (dạng kính mờ) ---- */
.mc-btn--blur {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ---- State ---- */
.mc-btn:focus-visible {
  outline: 2px solid #2f5eff;
  outline-offset: 2px;
}
.mc-btn[disabled],
.mc-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.mc-btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.mc-btn.is-loading .mc-btn__spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mc-btn.is-loading .mc-btn__label,
.mc-btn.is-loading .mc-btn__icon { visibility: hidden; }

.mc-spin { animation: mc-spin 0.7s linear infinite; }
@keyframes mc-spin { to { transform: rotate(360deg); } }

/* ---- Icon dạng vòng tròn viền (icon-circle) ---- */
.mc-btn__icon--circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mc-btn__icon--circle svg { width: 11px; height: 11px; }

/* ---- Gạch phân cách trước icon ---- */
.mc-btn__divider {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.3);
  margin: 0 2px;
  flex-shrink: 0;
}

/* ================================================ Hiệu ứng ============================================== */

/* hover_elevation: nâng nút + phóng to nhẹ khi hover */
.mc-btn--fx-hover-elevation:hover {
  transform: translateY(-3px) scale(1.03);
}

/* specular_glow: bóng phát sáng + viền sáng phản chiếu bên trong */
.mc-btn--fx-specular-glow:hover {
  box-shadow: 0 0 20px rgba(47,94,255,0.55), inset 0 1px 0 rgba(255,255,255,0.4);
}

/* gradient_shift: dịch chuyển gradient nền khi hover (chỉ có tác dụng nếu bg là gradient) */
.mc-btn--fx-gradient-shift {
  background-size: 200% 200%;
  background-position: 0% 50%;
  transition: background-position .4s ease, transform .15s ease, box-shadow .15s ease;
}
.mc-btn--fx-gradient-shift:hover {
  background-position: 100% 50%;
}

/* icon_glide: icon phải trượt sang phải khi hover */
.mc-btn--fx-icon-glide .mc-btn__icon--right {
  transition: transform .25s ease;
}
.mc-btn--fx-icon-glide:hover .mc-btn__icon--right {
  transform: translateX(4px);
}

/* ---- FX (Effects) ---- */
.mc-btn--fx-hover-elevation {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.mc-btn--fx-hover-elevation:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(23, 192, 235, 0.35); /* Cyan shadow */
}

.mc-btn--fx-gradient-shift {
  background-size: 200% auto !important;
  transition: background-position 0.5s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease !important;
}
.mc-btn--fx-gradient-shift:hover {
  background-position: right center !important;
}

.mc-btn--fx-rotate-20 {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.mc-btn--fx-rotate-20:hover {
  transform: scale(1.1) rotate(20deg);
}

.mc-btn--fx-rotate-20.mc-btn--fx-hover-elevation:hover {
  transform: scale(1.1) rotate(20deg);
}
