/* ============================================
   Cloud89 Dark Overrides — Loads LAST
   Overrides Storefront + WooCommerce defaults
   ============================================ */

/* --- Global background --- */
body,
html,
#page,
#content,
.site-content,
.content-area,
#primary,
#main,
main,
article,
.hentry,
.type-page,
.woocommerce,
.woocommerce-page,
.woocommerce-page #content,
.col-full,
.woocommerce .col2-set,
.woocommerce .col2-set .col-1,
.woocommerce .col2-set .col-2,
.woocommerce-checkout .col2-set,
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2,
.woocommerce-checkout-review-order,
#order_review,
.entry-content {
    background: #07080f !important;
    background-color: #07080f !important;
    color: #eef0ff !important;
}

/* --- All form inputs --- */
input[type=text],
input[type=email],
input[type=tel],
input[type=password],
input[type=number],
input[type=url],
input[type=search],
input[type=date],
input.input-text,
textarea,
select,
.input-text,
#billing_email,
#billing_first_name,
#billing_last_name,
#billing_company,
#billing_country,
#billing_address_1,
#billing_address_2,
#billing_city,
#billing_state,
#billing_postcode,
#billing_phone,
#order_comments,
#coupon_code,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-checkout input.input-text,
.woocommerce-checkout textarea,
.woocommerce-checkout select,
p.form-row input,
p.form-row textarea,
p.form-row select {
    background: #111224 !important;
    background-color: #111224 !important;
    color: #eef0ff !important;
    border: 1px solid rgba(89, 94, 224, 0.2) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.95rem !important;
    -webkit-appearance: none !important;
    outline: none !important;
}

input:focus,
textarea:focus,
select:focus,
.input-text:focus {
    border-color: #595ee0 !important;
    box-shadow: 0 0 0 3px rgba(89, 94, 224, 0.15) !important;
    background: #111224 !important;
    outline: none !important;
}

/* Validation error state */
.woocommerce form .form-row.woocommerce-invalid .input-text,
.woocommerce form .form-row.woocommerce-invalid input,
.woocommerce form .form-row.woocommerce-invalid select {
    background: #111224 !important;
    border-color: #dc3545 !important;
}

::placeholder {
    color: #6b6d85 !important;
}

/* Labels */
label,
.woocommerce form .form-row label,
.woocommerce-checkout label {
    color: #9a9cb8 !important;
    font-family: 'Inter', sans-serif !important;
}

/* --- Select2 dropdowns --- */
.select2-container--default .select2-selection--single,
.select2-container .select2-selection--single,
.select2-selection,
.select2-selection--single {
    background: #111224 !important;
    background-color: #111224 !important;
    border: 1px solid rgba(89, 94, 224, 0.2) !important;
    border-radius: 8px !important;
    height: 48px !important;
    color: #eef0ff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-selection__rendered {
    color: #eef0ff !important;
    line-height: 48px !important;
    padding-left: 16px !important;
    font-family: 'Inter', sans-serif !important;
}

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

.select2-dropdown,
.select2-container--open .select2-dropdown {
    background: #111224 !important;
    background-color: #111224 !important;
    border: 1px solid rgba(89, 94, 224, 0.2) !important;
}

.select2-search--dropdown .select2-search__field {
    background: #0d0e18 !important;
    color: #eef0ff !important;
    border: 1px solid rgba(89, 94, 224, 0.2) !important;
    border-radius: 6px !important;
}

.select2-results__option,
.select2-container--default .select2-results__option {
    color: #eef0ff !important;
    background: #111224 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted,
.select2-results__option:hover {
    background: #595ee0 !important;
    color: #fff !important;
}

/* --- Tables (order review, cart) --- */
table.shop_table,
.woocommerce table.shop_table,
.woocommerce-checkout-review-order-table,
.woocommerce-cart table.cart,
#order_review table,
table.woocommerce-checkout-review-order-table {
    background: #111224 !important;
    background-color: #111224 !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    border-collapse: separate !important;
}

table.shop_table th,
table.shop_table td,
table.shop_table tfoot th,
table.shop_table tfoot td,
.woocommerce table.shop_table th,
.woocommerce table.shop_table td,
.woocommerce table.shop_table tfoot th,
.woocommerce table.shop_table tfoot td,
.woocommerce-cart table.cart th,
.woocommerce-cart table.cart td {
    background: transparent !important;
    background-color: transparent !important;
    color: #eef0ff !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-bottom: none !important;
}

table.shop_table th,
.woocommerce table.shop_table th {
    color: #9a9cb8 !important;
    font-weight: 600 !important;
}

/* Cart product name */
.woocommerce-cart table.cart td a,
table.shop_table td a {
    color: #eef0ff !important;
}

/* --- Payment section --- */
#payment,
.woocommerce-checkout #payment,
.woocommerce-checkout-payment {
    background: #111224 !important;
    background-color: #111224 !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    color: #eef0ff !important;
}

#payment ul.payment_methods,
.woocommerce-checkout #payment ul.payment_methods {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

#payment ul.payment_methods li,
#payment ul.payment_methods li label {
    background: transparent !important;
    color: #eef0ff !important;
}

#payment div.payment_box,
.woocommerce-checkout #payment div.payment_box {
    background: rgba(89, 94, 224, 0.06) !important;
    color: #9a9cb8 !important;
}

#payment div.payment_box::before {
    display: none !important;
}

/* Place order button + wrapper */
#payment .place-order,
.woocommerce-checkout #payment .place-order,
.place-order {
    background: #111224 !important;
    background-color: #111224 !important;
    padding: 20px !important;
}

#place_order,
.woocommerce #place_order,
.woocommerce-checkout #place_order,
button#place_order,
#payment #place_order {
    background: linear-gradient(135deg, #595ee0 0%, #7b7ff0 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 28px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    padding: 16px 32px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    width: 100% !important;
    cursor: pointer !important;
}

#place_order:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(89, 94, 224, 0.35) !important;
}

/* --- Cart totals --- */
.cart-collaterals,
.cart_totals,
.cart-collaterals .cart_totals,
.cart-collaterals .cart_totals table {
    background: #111224 !important;
    background-color: #111224 !important;
    color: #eef0ff !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
}

.cart_totals h2 {
    color: #eef0ff !important;
}

.cart_totals th,
.cart_totals td {
    background: transparent !important;
    color: #eef0ff !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

/* Checkout button in cart */
.wc-proceed-to-checkout a.checkout-button,
a.checkout-button {
    background: linear-gradient(135deg, #595ee0 0%, #7b7ff0 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 28px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    padding: 16px 32px !important;
}

/* Cart quantity */
.woocommerce .quantity .qty,
table.cart .quantity input {
    background: #111224 !important;
    color: #eef0ff !important;
    border: 1px solid rgba(89, 94, 224, 0.2) !important;
    border-radius: 8px !important;
    width: 60px !important;
    text-align: center !important;
}

/* Update cart & coupon buttons */
button[name=update_cart],
.coupon .button {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #eef0ff !important;
    border: 1px solid rgba(89, 94, 224, 0.15) !important;
    border-radius: 8px !important;
}

button[name=update_cart]:hover,
.coupon .button:hover {
    background: rgba(89, 94, 224, 0.1) !important;
    border-color: #595ee0 !important;
}

/* Remove link */
a.remove {
    color: #dc3545 !important;
}

/* --- Notices --- */
.woocommerce-info,
.woocommerce-message {
    background: rgba(89, 94, 224, 0.08) !important;
    border-top-color: #595ee0 !important;
    color: #eef0ff !important;
    border-radius: 8px !important;
}

.woocommerce-error {
    background: rgba(220, 53, 69, 0.08) !important;
    border-top-color: #dc3545 !important;
    color: #eef0ff !important;
    border-radius: 8px !important;
}

.woocommerce-error li,
.woocommerce-info li,
.woocommerce-message li {
    color: #eef0ff !important;
}

.woocommerce-info a,
.woocommerce-message a {
    color: #595ee0 !important;
    font-weight: 600 !important;
}

/* --- Section headings --- */
.woocommerce-checkout h3,
#order_review_heading,
.woocommerce-billing-fields h3,
.woocommerce-additional-fields h3 {
    color: #7b7ff0 !important;
}

/* Coupon toggle */
.woocommerce-form-coupon-toggle .woocommerce-info {
    background: rgba(89, 94, 224, 0.06) !important;
}

.showcoupon {
    color: #595ee0 !important;
}

/* Coupon form */
form.checkout_coupon {
    background: #111224 !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
}

/* Price/amount styling */
.amount,
.woocommerce .amount {
    color: #595ee0 !important;
}

/* Checkbox styling */
input[type="checkbox"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    background: #111224 !important;
    border: 2px solid rgba(89, 94, 224, 0.3) !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    position: relative !important;
    vertical-align: middle !important;
    padding: 0 !important;
    margin-right: 8px !important;
    flex-shrink: 0 !important;
}

input[type="checkbox"]:checked {
    background: #111224 !important;
    border-color: #7b7ff0 !important;
}

input[type="checkbox"]:checked::after {
    content: "" !important;
    position: absolute !important;
    left: 5px !important;
    top: 1px !important;
    width: 6px !important;
    height: 11px !important;
    border: solid #7b7ff0 !important;
    border-width: 0 2.5px 2.5px 0 !important;
    transform: rotate(45deg) !important;
    display: block !important;
}

input[type="checkbox"]:hover {
    border-color: #595ee0 !important;
}

/* WooCommerce privacy policy text */
.woocommerce-privacy-policy-text p,
.woocommerce-terms-and-conditions-wrapper p {
    color: #6b6d85 !important;
}

.woocommerce-privacy-policy-text a {
    color: #595ee0 !important;
}
