/**
 * WooCommerce Dark Tech Marketplace Stylesheet
 *
 * Fully custom dark UI for Cart, Checkout, Tables, Inputs, and Gateways.
 * Replaces legacy WooCommerce float styles with clean flexbox/grid primitives.
 *
 * @package CodePaks
 * @version 1.0.0
 */

/* ==========================================================================
   1. Form Inputs, Select2 & Controls (Dark Tech Overrides)
   ========================================================================== */
.woocommerce form .form-row {
  margin-bottom: 1.25rem;
  padding: 0;
}

.woocommerce form .form-row label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.375rem;
}

.woocommerce form .form-row label .required {
  color: #f43f5e;
  text-decoration: none;
}

.woocommerce-input-wrapper {
  display: block;
  width: 100%;
}

.woocommerce form input.input-text,
.woocommerce form textarea,
.woocommerce form select {
  width: 100% !important;
  background-color: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(51, 65, 85, 0.8) !important;
  border-radius: 0.75rem !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.875rem !important;
  color: #f8fafc !important;
  outline: none !important;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.woocommerce form input.input-text:focus,
.woocommerce form textarea:focus,
.woocommerce form select:focus {
  border-color: #06b6d4 !important;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2) !important;
  background-color: #0f172a !important;
}

/* Select2 Custom Dark Styling (Country Dropdown) */
.select2-container--default .select2-selection--single {
  background-color: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(51, 65, 85, 0.8) !important;
  border-radius: 0.75rem !important;
  height: 46px !important;
  padding: 0.5rem 0.75rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #f8fafc !important;
  line-height: 28px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 44px !important;
}

.select2-dropdown {
  background-color: #0f172a !important;
  border: 1px solid #334155 !important;
  border-radius: 0.75rem !important;
  color: #f8fafc !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.8) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #06b6d4 !important;
  color: #020617 !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #ffffff !important;
  border-radius: 0.5rem !important;
}

/* ==========================================================================
   2. Cart & Checkout Grid Structure
   ========================================================================== */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
  max-width: 80rem;
  margin: 0 auto;
}

/* Two-Column Checkout Layout */
@media (min-width: 1024px) {
  .woocommerce-checkout form.checkout {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 3rem;
    align-items: start;
  }
}

/* Order Review & Payment Card (Right Column) */
#order_review,
.cart-collaterals .cart_totals {
  background-color: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(30, 41, 59, 0.8) !important;
  border-radius: 1rem !important;
  padding: 1.5rem !important;
  backdrop-filter: blur(8px) !important;
}

/* Tables Styling */
.woocommerce table.shop_table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid rgba(30, 41, 59, 0.8) !important;
  border-radius: 1rem !important;
  background-color: rgba(15, 23, 42, 0.4) !important;
  overflow: hidden !important;
  margin-bottom: 2rem !important;
}

.woocommerce table.shop_table th {
  background-color: #0f172a !important;
  color: #94a3b8 !important;
  font-family: var(--font-mono) !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 1rem !important;
  border-bottom: 1px solid #1e293b !important;
}

.woocommerce table.shop_table td {
  padding: 1rem !important;
  border-top: 1px solid rgba(30, 41, 59, 0.6) !important;
  color: #cbd5e1 !important;
}

/* ==========================================================================
   3. Buttons & Conversion Calls-to-Action
   ========================================================================== */
.woocommerce #payment #place_order,
.woocommerce .cart-collaterals .checkout-button,
.woocommerce button.button.alt,
.woocommerce a.button.alt {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  background-color: #06b6d4 !important;
  color: #020617 !important;
  font-size: 0.9375rem !important;
  font-weight: 700 !important;
  padding: 0.875rem 1.5rem !important;
  border-radius: 0.75rem !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 200ms ease !important;
  box-shadow: 0 10px 20px -5px rgba(6, 182, 212, 0.3) !important;
}

.woocommerce #payment #place_order:hover,
.woocommerce .cart-collaterals .checkout-button:hover,
.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover {
  background-color: #22d3ee !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 15px 25px -5px rgba(6, 182, 212, 0.4) !important;
}

/* ==========================================================================
   4. Notices & Alert Banners
   ========================================================================== */
.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
  border-radius: 0.75rem !important;
  padding: 1rem 1.25rem !important;
  margin-bottom: 1.5rem !important;
  font-size: 0.875rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
}

.woocommerce-error {
  background-color: rgba(244, 63, 94, 0.1) !important;
  border: 1px solid rgba(244, 63, 94, 0.3) !important;
  color: #fda4af !important;
}

.woocommerce-message {
  background-color: rgba(52, 211, 153, 0.1) !important;
  border: 1px solid rgba(52, 211, 153, 0.3) !important;
  color: #6ee7b7 !important;
}

.woocommerce-info {
  background-color: rgba(6, 182, 212, 0.1) !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
  color: #67e8f9 !important;
}