/* rGift/assets/rgift.css — eGift module styles */

/* ── FONTS & RESET ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Jost:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --rg-maroon:    #7a2836;
  --rg-rose:      #c9737a;
  --rg-champagne: #fdf8f4;
  --rg-gold:      #d4a843;
  --rg-purple:    #6c4ca7;
  --rg-blue:      #3b82f6;
  --rg-green:     #16a34a;
  --rg-pink:      #ec4899;
  --rg-radius:    20px;
  --rg-shadow:    0 8px 40px rgba(122,40,54,.15);
}

body.rgift-page {
  font-family: 'Jost', sans-serif;
  background: #0d0008;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── CANVAS BACKGROUND ── */
#rgift-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── LAYOUT ── */
.rg-wrap {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

.rg-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── BACK LINK ── */
.rg-back {
  position: fixed;
  top: 18px; left: 20px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background .2s;
}
.rg-back:hover { background: rgba(255,255,255,.2); }

/* ── HERO SECTION ── */
.rg-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 60px;
}

.rg-hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(201,115,122,.3), rgba(212,168,67,.3));
  border: 1px solid rgba(201,115,122,.4);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #f5c2c7;
  margin-bottom: 24px;
  animation: fadeInDown .6s ease both;
}

.rg-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: 20px;
  animation: fadeInUp .7s .1s ease both;
}
.rg-hero h1 em { font-style: italic; color: #f5c2c7; }

.rg-hero p {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255,255,255,.7);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 36px;
  animation: fadeInUp .7s .2s ease both;
}

.rg-hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp .7s .3s ease both;
}

/* ── BUTTONS ── */
.rg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Jost', sans-serif;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all .2s;
  white-space: nowrap;
}
.rg-btn-primary {
  background: linear-gradient(135deg, #7a2836, #c9737a);
  color: #fff;
  box-shadow: 0 6px 24px rgba(201,115,122,.4);
}
.rg-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(201,115,122,.5); }
.rg-btn-outline {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.3);
  backdrop-filter: blur(8px);
}
.rg-btn-outline:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.6); }

/* ── FORM SECTION ── */
.rg-form-section {
  padding: 60px 0 80px;
}

.rg-form-card {
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 28px;
  padding: 44px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

.rg-form-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 300;
  text-align: center;
  margin-bottom: 6px;
}
.rg-form-title em { font-style: italic; color: #f5c2c7; }
.rg-form-sub {
  text-align: center;
  font-size: 14px;
  color: rgba(255,255,255,.6);
  margin-bottom: 32px;
}

.rg-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rg-form-full { grid-column: 1 / -1; }

.rg-form-group { display: flex; flex-direction: column; gap: 6px; }
.rg-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
.rg-input,
.rg-select,
.rg-textarea {
  padding: 13px 16px;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 12px;
  font-size: 14px;
  font-family: 'Jost', sans-serif;
  color: #fff;
  outline: none;
  transition: border-color .2s, background .2s;
}
.rg-input::placeholder { color: rgba(255,255,255,.3); }
.rg-input:focus,
.rg-select:focus,
.rg-textarea:focus { border-color: rgba(201,115,122,.6); background: rgba(255,255,255,.12); }
.rg-select { appearance: none; cursor: pointer; }
.rg-select option { background: #1a0a0d; color: #fff; }
.rg-textarea { resize: vertical; min-height: 100px; }

/* Theme picker */
.rg-theme-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.rg-theme-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: rgba(255,255,255,.06);
  border: 2px solid rgba(255,255,255,.12);
  border-radius: 14px;
  cursor: pointer;
  transition: all .2s;
  font-family: 'Jost', sans-serif;
  color: rgba(255,255,255,.7);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.rg-theme-btn .ico { font-size: 26px; line-height: 1; }
.rg-theme-btn:hover { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.1); }
.rg-theme-btn.active { border-color: #c9737a; background: rgba(201,115,122,.2); color: #f5c2c7; }
input[name="theme"] { display: none; }

/* Submit area */
.rg-submit-area { margin-top: 24px; text-align: center; }
.rg-submit-btn {
  /* width: 100%; */
  max-width: 340px;
  padding: 16px 32px;
  font-size: 16px;
  letter-spacing: .04em;
  position: relative;
  overflow: hidden;
}
.rg-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }

/* Alert */
.rg-alert {
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13px;
  margin-top: 16px;
  display: none;
  text-align: center;
}
.rg-alert.success { background: rgba(22,163,74,.2); border: 1px solid rgba(22,163,74,.4); color: #86efac; }
.rg-alert.error   { background: rgba(220,38,38,.2); border: 1px solid rgba(220,38,38,.4); color: #fca5a5; }

/* ── SUCCESS CARD ── */
.rg-success-card {
  background: rgba(22,163,74,.1);
  border: 1px solid rgba(22,163,74,.3);
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  margin-top: 16px;
  display: none;
}
.rg-success-card .ico { font-size: 52px; margin-bottom: 14px; }
.rg-success-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 26px; margin-bottom: 8px; }
.rg-success-card p  { font-size: 13px; color: rgba(255,255,255,.7); margin-bottom: 20px; }
.rg-link-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 auto 16px;
  max-width: 420px;
}
.rg-link-box code { flex: 1; font-size: 12px; color: #f5c2c7; word-break: break-all; text-align: left; }
.rg-copy-btn {
  padding: 6px 14px;
  background: rgba(201,115,122,.3);
  border: 1px solid rgba(201,115,122,.5);
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  white-space: nowrap;
  transition: background .2s;
}
.rg-copy-btn:hover { background: rgba(201,115,122,.5); }
.rg-share-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }

/* ── VIEW PAGE ── */
.rg-gift-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

.rg-gift-card {
  width: 100%;
  max-width: 520px;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 32px;
  padding: 48px 36px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
  animation: cardEntrance .8s cubic-bezier(.22,1,.36,1) both;
  position: relative;
  overflow: hidden;
}

.rg-gift-card::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(201,115,122,.3), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.rg-gift-seal {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
  animation: pulseGlow 2s ease-in-out infinite;
}
.theme-love      .rg-gift-seal { background: linear-gradient(135deg,#7a2836,#e879a2); }
.theme-birthday  .rg-gift-seal { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.theme-cute      .rg-gift-seal { background: linear-gradient(135deg,#ec4899,#8b5cf6); }
.theme-elegant   .rg-gift-seal { background: linear-gradient(135deg,#1e3a5f,#6c4ca7); }

.rg-gift-card h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 6px;
}
.rg-gift-card h1 em { font-style: italic; }

.theme-love      h1 em { color: #f5c2c7; }
.theme-birthday  h1 em { color: #fde68a; }
.theme-cute      h1 em { color: #f9a8d4; }
.theme-elegant   h1 em { color: #c4b5fd; }

.rg-gift-from {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  margin-bottom: 28px;
  letter-spacing: .04em;
}

.rg-gift-envelope {
  font-size: 52px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: transform .3s;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}
.rg-gift-envelope:hover { transform: scale(1.1) rotate(-5deg); }

.rg-gift-message {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 22px 20px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.7;
  color: rgba(255,255,255,.9);
  margin-bottom: 28px;
  position: relative;
}
.rg-gift-message::before {
  content: '"';
  font-size: 56px;
  color: rgba(255,255,255,.1);
  position: absolute;
  top: -10px; left: 12px;
  line-height: 1;
  font-family: Georgia, serif;
}

.rg-gift-occasion {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.theme-love      .rg-gift-occasion { background: rgba(201,115,122,.2); color: #f5c2c7; border: 1px solid rgba(201,115,122,.3); }
.theme-birthday  .rg-gift-occasion { background: rgba(245,158,11,.2);  color: #fde68a; border: 1px solid rgba(245,158,11,.3); }
.theme-cute      .rg-gift-occasion { background: rgba(236,72,153,.2);  color: #f9a8d4; border: 1px solid rgba(236,72,153,.3); }
.theme-elegant   .rg-gift-occasion { background: rgba(108,76,167,.2);  color: #c4b5fd; border: 1px solid rgba(108,76,167,.3); }

.rg-share-section { margin-top: 24px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; }
.rg-share-title { font-size: 12px; color: rgba(255,255,255,.4); margin-bottom: 12px; letter-spacing: .1em; text-transform: uppercase; }

.rg-view-footer {
  margin-top: 28px;
  font-size: 12px;
  color: rgba(255,255,255,.3);
}
.rg-view-footer a { color: rgba(255,255,255,.4); text-decoration: none; }
.rg-view-footer a:hover { color: #c9737a; }

/* ── ANIMATIONS ── */
@keyframes fadeInDown { from { opacity:0; transform:translateY(-16px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeInUp   { from { opacity:0; transform:translateY(20px);  } to { opacity:1; transform:translateY(0); } }
@keyframes cardEntrance { from { opacity:0; transform:scale(.9) translateY(30px); } to { opacity:1; transform:scale(1) translateY(0); } }
@keyframes float    { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
@keyframes pulseGlow { 0%,100%{box-shadow:0 0 0 0 rgba(201,115,122,.4)} 50%{box-shadow:0 0 0 14px rgba(201,115,122,0)} }
@keyframes spin { to { transform:rotate(360deg); } }

.rg-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

/* Theme body backgrounds */
body.theme-love    { background: radial-gradient(ellipse at 30% 50%, #3d0a14 0%, #0d0008 60%); }
body.theme-birthday{ background: radial-gradient(ellipse at 60% 30%, #1a0a00 0%, #0a0005 60%); }
body.theme-cute    { background: radial-gradient(ellipse at 50% 40%, #1a002a 0%, #0d0008 60%); }
body.theme-elegant { background: radial-gradient(ellipse at 40% 60%, #060b1a 0%, #050008 60%); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .rg-form-grid { grid-template-columns: 1fr; }
  .rg-form-card { padding: 28px 20px; }
  .rg-theme-grid { grid-template-columns: repeat(2,1fr); }
  .rg-gift-card  { padding: 36px 22px; }
  .rg-hero { padding: 70px 16px 50px; }
  .rg-form-full { grid-column: 1; }
}
