/* Heaven VIP Gift Card - Optimized Styles */
/* =================================== */
/* CSS Custom Properties */
/* =================================== */

:root {
  /* Colors */
  --primary-gradient: linear-gradient(135deg, #f4c6af 0%, #bc8e71 100%);
  --primary-color: #bc8e71;
  --primary-light: #f4c6af;
  --success-gradient: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  --success-color: #28a745;
  --error-color: #dc3545;
  --warning-color: #ffc107;
  
  --text-primary: #2c3e50;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --text-light: #adb5bd;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-light: #f1f3f4;
  --border-color: #e9ecef;
  --border-light: #f8f9fa;
  
  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 20px;
  --spacing-xl: 24px;
  --spacing-2xl: 32px;
  --spacing-3xl: 40px;
  --spacing-4xl: 48px;
  
  /* Typography */
  --font-family-primary: "Abel", sans-serif;
  --font-family-rtl: 'Cairo', 'Abel', sans-serif;
  
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 28px;
  --font-size-4xl: 32px;
  --font-size-5xl: 36px;
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50%;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 6px 25px rgba(0, 0, 0, 0.08);
  --shadow-2xl: 0 20px 60px rgba(0, 0, 0, 0.3);
  
  --shadow-primary: 0 4px 15px rgba(188, 142, 113, 0.3);
  --shadow-primary-lg: 0 6px 20px rgba(188, 142, 113, 0.4);
  --shadow-success: 0 4px 15px rgba(40, 167, 69, 0.3);
  --shadow-success-lg: 0 6px 20px rgba(40, 167, 69, 0.4);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 10000;
  
  /* Form Elements */
  --input-height: 56px;
  --input-height-sm: 48px;
  --input-height-lg: 64px;
  --button-height: 56px;
  --button-height-sm: 48px;
  --button-height-lg: 64px;
}

/* RTL-specific variables */
:root[dir="rtl"] {
  --font-family-primary: var(--font-family-rtl);
  --input-height: 65px;
  --input-height-sm: 55px;
  --input-height-lg: 70px;
  --button-height: 60px;
  --button-height-sm: 55px;
  --button-height-lg: 70px;
}

/* =================================== */
/* Base Styles & Reset */
/* =================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-primary);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* RTL Support */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
  font-family: var(--font-family-rtl);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-feature-settings: "kern" 1;
  font-feature-settings: "kern" 1;
  letter-spacing: 0.01em;
}

/* Remove default form element borders */
input,
textarea,
select,
button {
  border: none;
  outline: none;
  font-family: inherit;
}

/* =================================== */
/* Utility Classes */
/* =================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

[dir="rtl"] .text-left { text-align: right; }
[dir="rtl"] .text-right { text-align: left; }

/* =================================== */
/* Component Styles */
/* =================================== */

/* Main Container */
.heaven-gift-card-page {
  min-height: 100vh;
  padding: var(--spacing-lg);
}

[dir="rtl"] .heaven-gift-card-page {
  padding: 25px var(--spacing-lg);
}

/* Layout Grid */
.gift-card-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 250px 1fr 350px;
  gap: var(--spacing-2xl);
  align-items: start;
}

[dir="rtl"] .gift-card-wrapper {
  grid-template-columns: 250px 1fr 350px;
  gap: 35px;
}

/* =================================== */
/* Steps Sidebar */
/* =================================== */

.steps-sidebar {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-2xl) var(--spacing-lg);
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: var(--spacing-lg);
}

[dir="rtl"] .steps-sidebar {
  border-radius: var(--radius-xl);
  padding: 35px 25px;
  box-shadow: var(--shadow-xl);
  top: 25px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  position: relative;
  cursor: pointer;
  transition: var(--transition-normal);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
}

[dir="rtl"] .step-item {
  padding: 18px var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.step-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 29px;
  top: 60px;
  width: 2px;
  height: 30px;
  background: var(--border-color);
  transition: var(--transition-normal);
}

[dir="rtl"] .step-item:not(:last-child)::after {
  left: 29px;
  right: auto;
  top: 70px;
  width: 3px;
  height: 35px;
}

.step-item:hover {
  background: var(--bg-secondary);
}

.step-item.active {
  background: linear-gradient(135deg, rgba(244, 198, 175, 0.1) 0%, rgba(188, 142, 113, 0.1) 100%);
  border-left: 3px solid var(--primary-color);
}

[dir="rtl"] .step-item.active {
  border-left: none;
  border-right: 4px solid var(--primary-color);
  background: linear-gradient(135deg, rgba(244, 198, 175, 0.15) 0%, rgba(188, 142, 113, 0.15) 100%);
}

.step-item.active::after {
  background: var(--primary-gradient);
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  transition: var(--transition-normal);
  flex-shrink: 0;
}

[dir="rtl"] .step-number {
  width: 38px;
  height: 38px;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-md);
}

.step-item.active .step-number {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-primary);
}

[dir="rtl"] .step-item.active .step-number {
  box-shadow: var(--shadow-primary-lg);
  transform: scale(1.05);
}

.step-info {
  flex: 1;
}

.step-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: 2px;
}

[dir="rtl"] .step-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  margin-bottom: 4px;
  line-height: 1.3;
}

.step-desc {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

[dir="rtl"] .step-desc {
  font-size: 13px;
  line-height: 1.4;
}

.step-item.active .step-title {
  color: var(--primary-color);
}

/* =================================== */
/* Main Content Area */
/* =================================== */

.main-content-area {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-height: 500px;
}

[dir="rtl"] .main-content-area {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  min-height: 550px;
}

.step-content {
  display: none;
  padding: var(--spacing-3xl);
}

[dir="rtl"] .step-content {
  padding: 50px 45px;
}

.step-content.active {
  display: block;
  animation: fadeInUp 0.4s ease-out;
}

[dir="rtl"] .step-content.active {
  animation: fadeInUpRTL 0.5s ease-out;
}

.step-header {
  margin-bottom: var(--spacing-3xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

[dir="rtl"] .step-header {
  margin-bottom: 50px;
  padding-bottom: 25px;
}

.step-header h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin: 0;
}

[dir="rtl"] .step-header h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
}

/* =================================== */
/* Form Components */
/* =================================== */

.form-section {
  margin-bottom: 35px;
}

[dir="rtl"] .form-section {
  margin-bottom: var(--spacing-3xl);
}

.section-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-xs);
  border-bottom: 2px solid var(--border-light);
}

[dir="rtl"] .section-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: 25px;
  padding-bottom: var(--spacing-sm);
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

[dir="rtl"] .form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  margin-bottom: 15px;
}

[dir="rtl"] .form-group label {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-lg);
}

/* Input Styles */
.form-input {
  width: 100%;
  height: var(--input-height);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-size: var(--font-size-md);
  color: var(--text-primary);
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

[dir="rtl"] .form-input {
  height: var(--input-height);
  padding: 20px 25px;
  border-radius: 15px;
  font-size: 17px;
  font-weight: var(--font-weight-medium);
  box-shadow: var(--shadow-md);
}

.form-input:focus {
  box-shadow: 0 0 0 3px rgba(188, 142, 113, 0.2);
}

[dir="rtl"] .form-input:focus {
  box-shadow: 0 0 0 4px rgba(188, 142, 113, 0.25);
  transform: translateY(-2px);
}

.form-input::placeholder {
  color: var(--text-light);
}

/* Textarea */
.form-textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

[dir="rtl"] .form-textarea {
  min-height: 120px;
  padding-top: 25px;
  padding-bottom: 25px;
  line-height: 1.6;
}

/* Amount Input */
.amount-input-wrapper {
  display: flex;
  align-items: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

[dir="rtl"] .amount-input-wrapper {
  flex-direction: row;
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  height: 65px;
}

.amount-input-wrapper:focus-within {
  box-shadow: 0 0 0 3px rgba(188, 142, 113, 0.2);
}

[dir="rtl"] .amount-input-wrapper:focus-within {
  box-shadow: 0 0 0 4px rgba(188, 142, 113, 0.25);
  transform: translateY(-2px);
}

.amount-input {
  flex: 1;
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  background: transparent;
}

[dir="rtl"] .amount-input {
  border-radius: 0 15px 15px 0;
  padding: 0 25px;
  font-size: var(--spacing-lg);
  font-weight: var(--font-weight-semibold);
  height: 100%;
}

.currency-label {
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--primary-gradient);
  color: white;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  min-width: 60px;
  text-align: center;
}

[dir="rtl"] .currency-label {
  padding: 0 25px;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  min-width: 80px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px 0 0 15px;
}

/* Phone Input */
.phone-group {
  display: flex;
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

[dir="rtl"] .phone-group {
  flex-direction: row;
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  height: 65px;
}

.phone-group:focus-within {
  box-shadow: 0 0 0 3px rgba(188, 142, 113, 0.2);
}

[dir="rtl"] .phone-group:focus-within {
  box-shadow: 0 0 0 4px rgba(188, 142, 113, 0.25);
  transform: translateY(-2px);
}

.country-select {
  padding: var(--spacing-md) 15px;
  background: var(--bg-secondary);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  cursor: pointer;
  min-width: 120px;
  border-right: 1px solid var(--border-color);
}

[dir="rtl"] .country-select {
  padding: 0 var(--spacing-lg);
  font-size: var(--font-size-md);
  min-width: 140px;
  border-left: 1px solid var(--border-color);
  border-right: none;
  height: 100%;
  font-weight: var(--font-weight-semibold);
  border-radius: 0 15px 15px 0;
}

/* =================================== */
/* Buttons */
/* =================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-normal);
  height: var(--button-height);
}

[dir="rtl"] .btn {
  padding: var(--spacing-md) var(--spacing-2xl);
  border-radius: var(--radius-md);
  font-size: 17px;
  font-weight: var(--font-weight-semibold);
  gap: var(--spacing-sm);
  height: var(--button-height);
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary-lg);
}

[dir="rtl"] .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(188, 142, 113, 0.5);
}

.btn-secondary {
  background: var(--text-muted);
  color: white;
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

[dir="rtl"] .btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(108, 117, 125, 0.5);
}

.btn-success {
  background: var(--success-gradient);
  color: white;
  box-shadow: var(--shadow-success);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-success-lg);
}

[dir="rtl"] .btn-success:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* Button Icons */
.btn-icon {
  font-size: 14px;
  transition: var(--transition-normal);
}

[dir="rtl"] .btn-icon {
  font-size: var(--font-size-md);
}

/* Arrow animations for RTL */
[dir="rtl"] .arrow-right {
  transform: none;
}

[dir="rtl"] .arrow-left {
  transform: none;
}

.btn-primary:hover .arrow-right {
  transform: translateX(3px);
}

[dir="rtl"] .btn-primary:hover .arrow-right {
  transform: translateX(3px);
}

.btn-secondary:hover .arrow-left {
  transform: translateX(-3px);
}

[dir="rtl"] .btn-secondary:hover .arrow-left {
  transform: translateX(-3px);
}

/* =================================== */
/* Step Actions */
/* =================================== */

.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--spacing-3xl);
  padding-top: var(--spacing-2xl);
  border-top: 1px solid var(--border-color);
}

[dir="rtl"] .step-actions {
  margin-top: 50px;
  padding-top: 35px;
  flex-direction: row;
}

/* =================================== */
/* Gift Preview */
/* =================================== */

.gift-preview-area {
  position: sticky;
  top: var(--spacing-lg);
}

[dir="rtl"] .gift-preview-area {
  top: 25px;
}

.preview-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 25px;
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--spacing-lg);
}

[dir="rtl"] .preview-card {
  border-radius: var(--radius-xl);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow-xl);
  margin-bottom: 25px;
}

.card-design {
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  padding: 25px;
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

[dir="rtl"] .card-design {
  border-radius: 15px;
  padding: var(--spacing-2xl);
  min-height: 220px;
}

.card-design::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: var(--radius-full);
  transform: translate(30px, -30px);
}

[dir="rtl"] .card-design::before {
  left: 0;
  right: auto;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  transform: translate(-40px, -40px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

[dir="rtl"] .card-header {
  margin-bottom: 25px;
  flex-direction: row;
}

.heaven-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

[dir="rtl"] .heaven-logo {
  gap: var(--spacing-sm);
}

.logo-text {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  opacity: 0.9;
}

[dir="rtl"] .logo-text {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
}

.logo-icon {
  font-size: var(--font-size-md);
}

[dir="rtl"] .logo-icon {
  font-size: var(--font-size-lg);
}

.card-amount {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-xs);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[dir="rtl"] .card-amount {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--spacing-sm);
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
}

.amount-value {
  font-size: var(--font-size-5xl);
}

[dir="rtl"] .amount-value {
  font-size: 42px;
  font-weight: var(--font-weight-extrabold);
}

.amount-currency {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-normal);
  margin-left: 5px;
  opacity: 0.9;
}

[dir="rtl"] .amount-currency {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-left: 0;
  margin-right: var(--spacing-xs);
  opacity: 0.9;
}

.card-title {
  font-size: var(--font-size-sm);
  opacity: 0.8;
  margin-bottom: auto;
}

[dir="rtl"] .card-title {
  font-size: var(--font-size-md);
  opacity: 0.9;
  font-weight: var(--font-weight-semibold);
}

.card-decorations {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

[dir="rtl"] .card-decorations {
  justify-content: flex-end;
}

.decoration-dots {
  width: 40px;
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  position: relative;
}

[dir="rtl"] .decoration-dots {
  width: 50px;
  height: 10px;
  border-radius: 5px;
}

.decoration-dots::before,
.decoration-dots::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-full);
  top: 0;
}

[dir="rtl"] .decoration-dots::before,
[dir="rtl"] .decoration-dots::after {
  width: 10px;
  height: 10px;
}

.decoration-dots::before {
  left: -15px;
}

[dir="rtl"] .decoration-dots::before {
  left: -20px;
  right: auto;
}

.decoration-dots::after {
  right: -15px;
}

[dir="rtl"] .decoration-dots::after {
  right: -20px;
  left: auto;
}

/* =================================== */
/* Price Summary */
/* =================================== */

.price-summary {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 25px;
  box-shadow: var(--shadow-lg);
}

[dir="rtl"] .price-summary {
  border-radius: var(--radius-xl);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow-xl);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 0;
  font-size: 15px;
  color: var(--text-secondary);
}

[dir="rtl"] .summary-row {
  padding: 15px 0;
  font-size: var(--font-size-md);
  flex-direction: row;
  font-weight: var(--font-weight-medium);
}

.summary-row:not(:last-child) {
  border-bottom: 1px solid var(--border-light);
}

.summary-row.total {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  color: var(--text-primary);
  margin-top: var(--spacing-sm);
  padding-top: 15px;
  border-top: 2px solid var(--border-color);
  border-bottom: none;
}

[dir="rtl"] .summary-row.total {
  font-weight: var(--font-weight-extrabold);
  font-size: var(--font-size-xl);
  margin-top: 15px;
  padding-top: var(--spacing-lg);
}

/* =================================== */
/* Payment Section */
/* =================================== */

.payment-section {
  max-width: 500px;
}

[dir="rtl"] .payment-section {
  max-width: 550px;
}

.payment-form h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: 25px;
}

[dir="rtl"] .payment-form h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-2xl);
}

.stripe-element {
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

[dir="rtl"] .stripe-element {
  padding: 25px;
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  height: 70px;
  display: flex;
  align-items: center;
}

.stripe-element:focus-within {
  box-shadow: 0 0 0 3px rgba(188, 142, 113, 0.2);
}

[dir="rtl"] .stripe-element:focus-within {
  box-shadow: 0 0 0 4px rgba(188, 142, 113, 0.25);
  transform: translateY(-2px);
}

.security-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin: var(--spacing-lg) 0;
  padding: 15px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

[dir="rtl"] .security-info {
  gap: var(--spacing-md);
  margin: 25px 0;
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  font-size: 15px;
  flex-direction: row;
  line-height: 1.5;
}

.shield-icon {
  color: var(--success-color);
  font-size: var(--font-size-md);
}

[dir="rtl"] .shield-icon {
  font-size: var(--font-size-lg);
}

/* =================================== */
/* Error States */
/* =================================== */

.error-notification {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
  color: #842029;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
  border-left: 4px solid var(--error-color);
  display: none;
  animation: slideInDown var(--transition-normal);
}

[dir="rtl"] .error-notification {
  padding: var(--spacing-lg) 25px;
  border-radius: 15px;
  margin-bottom: 25px;
  border-left: none;
  border-right: 4px solid var(--error-color);
  animation: slideDownRTL 0.4s ease-out;
  line-height: 1.6;
  font-size: var(--font-size-md);
}

#card-errors {
  color: var(--error-color);
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-sm);
  padding: var(--spacing-md);
  background: #f8d7da;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--error-color);
  display: none;
}

[dir="rtl"] #card-errors {
  font-size: 15px;
  margin-top: 15px;
  padding: 15px var(--spacing-lg);
  border-radius: var(--radius-md);
  border-left: none;
  border-right: 4px solid var(--error-color);
  line-height: 1.5;
}

/* =================================== */
/* Modal */
/* =================================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

[dir="rtl"] .modal {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.modal-content {
  background: var(--bg-primary);
  padding: var(--spacing-3xl);
  border-radius: var(--radius-xl);
  text-align: center;
  max-width: 450px;
  width: 90%;
  position: relative;
  box-shadow: var(--shadow-2xl);
  animation: modalSlideIn var(--transition-normal);
}

[dir="rtl"] .modal-content {
  padding: 50px;
  border-radius: 25px;
  max-width: 500px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
  animation: modalSlideInRTL 0.4s ease-out;
}

.success-animation {
  margin-bottom: 25px;
}

[dir="rtl"] .success-animation {
  margin-bottom: var(--spacing-2xl);
}

.checkmark {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: var(--success-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin: 0 auto;
  animation: checkmarkPulse 0.6s ease-out;
}

[dir="rtl"] .checkmark {
  width: 70px;
  height: 70px;
  font-size: var(--font-size-3xl);
  animation: checkmarkPulse 0.7s ease-out;
}

.modal-content h3 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: 15px;
}

[dir="rtl"] .modal-content h3 {
  font-size: 26px;
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--spacing-lg);
  line-height: 1.3;
}

.modal-content p {
  color: var(--text-muted);
  font-size: var(--font-size-md);
  line-height: 1.5;
  margin-bottom: var(--spacing-sm);
}

[dir="rtl"] .modal-content p {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 15px;
}

/* =================================== */
/* Loading Spinner */
/* =================================== */

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-full);
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

[dir="rtl"] .loading-spinner {
  width: 18px;
  height: 18px;
  margin-left: var(--spacing-sm);
  margin-right: 0;
  animation: spin 1.2s ease-in-out infinite;
}

/* Character Counter */
.char-counter {
  text-align: right;
  margin-top: var(--spacing-xs);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

[dir="rtl"] .char-counter {
  text-align: left;
  margin-top: var(--spacing-sm);
  font-size: 13px;
}

#char-count {
  font-weight: var(--font-weight-semibold);
  color: var(--success-color);
}

[dir="rtl"] #char-count {
  font-weight: var(--font-weight-bold);
}

.amount-note {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--spacing-xs);
  font-style: italic;
}

[dir="rtl"] .amount-note {
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-md);
}

/* =================================== */
/* Animations */
/* =================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUpRTL {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modalSlideInRTL {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDownRTL {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes checkmarkPulse {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =================================== */
/* Scrollbar Styles */
/* =================================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

/* =================================== */
/* Selection Styles */
/* =================================== */

::selection {
  background: rgba(188, 142, 113, 0.2);
  color: var(--text-primary);
}

::-moz-selection {
  background: rgba(188, 142, 113, 0.2);
  color: var(--text-primary);
}

/* =================================== */
/* Accessibility & Focus States */
/* =================================== */

:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn:focus,
.form-input:focus,
.step-item:focus {
  outline: 3px solid rgba(188, 142, 113, 0.5);
  outline-offset: 2px;
}

/* =================================== */
/* High Contrast Mode */
/* =================================== */

@media (prefers-contrast: high) {
  .btn {
    border: 2px solid currentColor;
  }
  
  .form-input,
  .stripe-element {
    border: 3px solid var(--border-color);
  }
}

/* =================================== */
/* Reduced Motion */
/* =================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =================================== */
/* Responsive Design */
/* =================================== */

/* Large Tablets */
@media (max-width: 1024px) {
  .gift-card-wrapper {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .steps-sidebar {
    position: static;
    order: -1;
    display: flex;
    overflow-x: auto;
    padding: var(--spacing-lg);
    gap: 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  
  .step-item {
    display: inline-flex;
    margin-right: var(--spacing-lg);
    margin-bottom: 0;
    min-width: 200px;
    flex-shrink: 0;
  }
  
  .step-item:not(:last-child)::after {
    display: none;
  }
  
  .gift-preview-area {
    position: static;
    order: -1;
  }
  
  [dir="rtl"] .gift-card-wrapper {
    gap: var(--spacing-2xl);
  }
  
  [dir="rtl"] .steps-sidebar {
    padding: 25px var(--spacing-lg);
  }
  
  [dir="rtl"] .step-item {
    margin-left: 25px;
    margin-right: 0;
    min-width: 220px;
  }
}

/* Tablets */
@media (max-width: 768px) {
  .heaven-gift-card-page {
    padding: 15px;
  }
  
  .steps-sidebar {
    display: none;
  }
  
  .step-content {
    padding: 25px;
  }
  
  .step-actions {
    gap: 15px;
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
    margin: 0;
  }
  
  .phone-group {
    flex-direction: column;
  }
  
  .country-select {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
  
  .modal-content {
    padding: 30px var(--spacing-lg);
    margin: var(--spacing-lg);
  }
  
  [dir="rtl"] .heaven-gift-card-page {
    padding: var(--spacing-lg) 15px;
  }
  
  [dir="rtl"] .step-content {
    padding: var(--spacing-2xl) 25px;
  }
  
  [dir="rtl"] .step-header {
    margin-bottom: 35px;
    padding-bottom: var(--spacing-lg);
  }
  
  [dir="rtl"] .step-header h2 {
    font-size: var(--font-size-2xl);
  }
  
  [dir="rtl"] .step-actions {
    gap: var(--spacing-lg);
    flex-direction: column-reverse;
  }
  
  [dir="rtl"] .phone-group {
    flex-direction: row-reverse;
  }
  
  [dir="rtl"] .country-select {
    border-right: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 15px 15px 0;
  }
  
  [dir="rtl"] .modal-content {
    padding: 35px 25px;
    margin: var(--spacing-lg);
  }
}

/* Mobile */
@media (max-width: 480px) {
  :root {
    --spacing-lg: 15px;
    --spacing-xl: 18px;
    --spacing-2xl: 24px;
    --spacing-3xl: 30px;
    --spacing-4xl: 36px;
  }
  
  .heaven-gift-card-page {
    padding: var(--spacing-sm);
  }
  
  .step-content {
    padding: var(--spacing-lg);
  }
  
  .card-design {
    padding: var(--spacing-lg);
    min-height: 160px;
  }
  
  .card-amount {
    font-size: var(--font-size-2xl);
  }
  
  .amount-value {
    font-size: var(--font-size-3xl);
  }
  
  .preview-card,
  .price-summary {
    padding: var(--spacing-lg);
  }
  
  .form-input {
    padding: 14px var(--spacing-md);
    font-size: 15px;
  }
  
  .country-select {
    padding: 14px var(--spacing-md);
    font-size: 13px;
  }
  
  .btn {
    padding: var(--spacing-md) var(--spacing-2xl);
    font-size: 15px;
  }
  
  .step-header h2 {
    font-size: 22px;
  }
  
  [dir="rtl"] .heaven-gift-card-page {
    padding: 15px var(--spacing-sm);
  }
  
  [dir="rtl"] .step-content {
    padding: 25px var(--spacing-lg);
  }
  
  [dir="rtl"] .card-design {
    padding: 25px;
    min-height: 180px;
  }
  
  [dir="rtl"] .card-amount {
    font-size: var(--spacing-2xl);
  }
  
  [dir="rtl"] .amount-value {
    font-size: var(--font-size-5xl);
  }
  
  [dir="rtl"] .preview-card,
  [dir="rtl"] .price-summary {
    padding: 25px var(--spacing-lg);
  }
  
  [dir="rtl"] .form-input {
    padding: var(--spacing-lg) var(--spacing-lg);
    font-size: var(--font-size-md);
    height: 60px;
  }
  
  [dir="rtl"] .form-textarea {
    min-height: 100px;
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
  }
  
  [dir="rtl"] .country-select {
    padding: 0 15px;
    font-size: 15px;
    min-width: 120px;
  }
  
  [dir="rtl"] .btn {
    padding: 14px 25px;
    font-size: var(--font-size-md);
    height: 55px;
  }
  
  [dir="rtl"] .step-header h2 {
    font-size: 22px;
  }
  
  [dir="rtl"] .modal-content {
    padding: var(--spacing-2xl) var(--spacing-lg);
  }
  
  [dir="rtl"] .modal-content h3 {
    font-size: 22px;
  }
  
  [dir="rtl"] .checkmark {
    width: 60px;
    height: 60px;
    font-size: var(--font-size-2xl);
  }
}

/* =================================== */
/* Print Styles */
/* =================================== */

@media print {
  .heaven-gift-card-page {
    background: white;
  }
  
  .step-content:not(.active) {
    display: none !important;
  }
  
  .step-actions,
  .steps-sidebar {
    display: none !important;
  }
  
  .gift-card-wrapper {
    grid-template-columns: 1fr;
  }
  
  .btn {
    display: none;
  }
}

/* =================================== */
/* Dark Mode Support (Optional) */
/* =================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f8f9fa;
    --text-secondary: #e9ecef;
    --text-muted: #adb5bd;
    --bg-primary: #212529;
    --bg-secondary: #343a40;
    --bg-light: #495057;
    --border-color: #495057;
    --border-light: #6c757d;
  }
}