/* ========== Custom Button System - Figma Accurate ========== */

/* Base button structure */
.btn-custom {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 20px 48px;
  gap: 10px;
  isolation: isolate;
  
  min-width: 212px;
  width: auto;
  height: 61px;
  
  background: #000000;
  backdrop-filter: blur(6px);
  border: 1px solid transparent; /* ✅ CHANGE: Thinner border */
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  text-decoration: none;
  
  flex: none;
  order: 0;
  flex-grow: 0;
  
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

/* Button text content */
.btn-custom .btn-content {
  width: auto;
  min-width: auto;
  height: auto;
  
  font-family: 'Space Grotesk', 'Inter', sans-serif !important;
  font-style: normal;
  font-weight: 700;
  font-size: 18px;
  line-height: 23px;
  
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-transform: capitalize;
  white-space: nowrap;
  
  flex: none;
  order: 0;
  flex-grow: 0;
  z-index: 2;
  
  position: relative;
  margin: 0;
  padding: 0;
}

/* Corner decorations container */
.btn-custom::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0px;
  top: 0px;
  
  flex: none;
  order: 1;
  flex-grow: 0;
  z-index: 1;
  pointer-events: none;
}

/* Create all corner elements - ✅ BIGGER SIZE and HIGHER Z-INDEX */
.btn-custom .corner-tl-h,
.btn-custom .corner-tl-v,
.btn-custom .corner-tr-h,
.btn-custom .corner-tr-v,
.btn-custom .corner-bl-h,
.btn-custom .corner-bl-v,
.btn-custom .corner-br-h,
.btn-custom .corner-br-v {
  position: absolute;
  z-index: 10; /* ✅ CHANGE: Higher z-index to overlay border */
  pointer-events: none;
}

/* Top-left corner - ✅ DOUBLE SIZE */
.btn-custom .corner-tl-h {
  width: 12px; /* ✅ CHANGE: 6px -> 12px */
  height: 3px;  /* ✅ CHANGE: 2px -> 3px */
  left: -2px;   /* ✅ CHANGE: Move slightly outside to overlay border */
  top: -2px;    /* ✅ CHANGE: Move slightly outside */
}

.btn-custom .corner-tl-v {
  width: 3px;   /* ✅ CHANGE: 2px -> 3px */
  height: 12px; /* ✅ CHANGE: 6px -> 12px */
  left: -2px;   /* ✅ CHANGE: Move slightly outside */
  top: -2px;    /* ✅ CHANGE: Move slightly outside */
}

/* Top-right corner - ✅ DOUBLE SIZE */
.btn-custom .corner-tr-h {
  width: 12px;  /* ✅ CHANGE: 6px -> 12px */
  height: 3px;  /* ✅ CHANGE: 2px -> 3px */
  right: -2px;  /* ✅ CHANGE: Move slightly outside */
  top: -2px;    /* ✅ CHANGE: Move slightly outside */
  transform: matrix(-1, 0, 0, 1, 0, 0);
}

.btn-custom .corner-tr-v {
  width: 3px;   /* ✅ CHANGE: 2px -> 3px */
  height: 12px; /* ✅ CHANGE: 6px -> 12px */
  right: -2px;  /* ✅ CHANGE: Move slightly outside */
  top: -2px;    /* ✅ CHANGE: Move slightly outside */
  transform: matrix(-1, 0, 0, 1, 0, 0);
}

/* Bottom-left corner - ✅ DOUBLE SIZE */
.btn-custom .corner-bl-h {
  width: 12px;  /* ✅ CHANGE: 6px -> 12px */
  height: 3px;  /* ✅ CHANGE: 2px -> 3px */
  left: -2px;   /* ✅ CHANGE: Move slightly outside */
  bottom: -2px; /* ✅ CHANGE: Move slightly outside */
  transform: matrix(1, 0, 0, -1, 0, 0);
}

.btn-custom .corner-bl-v {
  width: 3px;   /* ✅ CHANGE: 2px -> 3px */
  height: 12px; /* ✅ CHANGE: 6px -> 12px */
  left: -2px;   /* ✅ CHANGE: Move slightly outside */
  bottom: -2px; /* ✅ CHANGE: Move slightly outside */
  transform: matrix(1, 0, 0, -1, 0, 0);
}

/* Bottom-right corner - ✅ DOUBLE SIZE */
.btn-custom .corner-br-h {
  width: 12px;  /* ✅ CHANGE: 6px -> 12px */
  height: 3px;  /* ✅ CHANGE: 2px -> 3px */
  right: -2px;  /* ✅ CHANGE: Move slightly outside */
  bottom: -2px; /* ✅ CHANGE: Move slightly outside */
  transform: rotate(-180deg);
}

.btn-custom .corner-br-v {
  width: 3px;   /* ✅ CHANGE: 2px -> 3px */
  height: 12px; /* ✅ CHANGE: 6px -> 12px */
  right: -2px;  /* ✅ CHANGE: Move slightly outside */
  bottom: -2px; /* ✅ CHANGE: Move slightly outside */
  transform: rotate(-180deg);
}

/* ========== Gold Variant ========== */
.btn-gold {
  border: 1px solid rgba(248, 215, 0, 0.6); /* ✅ CHANGE: Thinner border, higher opacity */
}

.btn-gold .btn-content {
  background: linear-gradient(180deg, #E2E462 0%, #FFF3CC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-gold .corner-tl-h,
.btn-gold .corner-tl-v,
.btn-gold .corner-tr-h,
.btn-gold .corner-tr-v,
.btn-gold .corner-bl-h,
.btn-gold .corner-bl-v,
.btn-gold .corner-br-h,
.btn-gold .corner-br-v {
  background: #FEFFC5;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(248, 215, 0, 0.3);
  border-color: rgba(248, 215, 0, 0.8); /* ✅ CHANGE: Higher opacity on hover */
}

.btn-gold:hover .btn-content {
  background: linear-gradient(180deg, #F0E870 0%, #FFF8D6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== Gray Variant ========== */
.btn-gray {
  border: 1px solid rgba(160, 160, 160, 0.6); /* ✅ CHANGE: Thinner border, higher opacity */
}

.btn-gray .btn-content {
  background: linear-gradient(180deg, #CCCCCC 0%, #E8E8E8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-gray .corner-tl-h,
.btn-gray .corner-tl-v,
.btn-gray .corner-tr-h,
.btn-gray .corner-tr-v,
.btn-gray .corner-bl-h,
.btn-gray .corner-bl-v,
.btn-gray .corner-br-h,
.btn-gray .corner-br-v {
  background: #E0E0E0;
}

.btn-gray:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(160, 160, 160, 0.3);
  border-color: rgba(160, 160, 160, 0.8); /* ✅ CHANGE: Higher opacity on hover */
}

.btn-gray:hover .btn-content {
  background: linear-gradient(180deg, #D6D6D6 0%, #F0F0F0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== Red Variant ========== */
.btn-red {
  border: 1px solid rgba(255, 107, 107, 0.6); /* ✅ CHANGE: Thinner border, higher opacity */
}

.btn-red .btn-content {
  background: linear-gradient(180deg, #FF6B6B 0%, #FFB3B3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-red .corner-tl-h,
.btn-red .corner-tl-v,
.btn-red .corner-tr-h,
.btn-red .corner-tr-v,
.btn-red .corner-bl-h,
.btn-red .corner-bl-v,
.btn-red .corner-br-h,
.btn-red .corner-br-v {
  background: #FF9898;
}

.btn-red:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
  border-color: rgba(255, 107, 107, 0.8); /* ✅ CHANGE: Higher opacity on hover */
}

.btn-red:hover .btn-content {
  background: linear-gradient(180deg, #FF7878 0%, #FFC0C0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== Responsive Sizes ========== */
.btn-small {
  min-width: 160px;
  height: 45px;
  padding: 15px 36px;
}

.btn-small .btn-content {
  font-size: 16px;
  line-height: 20px;
}

/* ✅ ADD: Smaller corners for small buttons */
.btn-small .corner-tl-h,
.btn-small .corner-tr-h,
.btn-small .corner-bl-h,
.btn-small .corner-br-h {
  width: 9px;
  height: 2px;
}

.btn-small .corner-tl-v,
.btn-small .corner-tr-v,
.btn-small .corner-bl-v,
.btn-small .corner-br-v {
  width: 2px;
  height: 9px;
}

.btn-large {
  min-width: 280px;
  height: 75px;
  padding: 25px 60px;
}

.btn-large .btn-content {
  font-size: 20px;
  line-height: 26px;
}

/* ✅ ADD: Larger corners for large buttons */
.btn-large .corner-tl-h,
.btn-large .corner-tr-h,
.btn-large .corner-bl-h,
.btn-large .corner-br-h {
  width: 15px;
  height: 4px;
}

.btn-large .corner-tl-v,
.btn-large .corner-tr-v,
.btn-large .corner-bl-v,
.btn-large .corner-br-v {
  width: 4px;
  height: 15px;
}

/* ========== Disabled State ========== */
.btn-custom:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  border-color: rgba(100, 100, 100, 0.3);
}

.btn-custom:disabled .btn-content {
  background: linear-gradient(180deg, #666666 0%, #999999 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== Loading State ========== */
.btn-custom.loading {
  pointer-events: none;
}

.btn-custom.loading .btn-content {
  opacity: 0.7;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .btn-custom {
    min-width: 180px;
    height: 50px;
    padding: 18px 32px;
  }
  
  .btn-custom .btn-content {
    font-size: 16px;
    line-height: 20px;
  }
  
  .btn-small {
    min-width: 140px;
    height: 40px;
    padding: 12px 24px;
  }
  
  .btn-small .btn-content {
    font-size: 14px;
    line-height: 18px;
  }
  
  .btn-large {
    min-width: 200px;
    height: 60px;
    padding: 20px 40px;
  }
  
  .btn-large .btn-content {
    font-size: 18px;
    line-height: 23px;
  }
}