/**
 * IP Custom Code Styles
 */

/* =========================
   Module: Global
========================= */

/* Base paragraph alignment */
p {
    text-align: justify;
}

/* Unified focus border for text-like inputs */
input[type='email']:focus,
input[type='date']:focus,
input[type='search']:focus,
input[type='number']:focus,
input[type='text']:focus,
input[type='tel']:focus,
input[type='url']:focus,
input[type='password']:focus {
    border: 1px solid #242424 !important;
}

/* WooCommerce message icon color */
.woocommerce-message:before {
    color: green !important;
}

/* =========================
   Module: Header Search
========================= */

/* Full-screen search input */
.wd-search-full-screen .searchform input[type="text"] {
    padding: 0;
    text-align: center;
    font-weight: 400 !important;
    font-size: 20px !important;
    color: #000;
}

/* Full-screen search placeholder */
.wd-search-full-screen .searchform input[type="text"]::placeholder {
    padding: 0;
    text-align: center;
    font-weight: 400;
    font-size: 20px !important;
    color: #7b7b7b;
}

/* Full-screen search input on focus */
.wd-search-full-screen .searchform input[type="text"]:focus {
    border: 0px solid !important;
}

/* =========================
   Module: Blog / Single Post
========================= */

/* Hide post meta blocks */
.wd-post-author,
.wd-post-cat.wd-style-with-bg,
.wd-post-meta {
    display: none !important;
}

/* Post title spacing */
.wd-entities-title.wd-post-title.title {
    margin-bottom: 30px;
}

/* =========================
   Module: Product Grid
========================= */

/* Product title clamp in grid cards */
.product-grid-item .wd-entities-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    font-weight: 500;
}

/* Product category style in grid */
.wd-product-cats a {
    color: #797979 !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
}

/* =========================
   Module: Product Category
========================= */

/* Term description card */
.term-description {
    padding: 40px;
    background: #F3F3F3;
    border-radius: 20px;
    margin-top: 40px !important;
}

/* =========================
   Module: Single Product
========================= */

/* Product summary layout */
.product-image-summary .summary-inner {
    --wd-mb: 20px;
    container: entry-summary / inline-size;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Variation wrapper layout */
.woocommerce-variation {
    display: flex;
    flex-direction: column;
    align-content: flex-start;
}

/* Variation row spacing */
.woocommerce-variation > div {
    margin-bottom: 20px;
}

/* Variation price wrapper */
.woocommerce-variation-price span.price {
    display: block;
    margin: 0rem;
}

/* Variation availability spacing */
.woocommerce-variation-price:not(:empty) + .woocommerce-variation-availability {
    margin-left: 0px !important;
    margin-bottom: 30px;
}

/* Stock text weight */
p.stock.wd-style-default:is(.available-on-backorder, .in-stock) {
    font-weight: 400;
}

/* Stock icon color */
p.stock.wd-style-default.in-stock:before {
    color: green !important;
}

/* Reset variations font */
.variation-swatch-selected .reset_variations {
    font-size: 14px;
}

/* Reset variations icon color */
.reset_variations:before {
    color: red !important;
}

/* Product gallery background */
.woocommerce-product-gallery img {
    background: #FFF;
}

/* Product card image background */
.wd-product .product-image-link {
    background: #FFF;
}

/* Fix stars visual alignment */
.woocommerce p.stars a {
    color: transparent !important;
    text-indent: 0 !important;
}

/* Fix rating label spacing */
.woocommerce .comment-form-rating label {
    margin-bottom: 0 !important;
}

/* =========================
   Module: Mini Cart
========================= */

/* Hide cart item overlay link */
.cart-item-link.wd-fill {
    display: none;
}

/* =========================
   Module: Cart
========================= */

/* Cart content columns layout */
.cart-content-wrapper {
    --wd-row-gap: 0px !important;
    --wd-col-gap: 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start !important;
    gap: var(--wd-row-gap) var(--wd-col-gap);
}

/* Product price and subtotal minimum width */
.product-price,
.product-subtotal {
    min-width: 140px;
}

/* =========================
   Module: Checkout
========================= */

/* Checkout product total width */
.wd-checkout-prod-total {
    min-width: 150px;
}

/* Reward apply layout */
.fp_apply_reward {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

/* Reward coupon input */
#rs_apply_coupon_code_field.input-text {
    width: 200px;
    border: 1px solid #242424;
}

/* Reward apply button */
#mainsubmi.srp-apply-points {
    margin: 5px;
    border-radius: 50px !important;
    padding: 0px 15px !important;
    min-height: 30px;
}

/* Remove icon in checkout table */
td.product-remove a:before,
.wd-checkout-remove-btn:after {
    content: "\f112";
    font-family: "woodmart-font";
    color: red;
}

/* Nova Poshta shipping icon */
label[for=shipping_method_0_nova_poshta_shipping3]:before {
    background-image: url(/wp-content/plugins/ip-custom-code/img/nova_poshta.jpg);
    background-size: 30px 30px;
    background-repeat: no-repeat;
    width: 30px;
    height: 30px;
    margin-left: 0px;
    margin-top: -5px;
    transform: scale(1);
    content: "";
    position: absolute;
    border-radius: 50px;
}

/* Shipping cost text */
#wcus-shipping-cost {
    margin-left: 40px;
    font-weight: 500;
    color: #000;
}

/* Hide native checkout radio */
.woocommerce-checkout-payment input[type="radio"] {
    display: none;
}

/* Custom checkout radio label */
.woocommerce-checkout-payment input[type="radio"] + label {
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 15px;
    user-select: none;
}

/* Custom checkout radio circle */
.woocommerce-checkout-payment input[type="radio"] + label:before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px;
    height: 18px;
    border: 2px solid #242424;
    border-radius: 50%;
    background: #fff;
    transition: 0.3s;
}

/* Custom checkout radio checked state */
.woocommerce-checkout-payment input[type="radio"]:checked + label:before {
    background: #242424;
    border-color: #242424;
    box-shadow: inset 0 0 0 3px #fff;
}

/* Hide native checkbox input globally */
input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* Custom checkbox container */
.checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 32px;
    font-size: 16px;
    line-height: 1.5;
    color: #242424;
}

/* Custom checkbox box */
.checkbox::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #242424;
    border-radius: 4px;
    background-color: #FFF;
    transition: all 0.3s ease;
}

/* Custom checkbox checkmark */
.checkbox::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 50%;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translateY(-50%) rotate(45deg) scale(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

/* Custom checkbox hover */
.checkbox:hover::before {
    border-color: #242424;
    background-color: #FFF;
}

/* Custom checkbox checked box */
.checkbox input[type="checkbox"]:checked ~ *::before,
.checkbox:has(input[type="checkbox"]:checked)::before {
    background-color: #242424;
    border-color: #242424;
}

/* Custom checkbox checked checkmark */
.checkbox input[type="checkbox"]:checked ~ *::after,
.checkbox:has(input[type="checkbox"]:checked)::after {
    transform: translateY(-50%) rotate(45deg) scale(1);
}

/* Custom checkbox focus outline */
.checkbox:has(input[type="checkbox"]:focus)::before {
    outline: 0px solid #242424;
    outline-offset: 0px;
}

/* Custom checkbox disabled state */
.checkbox:has(input[type="checkbox"]:disabled) {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Custom checkbox disabled box style */
.checkbox:has(input[type="checkbox"]:disabled)::before {
    background-color: #242424;
    border-color: #242424;
}

/* =========================
   Module: My Account
========================= */

/* Account link cards */
.orders-link,
.edit-address-link,
.edit-account-link,
.waitlist-link,
.wishlist-link,
.customer-logout-link {
    border: 1px solid #E7E8E9;
    border-radius: 12px;
}

/* Account link underline reset */
.orders-link a,
.sumo-reward-points-link a,
.edit-address-link a,
.edit-account-link a,
.waitlist-link a,
.wishlist-link a,
.customer-logout-link a {
    text-decoration: none !important;
}

/* Return to shop button link reset */
.wd-empty-page-text + .return-to-shop .button {
    text-decoration: none !important;
}

/* Account content links */
.woocommerce-MyAccount-content a {
    font-weight: 500 !important;
    text-decoration: underline;
}

/* My account icon color */
.wd-my-account-links a:before {
    color: #242424 !important;
}

/* My account desktop columns */
.wd-my-account-links[class*="wd-grid"] {
    --wd-col-lg: 4 !important;
}

/* Wishlist/register secondary buttons */
.btn.wd-wishlist-create-group-btn,
.btn.wd-switch-to-register {
    color: #FFF;
}

/* My account icon size */
.wd-my-account-links a:before {
    font-size: 30px !important;
}

/* My account input fields */
.woocommerce-account input[type='text'],
.woocommerce-account input[type='tel'],
.woocommerce-account input[type='email'],
.woocommerce-account input[type='password'] {
    border: 1px solid #242424;
    font-size: 16px;
}

/* My account content text inputs */
.woocommerce-MyAccount-content input[type="text"] {
    width: 500px;
    max-width: 100%;
    font-size: 16px;
}

/* My account paragraph style */
.woocommerce-MyAccount-content p {
    font-size: 16px !important;
    color: #000 !important;
    font-weight: 400 !important;
}

/* Size selector field */
#change-page-sizes {
    width: 500px;
    max-width: 100%;
    margin: -10px 0px 0px 0px;
    border: 1px solid #242424;
}

/* Account custom form inputs */
.woocommerce-account .ip-cwrf-form-row input[type="text"],
.woocommerce-account .ip-cwrf-form-row input[type="tel"],
.woocommerce-account .ip-cwrf-form-row input[type="email"] {
    border: 1px solid #242424;
    font-size: 16px;
}

/* Display name helper text */
#account_display_name_description {
    display: block;
    font-size: 14px;
}

/* Login form username input */
.login.woocommerce-form.woocommerce-form-login input[type='text'] {
    border: 1px solid #242424;
}

/* Register/login button style */
:is(.register, .woocommerce-form-login) .button {
    color: var(--btn-accented-color-hover);
    box-shadow: var(--btn-accented-box-shadow-hover);
    background-color: #242424;
    font-size: 20px;
    font-weight: 400 !important;
}

/* Register/login button hover */
:is(.register, .woocommerce-form-login) .button:hover {
    background-color: #000;
}

/* Account button base */
.woocommerce-account .btn {
    font-size: 20px;
    font-weight: 400 !important;
    padding: 5px 40px;
    background-color: #242424;
}

/* Account button hover */
.woocommerce-account .btn:hover {
    font-size: 20px;
    font-weight: 400;
    padding: 5px 40px;
    background-color: #000;
}

/* Account navigation links */
.woocommerce-MyAccount-navigation ul li a {
    color: #000 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
}

/* Sidebar border reset */
.wd-my-account-sidebar {
    border-inline-end: 0px !important;
}

/* Logout link color */
.woocommerce-MyAccount-navigation-link.woocommerce-MyAccount-navigation-link--customer-logout a {
    color: red !important;
}

/* My account tiles links */
.wd-my-account-links a {
    font-weight: 400 !important;
    color: #000000 !important;
    font-size: 16px !important;
}

/* My account tiles links hover */
.wd-my-account-links a:hover {
    color: #FFF !important;
    background-color: #242424 !important;
}

/* My account icons hover */
.wd-my-account-links a:hover:before {
    color: #FFF !important;
}

/* Address edit and address text */
.woocommerce-Address-title .edit,
.woocommerce-Address address {
    font-size: 16px !important;
    font-weight: 400 !important;
}

/* Generic account action buttons */
.woocommerce-Button.button,
.wd-empty-page-text + .return-to-shop .button,
.btn.wd-wishlist-create-group-btn {
    font-size: 16px !important;
    font-weight: 400 !important;
    text-transform: none !important;
}

/* Hide waitlist empty text */
.wd-wtl-content .wd-empty-page-text {
    display: none;
}

/* Hide native account checkbox */
.woocommerce-form__input-checkbox {
    display: none;
}

/* Custom account checkbox label */
.woocommerce-form__label-for-checkbox {
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 15px;
    user-select: none;
    display: inline-block;
}

/* Custom account checkbox box */
.woocommerce-form__input-checkbox + span:before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px;
    height: 18px;
    border: 2px solid #242424;
    border-radius: 4px;
    background: #fff;
    transition: 0.3s;
}

/* Custom account checkbox checkmark */
.woocommerce-form__input-checkbox + span:after {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

/* Custom account checkbox checked box */
.woocommerce-form__input-checkbox:checked + span:before {
    background: #242424;
    border-color: #242424;
}

/* Custom account checkbox checked checkmark */
.woocommerce-form__input-checkbox:checked + span:after {
    transform: rotate(45deg) scale(1);
}

/* Custom account checkbox hover */
.woocommerce-form__label-for-checkbox:hover .woocommerce-form__input-checkbox + span:before,
.woocommerce-form__label-for-checkbox:hover span:before {
    border-color: #424242;
}

/* Login form footer layout */
.login-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Lost password link */
.login-form-footer .lost_password {
    color: #242424;
    text-decoration: none;
    font-size: 15px;
    transition: 0.3s;
}

/* Lost password link hover */
.login-form-footer .lost_password:hover {
    color: #424242;
    text-decoration: underline;
}

/* Create account button in sidebar */
.create-account-button.btn {
    text-decoration: none !important;
    border-bottom: 0px;
    text-transform: none !important;
    font-size: 16px;
    color: #FFF;
    font-weight: 300 !important;
    padding: 10px 30px;
    background-color: #242424;
    border-radius: 20px;
}

/* Create account button hover */
.create-account-button.btn:hover {
    background-color: #000000 !important;
}

/* =========================
   Module: Mobile Menu
========================= */

/* Mobile search submit icon */
.wd-search-form .searchform .searchsubmit {
    background: none;
    color: #000;
}

/* Hide Woo remove-coupon text */
.woocommerce-remove-coupon {
    font-size: 0 !important;
}

/* =========================
   Module: Responsive
========================= */

/* Reward form on small screens */
@media screen and (max-width: 550px) {
    .fp_apply_reward {
        flex-direction: column;
    }

    #rs_apply_coupon_code_field.input-text {
        width: 100%;
    }

    #mainsubmi.srp-apply-points {
        width: 100%;
        padding: 10px !important;
    }
}

/* Nova Poshta icon offset on mobile */
@media (max-width: 768.98px) {
    label[shipping_method_0_nova_poshta_shipping3]:before {
        margin-left: -80px;
        margin-top: 10px;
    }
}

/* My account grid on tablet */
@media screen and (max-width: 1024px) {
    .wd-my-account-links[class*="wd-grid"] {
        --wd-col: 3 !important;
    }
}

/* My account grid on mobile */
@media screen and (max-width: 768px) {
    .wd-my-account-links[class*="wd-grid"] {
        --wd-col: 2 !important;
    }
}

/* My account grid on very small devices */
@media screen and (max-width: 380px) {
    .wd-my-account-links[class*="wd-grid"] {
        --wd-col: 1 !important;
    }
}
