/* =========================================================
   i2165062 — BUY PAGE STYLES (v2)
   ========================================================= */

:root {
  --ink: #2b2f35;
  --muted: #777;
  --accent: #00a896;
  --bg0: #f7f8f9;
  --bg1: #eef0f2;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 700px at 50% 0%, var(--bg1), var(--bg0));
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
}

/* ---------- Container ---------- */
.buy-container {
  width: 100%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 40px 36px;
  animation: fadeUp 1s ease-out;
}

/* ---------- Titles ---------- */
.buy-title {
  text-align: center;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 8px;
}

.buy-subtitle {
  text-align: center;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 30px;
}

/* ---------- Form ---------- */
.buy-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

label {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #ccc;
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.15);
}

/* ---------- Country selector ---------- */
.country-field {
  position: relative;
}

.country-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.country-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.country-trigger:hover,
.country-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.15);
}

.country-trigger-flag {
  width: 22px;
  text-align: center;
}

.country-trigger-text {
  flex: 1;
  text-align: left;
  color: #333;
}

.country-caret {
  opacity: 0.7;
}

/* Dropdown */
.country-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  display: none;
  max-height: 320px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  z-index: 50;
}

.country-panel.open {
  display: block;
}

.country-search {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.country-search input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.country-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  max-height: 260px;
  overflow: auto;
}

.country-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

.country-item:hover {
  background: rgba(0, 168, 150, 0.06);
}

/* ---------- Buttons ---------- */
.btn-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 13px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.btn-submit:hover {
  background: #029582;
  transform: translateY(-2px);
}

.note {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 168, 150, 0.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1),
    0 0 0 3px rgba(0, 168, 150, 0.08) inset;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 8px;
  z-index: 9999;
}

.toast.show {
  display: flex;
  animation: toastIn 0.45s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ---------- Success Card ---------- */
.success-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 25px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12px);
  text-align: center;
  padding: 40px 30px;
  width: 90%;
  max-width: 400px;
  animation: fadeInScale 0.5s ease forwards;
  z-index: 2000;
}

.success-card h2 {
  color: var(--accent);
  font-size: 22px;
  margin-bottom: 10px;
}

.success-card p {
  color: var(--ink);
  font-size: 15px;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .buy-container {
    padding: 28px 22px;
  }

  .buy-title {
    font-size: 24px;
  }

  .country-panel {
    max-height: 250px;
  }
}
/* hCaptcha spacing */
.captcha-group {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  margin-bottom: 10px;
}

/* Disabled button look */
.btn-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}


