/* 
 * Checkout Page Specific Styles
 * Luxury Modern Midnight Refactor (ninjacomps-style)
 */

#checkout-container {
  background: var(--dark-bg);
}

#checkout-container h2,
#checkout-container h3,
#checkout-container h4 {
  font-family: var(--font-heading);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-color);
}

/* Form Modernization */
#checkout-container .form-label {
  font-family: var(--font-body);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

#checkout-container .form-control,
#checkout-container .form-select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  transition: var(--transition-premium);
}

#checkout-container .form-control:focus,
#checkout-container .form-select:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--brand-primary);
  box-shadow: 0 0 15px rgba(var(--brand-primary-rgb), 0.2);
  color: var(--text-color);
}

/* Guest Cart Preview Styles */
.guest-cart-preview-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.guest-cart-title {
  color: var(--text-color);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem !important;
}

.guest-cart-title i {
  color: var(--brand-primary);
}

.guest-cart-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.guest-cart-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.guest-cart-item-image {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.guest-cart-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.guest-cart-item-details {
  flex: 1;
  min-width: 0;
}

.guest-cart-item-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-color);
  margin-bottom: 0.25rem;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.guest-cart-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.guest-cart-item-quantity {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.guest-cart-item-amount {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--brand-primary);
}

.guest-cart-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  padding: 1rem 0;
}

.guest-auth-step {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

@media (max-width: 991px) {
  .guest-auth-step {
    padding-top: 100px;
  }
}

.btn-arcade-toggle {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border-glass) !important;
  border-left: none !important;
  color: var(--brand-primary) !important;
  padding: 0 0.75rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: var(--transition-premium) !important;
  border-radius: 0 8px 8px 0 !important;
  width: 45px !important;
}

.btn-arcade-toggle:hover {
  background: rgba(var(--brand-primary-rgb), 0.1) !important;
  color: var(--text-color) !important;
}

.password-group .form-control {
  border-radius: 8px 0 0 8px !important;
}

.compact-cart-preview .guest-cart-preview-card {
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem;
}

.compact-cart-preview .guest-cart-item-image {
  width: 45px;
  height: 45px;
}

.compact-cart-preview .guest-cart-item-title {
  font-size: 0.85rem;
}

.compact-cart-preview .guest-cart-item-amount {
  font-size: 0.85rem;
}

.compact-form .form-label {
  margin-bottom: 0.25rem !important;
}

.compact-form .form-control-sm {
  border-radius: 8px;
}

.guest-auth-step h2 {
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}

@media (min-width: 992px) {
  .compact-cart-preview {
    position: sticky;
    top: 20px;
  }
}

.social-login .divider-text-compact {
  background: var(--glass-bg);
  padding: 0 10px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
  z-index: 1;
}

.guest-auth-step .nav-tabs .nav-link {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .guest-auth-step .glass-card {
    padding: 1.25rem !important;
    margin: 0 0.5rem;
  }
  .guest-auth-step .fa-2x {
    font-size: 2rem !important;
  }
  .guest-auth-step h2 {
    font-size: 1.25rem !important;
    margin-bottom: 0.5rem !important;
  }
  .guest-auth-step .text-muted.small {
    font-size: 0.9rem !important;
  }
  .guest-cart-preview-card {
    padding: 0.75rem;
  }
  .guest-cart-title {
    font-size: 0.9rem;
    margin-bottom: 0.75rem !important;
  }
  .guest-cart-item {
    gap: 0.5rem;
    padding: 0.5rem 0;
  }
  .guest-cart-item-image {
    width: 50px;
    height: 50px;
  }
  .guest-cart-item-title {
    font-size: 0.85rem;
    line-height: 1.2;
  }
  .guest-cart-item-quantity {
    font-size: 0.75rem;
  }
  .guest-cart-item-amount {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .guest-auth-step .col-md-10,
  .guest-auth-step .col-lg-8 {
    padding: 0 0.5rem;
  }
  .guest-auth-step .glass-card {
    padding: 1rem !important;
    margin: 0 0.5rem;
  }
  .guest-auth-step .fa-2x {
    font-size: 1.75rem !important;
  }
  .guest-auth-step h2 {
    font-size: 1.25rem !important;
  }
  .guest-auth-step .text-muted.small {
    font-size: 0.85rem !important;
  }
}

@media (max-width: 480px) {
  .guest-auth-step .glass-card {
    padding: 0.75rem !important;
    margin: 0 0.25rem;
  }
  .guest-auth-step .text-center.mb-3 {
    margin-bottom: 1.5rem !important;
  }
  .guest-cart-preview-card {
    padding: 0.5rem;
  }
  .guest-cart-title {
    font-size: 0.8rem;
    margin-bottom: 0.5rem !important;
  }
  .guest-cart-item {
    gap: 0.4rem;
    padding: 0.4rem 0;
  }
  .guest-cart-item-image {
    width: 45px;
    height: 45px;
  }
  .guest-cart-item-title {
    font-size: 0.8rem;
  }
  .guest-cart-item-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .guest-cart-item-quantity,
  .guest-cart-item-amount {
    font-size: 0.75rem;
  }
  .guest-auth-step .nav-tabs .nav-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }
  .guest-auth-step .form-control {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
  .guest-auth-step .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
}

/* Glass Card */
#checkout-container .glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-premium);
}

/* Modern Payment Method Cards */
.payment-method-card {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.8), rgba(20, 20, 20, 0.9));
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.payment-method-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.payment-method-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(var(--brand-primary-rgb), 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(var(--brand-primary-rgb), 0.1);
}

.payment-method-card:hover::before {
  opacity: 1;
}

.payment-method-card.selected {
  border-color: var(--brand-primary);
  background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.1), rgba(30, 30, 30, 0.9));
  box-shadow: 0 12px 40px rgba(var(--brand-primary-rgb), 0.3), 0 0 40px rgba(var(--brand-primary-rgb), 0.2);
}

.payment-method-card.selected::before {
  opacity: 1;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), #ff6b35);
}

.payment-method-card.disabled-payment-method {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(50%);
}

.payment-method-card.disabled-payment-method:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.payment-method-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.payment-method-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.2), rgba(var(--brand-secondary-rgb), 0.2));
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.payment-method-card.selected .payment-method-icon {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  box-shadow: 0 0 20px rgba(var(--brand-primary-rgb), 0.4);
  transform: scale(1.1);
}

.payment-method-details {
  flex: 1;
  min-width: 0;
}

.payment-method-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.payment-method-description {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
  margin: 0;
}

.payment-method-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.payment-method-balance,
.payment-method-cashback {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.payment-method-balance {
  background: #ff6b35;
  color: #ffffff;
  border: 1px solid #ff6b35;
}

.payment-method-balance.balance-low {
  background: #ff6b35;
  color: #ffffff;
  border: 1px solid #ff6b35;
}

.payment-method-cashback {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.payment-method-radio {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 20px;
  height: 20px;
  margin: 0;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.payment-method-card:hover .payment-method-radio,
.payment-method-card.selected .payment-method-radio {
  opacity: 1;
  transform: scale(1.1);
}

.form-check-input[type="radio"] {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  transition: all 0.3s ease;
}

.form-check-input[type="radio"]:checked {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(var(--brand-primary-rgb), 0.2);
}

.form-check-input[type="radio"]:focus {
  box-shadow: 0 0 0 4px rgba(var(--brand-primary-rgb), 0.3);
}

.disabled-label {
  opacity: 0.5;
  cursor: not-allowed;
}

.disabled-payment-method .payment-method-name,
.disabled-payment-method .payment-method-description {
  opacity: 0.5;
}

#place-order-btn {
  border-radius: 100px;
  padding: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--brand-primary);
  border: none;
  color: #000;
  box-shadow: 0 10px 30px rgba(var(--brand-primary-rgb), 0.3);
  transition: var(--transition-premium);
}

#place-order-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(var(--brand-primary-rgb), 0.4);
  filter: brightness(1.1);
}

#place-order-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #444;
  color: #888;
}

#order-summary-container {
  color: var(--text-color);
}

.order-summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

#coupon-code {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

#apply-coupon-btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

@media (max-width: 768px) {
  #checkout-container .glass-card {
    padding: 1.25rem !important;
  }
}

/* Secure Checkout Card */
.secure-checkout-card {
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.checkout-header {
  background: linear-gradient(90deg, rgba(var(--brand-primary-rgb), 0.1), rgba(var(--brand-primary-rgb), 0.05));
}

.icon-circle {
  box-shadow: 0 0 15px rgba(var(--brand-primary-rgb), 0.4);
}

.secure-checkout-card .form-control,
.secure-checkout-card .form-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.secure-checkout-card .form-control:focus,
.secure-checkout-card .form-select:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.2);
}

.secure-checkout-card .form-label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.col-lg-4 .glass-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.col-lg-4 .glass-card h3 {
  font-size: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem !important;
}

.form-check-input {
  width: 1.2em;
  height: 1.2em;
  margin-top: 0.1em;
}

.form-check-label {
  font-size: 0.9rem;
  line-height: 1.5;
  padding-left: 0.5rem;
}

/* Light Theme - checkout container, form labels, inputs, order summary, guest step */
:root.light-theme #checkout-container,
.light-theme #checkout-container {
  background: #f8f9fa;
}

:root.light-theme #checkout-container h2,
:root.light-theme #checkout-container h3,
:root.light-theme #checkout-container h4,
.light-theme #checkout-container h2,
.light-theme #checkout-container h3,
.light-theme #checkout-container h4 {
  color: #1a1a1b !important;
}

:root.light-theme #checkout-container .form-label,
.light-theme #checkout-container .form-label {
  color: #374151 !important;
}

:root.light-theme #checkout-container .form-control,
:root.light-theme #checkout-container .form-select,
.light-theme #checkout-container .form-control,
.light-theme #checkout-container .form-select {
  background: #fff !important;
  border-color: #d1d5db !important;
  color: #1a1a1b !important;
}

:root.light-theme #checkout-container .form-control:focus,
:root.light-theme #checkout-container .form-select:focus,
.light-theme #checkout-container .form-control:focus,
.light-theme #checkout-container .form-select:focus {
  background: #fff !important;
  border-color: var(--brand-primary) !important;
  color: #1a1a1b !important;
}

/* Guest auth step - light theme */
:root.light-theme .guest-auth-step .glass-card,
.light-theme .guest-auth-step .glass-card {
  background: #fff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

:root.light-theme .guest-auth-step .form-label,
:root.light-theme .guest-auth-step .compact-form .form-label,
.light-theme .guest-auth-step .form-label,
.light-theme .guest-auth-step .compact-form .form-label {
  color: #374151 !important;
}

:root.light-theme .guest-auth-step .form-control,
.light-theme .guest-auth-step .form-control {
  background: #fff !important;
  border-color: #d1d5db !important;
  color: #1a1a1b !important;
}

:root.light-theme .guest-auth-step h2,
.light-theme .guest-auth-step h2 {
  color: #1a1a1b !important;
}

:root.light-theme .guest-auth-step .text-muted,
.light-theme .guest-auth-step .text-muted {
  color: #6b7280 !important;
}

:root.light-theme .guest-auth-step .guest-cart-title,
.light-theme .guest-auth-step .guest-cart-title {
  color: #1a1a1b !important;
}

:root.light-theme .guest-auth-step .guest-cart-item-title,
.light-theme .guest-auth-step .guest-cart-item-title {
  color: #1a1a1b !important;
}

:root.light-theme .guest-auth-step .guest-cart-item-quantity,
.light-theme .guest-auth-step .guest-cart-item-quantity {
  color: #6b7280 !important;
}

:root.light-theme .guest-auth-step .guest-cart-item-amount,
.light-theme .guest-auth-step .guest-cart-item-amount {
  color: var(--brand-primary) !important;
}

:root.light-theme .guest-auth-step .guest-cart-empty,
.light-theme .guest-auth-step .guest-cart-empty {
  color: #6b7280 !important;
}

:root.light-theme .guest-auth-step .guest-cart-preview-card,
.light-theme .guest-auth-step .guest-cart-preview-card {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

:root.light-theme .guest-auth-step .nav-tabs .nav-link,
.light-theme .guest-auth-step .nav-tabs .nav-link {
  color: #6b7280 !important;
}

:root.light-theme .guest-auth-step .nav-tabs .nav-link.active,
.light-theme .guest-auth-step .nav-tabs .nav-link.active {
  color: var(--brand-primary) !important;
  background: transparent !important;
}

:root.light-theme .guest-auth-step .btn-link.text-muted,
.light-theme .guest-auth-step .btn-link.text-muted {
  color: #6b7280 !important;
}

:root.light-theme .guest-auth-step .btn-link.text-muted:hover,
.light-theme .guest-auth-step .btn-link.text-muted:hover {
  color: #374151 !important;
}

/* Order summary - ticket count and line text (light theme) */
:root.light-theme #order-summary-container .small,
:root.light-theme #order-summary-container .text-muted,
.light-theme #order-summary-container .small,
.light-theme #order-summary-container .text-muted {
  color: #6b7280 !important;
}

:root.light-theme #order-summary-container,
.light-theme #order-summary-container {
  color: #1a1a1b;
}

:root.light-theme .secure-checkout-card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

:root.light-theme .checkout-header {
  background: #f8f9fa;
  border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

:root.light-theme .checkout-header h2 {
  color: #333 !important;
}

:root.light-theme .checkout-header .text-muted {
  color: #666 !important;
}

:root.light-theme .secure-checkout-card .form-label {
  color: #555;
  font-weight: 700;
}

:root.light-theme .secure-checkout-card .form-control {
  background: #fff;
  border-color: #ddd;
  color: #333;
}

:root.light-theme .secure-checkout-card .form-control:focus {
  background: #fff;
  border-color: var(--brand-primary);
}

:root.light-theme #checkout-container .form-check-label,
.light-theme #checkout-container .form-check-label {
  color: #374151 !important;
}

:root.light-theme .col-lg-4 .glass-card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

:root.light-theme .col-lg-4 .glass-card h3 {
  color: #333;
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

:root.light-theme .payment-method-card {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

:root.light-theme .payment-method-card:hover {
  border-color: rgba(var(--brand-primary-rgb), 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 0 30px rgba(var(--brand-primary-rgb), 0.1);
}

:root.light-theme .payment-method-card.selected {
  border-color: var(--brand-primary);
  background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.05), #ffffff);
  box-shadow: 0 12px 40px rgba(var(--brand-primary-rgb), 0.2), 0 0 40px rgba(var(--brand-primary-rgb), 0.15);
}

:root.light-theme .payment-method-name {
  color: #333;
}

:root.light-theme .payment-method-description {
  color: #666;
}

:root.light-theme .payment-method-icon {
  background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.1), rgba(var(--brand-secondary-rgb), 0.1));
  border-color: rgba(0, 0, 0, 0.1);
}

:root.light-theme .payment-method-card.selected .payment-method-icon {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  box-shadow: 0 0 20px rgba(var(--brand-primary-rgb), 0.3);
}

:root.light-theme .disabled-payment-method {
  opacity: 0.6;
  filter: grayscale(30%);
}

:root.light-theme .btn-arcade-toggle {
  background: rgba(0, 0, 0, 0.05) !important;
  color: var(--brand-primary) !important;
}

:root.light-theme .social-login .divider-text-compact {
  background: #fff;
  color: rgba(0, 0, 0, 0.4);
}

/* Flex grid for cart items on checkout (if used) */
.flex-md-grid {
  display: grid !important;
  grid-template-columns: 6fr 3fr 2fr 1fr;
  gap: 1rem;
}

@media (max-width: 767.98px) {
  .flex-md-grid {
    display: flex !important;
    flex-wrap: wrap;
  }
}
