/* Base Setup */
:root {
  --bg-color: #0f0f11;
  --panel-color: #1a1a1c;
  --accent-color: #d4af37; /* Gold */
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --border-radius: 12px;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1100px;
  background-color: var(--panel-color);
  border-radius: var(--border-radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  overflow: hidden;
  min-height: 600px;
}

/* Left Section: Summary */
.summary-section {
  flex: 1;
  background: linear-gradient(135deg, #1f1f22 0%, #151517 100%);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid #2a2a2d;
}

.brand h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  margin: 0;
  color: var(--accent-color);
  letter-spacing: 2px;
}

.brand p {
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 8px;
}

.order-details h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 24px;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
}

.item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.item-price {
  font-weight: 500;
}

hr {
  border: 0;
  border-top: 1px solid #333;
  margin: 20px 0;
}

.total {
  display: flex;
  justify-content: space-between;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-color);
}

.info-box {
  background: rgba(255, 255, 255, 0.03);
  padding: 15px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-left: 3px solid var(--accent-color);
}

/* Right Section: Payment */
.payment-section {
  flex: 1.2;
  padding: 60px;
  background-color: var(--panel-color);
}

.payment-container h2 {
  font-family: var(--font-serif);
  margin-top: 0;
  margin-bottom: 30px;
}

/* Toggle Group for Options */
.payment-mode-selector {
  margin-bottom: 30px;
}

.label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.toggle-group {
  display: flex;
  gap: 15px;
}

.toggle-option {
  flex: 1;
  cursor: pointer;
  position: relative;
}

.toggle-option input {
  position: absolute;
  opacity: 0;
}

.toggle-option .box {
  border: 1px solid #333;
  border-radius: 8px;
  padding: 15px;
  transition: all 0.2s;
  background: #222;
}

.toggle-option input:checked + .box {
  border-color: var(--accent-color);
  background: rgba(212, 175, 55, 0.05);
}

.toggle-option .title {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  color: #fff;
}

.toggle-option .desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Stripe Elements */
#payment-form {
  width: 100%;
}

#payment-element {
  margin-bottom: 24px;
}

/* Button */
button {
  background: var(--accent-color);
  border-radius: 6px;
  color: #000;
  border: 0;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: block;
  transition: all 0.2s ease;
  width: 100%;
  box-shadow: 0px 4px 5.5px 0px rgba(0, 0, 0, 0.07);
}

button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Spinner */
.spinner,
.spinner:before,
.spinner:after {
  border-radius: 50%;
}
.spinner {
  color: #000;
  font-size: 22px;
  text-indent: -99999px;
  margin: 0px auto;
  position: relative;
  width: 20px;
  height: 20px;
  box-shadow: inset 0 0 0 2px;
  transform: translateZ(0);
}
.spinner:before,
.spinner:after {
  position: absolute;
  content: '';
}
.spinner:before {
  width: 10.4px;
  height: 20.4px;
  background: var(--accent-color);
  border-radius: 20.4px 0 0 20.4px;
  top: -0.2px;
  left: -0.2px;
  transform-origin: 10.4px 10.2px;
  animation: loading 2s infinite ease 1.5s;
}
.spinner:after {
  width: 10.4px;
  height: 10.2px;
  background: var(--accent-color);
  border-radius: 0 10.2px 10.2px 0;
  top: -0.1px;
  left: 10.2px;
  transform-origin: 0px 10.2px;
  animation: loading 2s infinite ease;
}
@keyframes loading {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none;
}

#payment-message {
  color: #ef4444;
  font-size: 14px;
  line-height: 20px;
  padding-top: 12px;
  text-align: center;
}

.secure-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #666;
  font-size: 0.8rem;
  margin-top: 20px;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
    max-width: 500px;
    margin: 20px;
  }
  
  .summary-section {
    padding: 30px;
    border-right: none;
    border-bottom: 1px solid #2a2a2d;
  }
  
  .payment-section {
    padding: 30px;
  }
}
