/*
 * DataWizard — WooCommerce Dark Theme Styles
 * Covers: single product, cart, checkout, notices, my-account
 */

/* ============================================
   WooCommerce Notices / Messages
   ============================================ */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
.wc-block-components-notice-banner {
  background: rgba(10, 15, 30, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(46, 58, 86, 0.5);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  color: #c5cee0;
  font-size: 0.875rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.woocommerce-message {
  border-left: 3px solid #10b981;
}
.woocommerce-info {
  border-left: 3px solid #8b5cf6;
}
.woocommerce-error,
.woocommerce-error li {
  border-left: 3px solid #ef4444;
  color: #fca5a5;
}
.woocommerce-message a,
.woocommerce-info a {
  color: #34d399;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.woocommerce-message a:hover,
.woocommerce-info a:hover {
  color: #6ee7b7;
}
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
  display: none;
}

/* ============================================
   Single Product — Add to Cart Form
   ============================================ */
.woocommerce form.cart {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0;
}
/* Hide quantity for courses (always qty=1) */
.woocommerce form.cart .quantity {
  display: none;
}

/* Primary Add to Cart / Enroll Button */
.woocommerce .single_add_to_cart_button,
.woocommerce .single_add_to_cart_button.button.alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem 2rem;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  border-radius: 0.75rem;
  transition: all 0.3s;
  color: #fff;
  background: linear-gradient(135deg, #10b981 0%, #8b5cf6 50%, #ec4899 100%);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
  border: none;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.5;
}
.woocommerce .single_add_to_cart_button:hover {
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.5), 0 0 60px rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}
.woocommerce .single_add_to_cart_button:disabled,
.woocommerce .single_add_to_cart_button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Loading state */
.woocommerce .single_add_to_cart_button.loading::after {
  content: '';
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-left: 0.5rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: dw-spin 0.6s linear infinite;
}
@keyframes dw-spin {
  to { transform: rotate(360deg); }
}

/* "View Cart" link after add */
.woocommerce .added_to_cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1.5rem;
  margin-top: 0.5rem;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  color: #c5cee0;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  text-decoration: none;
  transition: all 0.3s;
}
.woocommerce .added_to_cart:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #fff;
}

/* ============================================
   Generic Buttons
   ============================================ */
.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button,
.wc-backward {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  transition: all 0.3s;
  color: #e8ecf6;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.5;
}
.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button:hover,
.wc-backward:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
  color: #fff;
}

/* Alt / Primary button */
.woocommerce .button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce a.button.alt,
.woocommerce .checkout-button,
.woocommerce #place_order {
  color: #fff;
  background: linear-gradient(135deg, #10b981 0%, #8b5cf6 50%, #ec4899 100%);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
  border: none;
  font-size: 1rem;
  padding: 1rem 2rem;
  font-weight: 700;
}
.woocommerce .button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce .checkout-button:hover,
.woocommerce #place_order:hover {
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.5), 0 0 60px rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}

/* ============================================
   Cart Page
   ============================================ */
.woocommerce-cart .woocommerce {
  max-width: 72rem;
  margin: 0 auto;
}

.woocommerce-cart-form,
.woocommerce table.shop_table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(10, 15, 30, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(46, 58, 86, 0.5);
  border-radius: 1rem;
  overflow: hidden;
}

.woocommerce table.shop_table th {
  background: rgba(30, 39, 64, 0.5);
  color: #e8ecf6;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid rgba(46, 58, 86, 0.5);
}

.woocommerce table.shop_table td {
  padding: 1.25rem;
  color: #c5cee0;
  border-bottom: 1px solid rgba(46, 58, 86, 0.3);
  vertical-align: middle;
}

.woocommerce table.shop_table .product-name a {
  color: #e8ecf6;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.woocommerce table.shop_table .product-name a:hover {
  color: #34d399;
}

.woocommerce table.shop_table .product-price .amount,
.woocommerce table.shop_table .product-subtotal .amount {
  color: #e8ecf6;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
}

/* Cart Quantity Input */
.woocommerce table.shop_table .quantity .qty {
  width: 4rem;
  padding: 0.5rem;
  background: rgba(30, 39, 64, 0.5);
  border: 1px solid rgba(46, 58, 86, 0.5);
  border-radius: 0.5rem;
  color: #e8ecf6;
  text-align: center;
  font-size: 0.875rem;
  -moz-appearance: textfield;
}
.woocommerce table.shop_table .quantity .qty::-webkit-inner-spin-button,
.woocommerce table.shop_table .quantity .qty::-webkit-outer-spin-button {
  opacity: 1;
}
.woocommerce table.shop_table .quantity .qty:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

/* Remove Item (X) */
.woocommerce a.remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444 !important;
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
  transition: all 0.2s;
}
.woocommerce a.remove:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

/* Cart product thumbnail */
.woocommerce table.shop_table .product-thumbnail img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid rgba(46, 58, 86, 0.5);
}

/* Cart Actions Row (coupon + update) */
.woocommerce table.shop_table td.actions {
  padding: 1.25rem;
}
.woocommerce table.shop_table td.actions .coupon {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}
.woocommerce table.shop_table td.actions .coupon #coupon_code {
  padding: 0.625rem 1rem;
  background: rgba(30, 39, 64, 0.5);
  border: 1px solid rgba(46, 58, 86, 0.5);
  border-radius: 0.5rem;
  color: #e8ecf6;
  font-size: 0.875rem;
  min-width: 10rem;
}
.woocommerce table.shop_table td.actions .coupon #coupon_code:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
}
.woocommerce table.shop_table td.actions .coupon .button {
  padding: 0.625rem 1rem;
}
.woocommerce table.shop_table td.actions > .button {
  float: right;
}

/* Cart Totals */
.woocommerce .cart-collaterals {
  margin-top: 2rem;
}
.woocommerce .cart_totals {
  float: right;
  width: 100%;
  max-width: 28rem;
}
.woocommerce .cart_totals h2 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #e8ecf6;
  margin-bottom: 1rem;
}
.woocommerce .cart_totals table.shop_table {
  border-radius: 0.75rem;
}
.woocommerce .cart_totals .order-total .amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: #34d399;
}
.woocommerce .cart_totals .wc-proceed-to-checkout {
  margin-top: 1.25rem;
}
.woocommerce .cart_totals .wc-proceed-to-checkout .checkout-button {
  width: 100%;
}

/* Empty Cart */
.cart-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #6b7a9e;
  font-size: 1.125rem;
}
.return-to-shop {
  text-align: center;
  margin-top: 1.5rem;
}

/* ============================================
   Checkout Page
   ============================================ */
.woocommerce-checkout .woocommerce {
  max-width: 72rem;
  margin: 0 auto;
}

/* Checkout columns */
.woocommerce .col2-set {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 768px) {
  .woocommerce .col2-set {
    grid-template-columns: 1fr;
  }
}
.woocommerce .col2-set .col-1,
.woocommerce .col2-set .col-2 {
  width: 100%;
}

/* Section headings */
.woocommerce h3,
.woocommerce-checkout h3 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #e8ecf6;
  margin-bottom: 1.25rem;
}

/* Form Rows */
.woocommerce form .form-row {
  margin-bottom: 1rem;
}
.woocommerce form .form-row label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #8a99b8;
  margin-bottom: 0.375rem;
}
.woocommerce form .form-row label .required {
  color: #ef4444;
}
.woocommerce form .form-row .optional {
  color: #4a5672;
  font-size: 0.75rem;
}

/* Form Inputs */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="tel"],
.woocommerce input[type="password"],
.woocommerce input[type="number"],
.woocommerce select,
.woocommerce textarea,
#billing_country,
#shipping_country,
#billing_state,
#shipping_state,
.select2-container--default .select2-selection--single {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(30, 39, 64, 0.5);
  border: 1px solid rgba(46, 58, 86, 0.5);
  border-radius: 0.75rem;
  color: #e8ecf6;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.woocommerce input:focus,
.woocommerce select:focus,
.woocommerce textarea:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
.woocommerce form .form-row textarea {
  min-height: 6rem;
  resize: vertical;
}

/* Select2 overrides */
.select2-container--default .select2-selection--single {
  height: auto;
  background: rgba(30, 39, 64, 0.5);
  border: 1px solid rgba(46, 58, 86, 0.5);
  border-radius: 0.75rem;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #e8ecf6;
  padding: 0.75rem 1rem;
  line-height: 1.5;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  right: 0.75rem;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: #6b7a9e transparent transparent transparent;
}
.select2-dropdown {
  background: #0a0f1e;
  border: 1px solid rgba(46, 58, 86, 0.5);
  border-radius: 0.75rem;
  overflow: hidden;
}
.select2-container--default .select2-results__option {
  padding: 0.625rem 1rem;
  color: #c5cee0;
  font-size: 0.875rem;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
.select2-container--default .select2-results__option[aria-selected=true] {
  background: rgba(16, 185, 129, 0.1);
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  background: rgba(30, 39, 64, 0.5);
  border: 1px solid rgba(46, 58, 86, 0.5);
  border-radius: 0.5rem;
  color: #e8ecf6;
  padding: 0.5rem 0.75rem;
}

/* Order Review Table */
.woocommerce-checkout #order_review,
.woocommerce-checkout #order_review_heading {
  margin-top: 2rem;
}
.woocommerce-checkout .shop_table {
  width: 100%;
}

/* Payment Methods */
.woocommerce-checkout #payment {
  background: rgba(10, 15, 30, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(46, 58, 86, 0.5);
  border-radius: 1rem;
  overflow: hidden;
  margin-top: 1.5rem;
}
.woocommerce-checkout #payment .payment_methods {
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 1px solid rgba(46, 58, 86, 0.3);
}
.woocommerce-checkout #payment .payment_methods li {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(46, 58, 86, 0.3);
}
.woocommerce-checkout #payment .payment_methods li:last-child {
  border-bottom: none;
}
.woocommerce-checkout #payment .payment_methods li label {
  color: #e8ecf6;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.woocommerce-checkout #payment .payment_methods li .payment_box {
  color: #8a99b8;
  font-size: 0.875rem;
  padding: 0.75rem 0 0;
  line-height: 1.6;
}
.woocommerce-checkout #payment .payment_methods li .payment_box p {
  margin: 0;
}
.woocommerce-checkout #payment .place-order {
  padding: 1.25rem;
}
.woocommerce-checkout #payment .place-order .woocommerce-terms-and-conditions-wrapper {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #6b7a9e;
}
.woocommerce-checkout #payment .place-order .woocommerce-terms-and-conditions-wrapper a {
  color: #34d399;
}
.woocommerce-checkout #payment #place_order {
  width: 100%;
}

/* Checkout Login / Coupon toggles */
.woocommerce .woocommerce-form-login-toggle,
.woocommerce .woocommerce-form-coupon-toggle {
  margin-bottom: 1rem;
}

/* Checkout login/coupon form */
.woocommerce form.login,
.woocommerce form.checkout_coupon {
  background: rgba(10, 15, 30, 0.6);
  border: 1px solid rgba(46, 58, 86, 0.5);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Checkbox / Radio */
.woocommerce input[type="checkbox"],
.woocommerce input[type="radio"] {
  width: 1rem;
  height: 1rem;
  accent-color: #10b981;
  cursor: pointer;
}

/* Form validation errors */
.woocommerce form .form-row.woocommerce-invalid input.input-text {
  border-color: rgba(239, 68, 68, 0.5);
}
.woocommerce form .form-row.woocommerce-validated input.input-text {
  border-color: rgba(16, 185, 129, 0.5);
}

/* ============================================
   My Account Page
   ============================================ */
.woocommerce-account .woocommerce-MyAccount-navigation {
  float: left;
  width: 25%;
  padding-right: 2rem;
}
@media (max-width: 768px) {
  .woocommerce-account .woocommerce-MyAccount-navigation {
    float: none;
    width: 100%;
    padding-right: 0;
    margin-bottom: 2rem;
  }
}
.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  background: rgba(10, 15, 30, 0.8);
  border: 1px solid rgba(46, 58, 86, 0.5);
  border-radius: 0.75rem;
  overflow: hidden;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li {
  border-bottom: 1px solid rgba(46, 58, 86, 0.3);
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child {
  border-bottom: none;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: #8a99b8;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
  color: #e8ecf6;
  background: rgba(30, 39, 64, 0.5);
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid #10b981;
}
.woocommerce-account .woocommerce-MyAccount-content {
  float: left;
  width: 75%;
}
@media (max-width: 768px) {
  .woocommerce-account .woocommerce-MyAccount-content {
    float: none;
    width: 100%;
  }
}
.woocommerce-account .woocommerce-MyAccount-content p {
  color: #8a99b8;
  line-height: 1.6;
}

/* Login / Register forms */
.woocommerce form.woocommerce-form-login,
.woocommerce form.woocommerce-form-register {
  background: rgba(10, 15, 30, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(46, 58, 86, 0.5);
  border-radius: 1rem;
  padding: 2rem;
}

/* ============================================
   Product Gallery (hide for courses)
   ============================================ */
.woocommerce-product-gallery {
  display: none;
}

/* ============================================
   Star Ratings
   ============================================ */
.woocommerce .star-rating {
  color: #f59e0b;
}

/* ============================================
   Responsive Cart Table
   ============================================ */
@media (max-width: 768px) {
  .woocommerce table.shop_table,
  .woocommerce table.shop_table thead,
  .woocommerce table.shop_table tbody,
  .woocommerce table.shop_table th,
  .woocommerce table.shop_table td,
  .woocommerce table.shop_table tr {
    display: block;
  }
  .woocommerce table.shop_table thead {
    display: none;
  }
  .woocommerce table.shop_table tr {
    padding: 1rem;
    border-bottom: 1px solid rgba(46, 58, 86, 0.3);
  }
  .woocommerce table.shop_table td {
    padding: 0.25rem 0;
    border: none;
    text-align: right;
  }
  .woocommerce table.shop_table td::before {
    content: attr(data-title);
    float: left;
    font-weight: 600;
    color: #6b7a9e;
    text-transform: uppercase;
    font-size: 0.75rem;
  }
  .woocommerce table.shop_table td.actions {
    text-align: center;
  }
  .woocommerce .cart_totals {
    max-width: 100%;
  }
}

/* ============================================
   "Added to cart" success overlay
   ============================================ */
.woocommerce .wc-forward::after {
  content: ' →';
}

/* ============================================
   Prices
   ============================================ */
.woocommerce .amount {
  color: #e8ecf6;
}
.woocommerce del .amount {
  color: #6b7a9e;
}
.woocommerce ins {
  text-decoration: none;
}
.woocommerce ins .amount {
  color: #e8ecf6;
}

/* ============================================
   Order Received / Thank You
   ============================================ */
.woocommerce-order-received .woocommerce-order {
  background: rgba(10, 15, 30, 0.8);
  border: 1px solid rgba(46, 58, 86, 0.5);
  border-radius: 1rem;
  padding: 2rem;
}
.woocommerce-order-received .woocommerce-thankyou-order-received {
  color: #34d399;
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   Clearfix
   ============================================ */
.woocommerce::after,
.woocommerce .col2-set::after,
.woocommerce-account::after {
  content: '';
  display: table;
  clear: both;
}
