#codplugin-checkout{
    position: relative;
    padding: 30px;
    border: 2px solid #4C3BCF;
    border-radius: 6px;
    margin-top: 50px;
}
.codplugin-checkout-title {    
    text-align: center;
}
.codplugin-checkout-title h3{
    padding: 0 20px;
    display: inline-block;
    color: #000;
    font-size: 16px;
}
#codplugin_woo_single_form input,
#codplugin_state,
#codplugin_city,
#order-notes { /* Added #order-notes */
    border: 2px solid #bce0f7;
    height: 50px; /* Default height, textarea can override or use min-height */
    padding: 10px; /* Added padding for better text appearance */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    width: 100%; /* Ensure full width within grid cell */
}

#order-notes {
    height: 50px;       /* Match other input fields */
    min-height: 50px;   /* Match other input fields */
    padding: 10px;      /* Match other input fields */
    line-height: 1.5;   /* Keep line-height suitable for single line */
    resize: vertical; /* Allow only vertical resizing */
    /* border-color is now handled by inline styles from customizer.php */
}



#codplugin_woo_single_form input:valid,
#codplugin_woo_single_form select:valid {
    border: 2px solid #69bf29 !important;
    outline: none;
}

#codplugin_woo_single_form input:required:focus:invalid,
#codplugin_woo_single_form select:required:focus:invalid {
    border: 2px solid #d65d67 !important;
    outline: none;
}

.codplugin-field {
    margin: 0;
}

#codplugin_state .variations td.value {
    width: initial;
}

#codplugin_woo_single_form {
    display: grid;
    grid-gap: 15px;
    grid-template-columns: repeat(2, 1fr); /* Restored to 2 columns */
}
#codplugin-checkout .form-footer {
    display: grid;
    grid-gap: 15px;
    grid-template-columns: 125px 1fr;
    margin-top: 10px;
}
#nrwooconfirm{
    background-color: #4C3BCF;
    border: none;
    color: #fff !important;
    height: 50px;
    line-height: 50px;
    padding: 0;
    overflow: hidden;
}
#nrwooconfirm.atc-buy-button {
    display: grid;
    grid-gap: 15px;
    grid-template-columns: repeat(2, 1fr);
    background: none !important;
}
#nrwooconfirm.atc-buy-button .button,
#nrwooconfirm.atc-buy-button input {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: normal;
    padding: 3px;
    font-size: 15px;
}
#nrwooconfirm.atc-buy-button .button,
#nrwooconfirm.atc-buy-button .wc-forward {
    padding: 10px;
}
#codplugin_add_button,#codplugin_count_button,#codplugin_remove_button{
    color: black;
    font-size: 20px;
    text-align: center;
    line-height: 46px;
    cursor: pointer;
    line-height: 46px;
}
#codplugin_woo_radio,
#codplugin-checkout .variation-prices input[type="radio"]{
	width: 15px!important;
	height: 15px!important;
}


#codplugin_state,
#codplugin_city {
    cursor: pointer;
    color: #888;
}

span#codplugin_h_o {
    line-height: 50px;
    font-size: 16px;
}
span#codplugin_h_o i {
    font-size: 20px;
    color: #bce0f7;
    margin-right: 5px;
}
div#codplugin_h_left {
    float: right;
} 
div#codplugin_h_left i {
    color: #bce0f7;
    line-height: 50px;
    font-size: 25px;
}
div#codplugin_h_right {
  float: left;
}
div#codplugin_order_history {
    height: 50px;
    cursor: pointer;
    border-bottom: 2px solid #bce0f7;
    background: #f0f9ff;
    padding: 0 10px;
    margin-bottom: 0;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

#codplugin_gif{
    margin: auto;
    width: 50px;
    height: 50px;
    display: none;
}

.form-qte {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* All three parts flexible and equal */
    border: 2px solid #eae7f7;
    border-radius: 3px;
}
#codplugin_remove_button {
    border-left: 2px solid #bce0f7;
    border-right: 0;
}
#codplugin_add_button {
    border-right: 2px solid #bce0f7;
    border-left: 0;
}
#codplugin-checkout table {
    border: none;
}

#codplugin-checkout .variation-prices {
    font-size: 16px;
}
#codplugin-checkout .variation-prices bdi {
font-weight: bold;
    color: #4C3BCF;
}

#codplugin-checkout .variation-prices  .crossed-price bdi {
    font-weight: normal;
    color: #aeaeae;
}
#codplugin-checkout td {
    border: none;
    border-bottom: 2px dotted #bce0f7;
    padding: 8px 5px; /* Add some default padding */
}
/* Ensure vertical alignment for the shipping row cells */
#codplugin_show_hide .shipping-row td {
    vertical-align: middle; /* Or top, depending on desired alignment */
}
#codplugin-checkout .full-price td {
    font-weight: bold;
    border-bottom: 0;
}
#codplugin-checkout .full-price td:last-child,
#codplugin_show_hide .summary-item-price-cell { /* Total price and item price cell */
    text-align: right !important;
}
#codplugin_show_hide td#codplugin_d_has_price { /* Align delivery price right */
    /* color: #4C3BCF; REMOVED - Color should inherit now */
    text-align: right !important;
}
/* RTL alignment */
.rtl #codplugin_show_hide td#codplugin_d_has_price,
.rtl #codplugin-checkout .full-price td:last-child,
.rtl #codplugin_show_hide .summary-item-price-cell {
    text-align: left !important;
}
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-clip: padding-box;
    background-size: 9px;
    background-image: url(data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23333' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E);
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    padding-right: 28px !important;
}
table {
    border-collapse: separate;
    border-spacing: 0;
    border-width: 1px 0 0 1px;
    margin: 0 0 1.5em;
    width: 100%;
}
table, td, th {
    border: 1px solid rgba(0,0,0,.1);
}
#codplugin-checkout .woocommerce-variation-add-to-cart {
    display: none !important;
}

.woocommerce div.product .product_meta {
    border-top: none!important;
}


#cod-upsell{
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 25; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}
#cod-upsell-box{
    background-color: #fff;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
}

#cod-upsell-loader{
    display: none;
}

#cod-upsell-box .cod-upsell-heading {
    color: red;
    text-align: center;
    font-weight: bold;
    font-size: 45px;
    margin: 0;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 3px dotted #eee;
}
.cod-upsell-product-title {
  text-align: center;
  font-size: 24px;
  color: #000;
}

.cod-upsell-product img {
    margin: 20px auto;
    display: block;
}

.cod-upsell-product .price {
    display: block;
    text-align: center;
    color: red;
    margin-bottom: 25px;
}
#upsell-submit button {
  display: block;
  margin: 20px auto;
  color: #fff;
  background-color: #4caf50;
  padding: 15px 50px;
  font-size: 30px;
  border: none;
}
#upsell-submit #cod-upsell-cancel {
    background-color: transparent;
    color: #bababa;
    padding: 0;
    font-size: 20px;
}

#upsell-submit button:hover {
    cursor: pointer;
}
#upsell-submit #cod-add-upsell:hover {
  background-color: #222;
}
#upsell-submit #cod-upsell-cancel:hover {
  color: #555;
}

#codplugin-checkout .chosen-search-input,
#codplugin-checkout .chosen-search input {
    width: 100% !important;
    box-sizing: border-box;
    margin: 0;
    padding: 0 10px;
    border: none;
    height: 30px;
}

#codplugin-checkout .chosen-single {
    padding: 16px;
    border: 2px solid #bce0f7;
    height: 50px;
    background: none;
    background-color: #fff !important;
    border-radius: 3px;
    box-shadow: none;
    color: #919191;
}

#codplugin-checkout .chosen-container-single .chosen-single div {
    top: 10px;
}

#codplugin-checkout .chosen-container .chosen-drop {
    border: 2px solid #bce0f7;
    border-top: none;
    margin-top: -13px;
}

#codplugin-checkout .chosen-container {
    width: 100% !important;
    font-size: 14px;
}
#codplugin-checkout .chosen-container-single .chosen-single span,
#codplugin-checkout .chosen-container-single .chosen-single div {
    margin: 0;
}

#codplugin-checkout .chosen-container .chosen-results li.no-results {
    display: none;
}

#codplugin-checkout .chosen-container .chosen-results li.disabled-result {
    display: none;
}

#codplugin-checkout .chosen-container .chosen-results li {
    line-height: 24px;
}
#codplugin_show_hide {
    background: #f0f9ff;
    padding: 10px;
    margin-top: 0;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
}

#codplugin_show_hide table {
    margin-bottom: 0;
}

#codplugin_count_number {
    display: inline-block;
    font-size: 12px;
    height: 18px;
    line-height: 18px;
    padding: 0 3px;
    background-color: #4C3BCF;
    border-radius: 3px;
    color: #fff;
    font-weight: bold;
}
#codplugin_count_number:before {
    content: 'x ';
}
#codplugin_d_free span {
    display: inline-block;
    font-size: 15px;
    height: 20px;
    line-height: 20px;
    padding: 0 7px;
    background-color: #4C3BCF;
    border-radius: 3px;
    color: #fff;
}
.summary-product-title {
    font-weight: bold !important;
}
.summary-select-state {
    font-size: 14px;
    opacity: .8;
    color: #636566; /* Set specific color for placeholder text */
}
.codplugin_currency {
    display: none;
}

#shipping-methods {
    font-size: 14px;
    margin-left: 10px;
    /* opacity: .75; Removed opacity */
}
.blink-me {
  animation: blinker 1s linear infinite;
}

@keyframes blinker {
  50% {
    opacity: 0;
  }
}

.whatsapp-order-section {
    margin: 0 auto 15px;
    text-align: center;
}
.whatsapp-order-section #whatsapp-orders {
    color: #fff;
    display: inline-block;
    background: #25d466;
    border-radius: 50px;
    padding: 10px;
    border: none;
    font-weight: bold;
    font-size: 15px;
}

.whatsapp-order-section #whatsapp-orders:hover {

    cursor: pointer;
}
.radio-variation-prices {
    margin-top: 10px;
}

.radio-variation-prices tbody {    
    display: grid;
    background: #f1f9ff;
    padding: 10px;
    border-radius: 3px;
}
.radio-variation-prices tr {
    position: relative;
    border: 2px solid #bce0f7;
    margin: 3px 0;
    border-radius: 5px;
    padding: 5px 15px;
    background: white;
    grid-column-gap: 0.5rem;
    flex-direction: row;
    align-items: center;
    display: flex;
    cursor: pointer;
}
#codplugin-checkout .radio-variation-prices td {
    border: none;
}
.radio-variation-prices tr td:last-child {
    margin-left: auto;
}

.radio-variation-prices input[type="radio"] {
    position : relative;
}
/* Removed double space before input */
.radio-variation-prices input[type="radio"]:before {
    content: '';
    width: 30px;
    height: 30px;
    border-radius: 30px;
    display: inline-block;
    background: #fff;
    border: 2px solid #ddd;
    transition: all .1s ease-in-out 0s;
    margin-top: -5px;
    margin-left: -5px;
}
.radio-variation-prices input[type="radio"]:checked::before {
    content: "";
    width: 30px;
    height: 30px;
    border-color: #4C3BCF;
    display: inline-block;
    background: #4C3BCF;
    color: white;
}
.radio-variation-prices input[type="radio"]:checked::after {
    content: '';
    display: block;
    position: absolute;
    top: 0px;
    left: 6px;
    width: 9px;
    height: 17px;
    border-style: solid;
    border-color: white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}
.radio-variation-prices tr.checked-var {
    border-color: #4C3BCF !important;
}
.checked {
    position: relative;
}
.checked::after {
    content: "";
    position: absolute;
    top: -7px;
    right: 10px;
    display: inline-block;
    padding: 0 20px;
    line-height: 18px;
    background-color: #4C3BCF;
    color: #fff;
    border-radius: 10px;
    font-size: 0.8em;
    vertical-align: middle;
}

html[lang="ar"] .checked::after {
    content: "";
}

html[lang="fr-FR"] .checked::after {
    content: "";
}

.variation-prices:not(.radio-variation-prices) .checked::after { 
    top: 13px;
}

.sold-individual .form-qte {display :none;} 
#codplugin-checkout .sold-individual.form-footer {grid-template-columns: 1fr;}

#codplugin-thanks {
    display :none;
    width: 100%;
    z-index: 98;
    background-color: #fff;

}

.elementor-page #codplugin-thanks {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}
#codplugin-thanks-box {
    background-color: #ffffff;
    padding: 20px;
    width: 550px;
    margin: 50px auto;
    z-index: 99;
}

#thanks-order-summary #shipping-methods {
    display: none;
}
.thanks-box-title {
    text-align: center;
    font-size: 18px;
    margin: 20px 0;
}

.thanks-box-content {
    margin-bottom: 30px;
}
.order-summary-title {
    line-height: 50px;
    padding: 0 10px;
    font-weight: bold;
    background: #4C3BCF;
    color: #fff;
}

#codplugin-thanks-box #codplugin_show_hide {
    display:block;
    background: transparent;
    border: 1px solid #4C3BCF;
    padding: 0;
    border-radius: 0;
}
#codplugin-thanks-box table, 
#codplugin-thanks-box td, 
#codplugin-thanks-box th {
    border: none;
}
#codplugin-thanks-box td {
    padding: 8px;
    background: #f8f8f8;
    border-top: 1px solid #DDDDDD;
}
#codplugin-thanks-box tr:first-child td {
    border-top: none;
    background: #fff;
}


@keyframes shaking {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  4%, 46% {
    transform: translate3d(-1px, 0, 0);
  }
  8%, 42% {
    transform: translate3d(2px, 0, 0);
  }
  12%, 37% {
    transform: translate3d(-3px, 0, 0);
  }
  16%, 33% {
    transform: translate3d(3px, 0, 0);
  }
}


/* -----------------------------------------
     Global Mediaqueries
----------------------------------------- */

@media (max-width: 1349px) and (min-width: 992px) {

    #codplugin-checkout {
        padding: 30px 10px;
    }

}

@media (max-width: 767px) {

    #codplugin-checkout {
        padding: 30px 10px;
    }
    
    #upsell-submit button {
        padding: 12px 25px;
        font-size: 20px;
    }
    #cod-upsell-box .cod-upsell-heading {
        font-size: 36px;
    }
    #codplugin-thanks-box {
        width: 90%;
    }
}

.rtl .radio-variation-prices tr td:last-child {
    margin-right: auto;
    margin-left: 0;
}
.rtl .radio-variation-prices input[type="radio"]:checked::after {
    right: 6px;
    left: auto;
}
.rtl div#codplugin_h_left {
    float: left;
}
.rtl div#codplugin_h_right {
    float: right;
}
.rtl input#nrwooconfirm {
    float: left;
}
.rtl .form-qte {
    float: right;
}

.rtl #codplugin_add_button {
    border-left: 2px solid #bce0f7;
    border-right: 0;
}

.rtl #codplugin_remove_button {
    border-right: 2px solid #bce0f7;
    border-left: 0;
}

.rtl #codplugin-checkout .chosen-container-single .chosen-single div {
    right: auto;
    left: 10px;
}
.rtl #codplugin-checkout .chosen-search-input,
.rtl #codplugin-checkout .chosen-search input {
    background-position-x: -29px;
 }

.rtl #shipping-methods {
    margin-left: 0px;
    margin-right: 10px;
}

.rtl .radio-variation-prices input[type="radio"]:before {
    margin-left: auto;
    margin-right: -5px;
}
.rtl .checked::after {
    left: 10px;
    right: auto;
}

@media (max-width: 488px) {

    #codplugin-checkout .variation-prices {
        font-size: 14px;
    }
    .codplugin-checkout-title h3 {
        padding: 0 10px;
        margin-bottom: 15px;
    }
    div#codplugin_order_history, #codplugin_show_hide {
        font-size: 14px;
    }
    #codplugin-checkout td,
    #codplugin_show_hide {
        padding: 5px;
    }
    .variation-prices:not(.radio-variation-prices) .checked::after { 
        top: 7px;
    }
    #codplugin-checkout .variation-prices .woocommerce-Price-amount {
        display: block;
        font-size: 14px;
    }
    #codplugin_woo_single_form {
        grid-gap: 13px;
        grid-template-columns: repeat(1, 1fr);
    }
    #codplugin-checkout {
        padding: 10px 10px 10px;
    }
    #nrwooconfirm, .form-qte {
        margin: 0;
    }
    .codplugin-checkout-title {
        position: relative; 
    }
    div#codplugin_order_history {
        margin-top: 10px;
        margin-left: 0;
        margin-right: 0;
        padding: 0 5px;
    }
    #codplugin_show_hide {
        margin-left: 0;
        margin-right: 0;        
    }
    #codplugin_show_hide table tr td:last-child {
        text-align: right;
    }
   
}

@media (max-width: 417px ) {
    #nrwooconfirm.atc-buy-button {
        grid-gap : 10px;
        grid-template-columns: 1fr;
        height: auto;
   }
   #nrwooconfirm.atc-buy-button .button, #nrwooconfirm.atc-buy-button input {
    height: 45px;
   }
    .form-qte {
        grid-template-columns: 1fr 1fr 1fr;
    }
    #codplugin-checkout .form-footer {
        grid-gap: 10px;
        grid-template-columns: 1fr;
    }


}

/* Custom Shipping Method Radio Buttons Styling */
/* Note: Colors (border, checked background, focus) are handled by inline styles from customizer.php */

.codplugin-shipping-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px; /* Space between options */
    padding: 5px;
    border: 2px solid transparent; /* Base border for layout consistency */
    border-radius: 4px;
    cursor: pointer;
}

.codplugin-shipping-option:hover {
    /* background-color: #f9f9f9; Optional hover effect */
}

/* Hide actual radio button */
.codplugin-shipping-input {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

/* Label positioning and spacing */
.codplugin-shipping-label {
    position: relative;
    padding-left: 2.4em; /* Adjusted padding for 1.6em circle + margin */
    cursor: pointer;
    font-size: 1em; /* Match surrounding text */
    line-height: 1.6em; /* Match custom radio height */
    display: inline-block;
    vertical-align: middle; /* Align label text better */
    margin-right: 0.5em; /* Add space between graphic and text for LTR */
}

/* Custom radio button circle (structure and default appearance) */
.codplugin-shipping-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0; /* Align to top of line-height */
    /* transform: translateY(-50%); Remove vertical transform */
    width: 1.6em; /* Slightly larger outer ring */
    height: 1.6em; /* Slightly larger outer ring */
    border: 1px solid #bce0f7; /* Fallback border color - Use default secondary */
    border-radius: 50%;
    background-color: #fff;
    box-sizing: border-box;
    transition: all 250ms ease; /* Transition from example */
}

/* Inner dot/gap is now created using box-shadow via inline styles */
/* Remove the ::after rule */

/* Container layout */
#shipping-methods {
    display: flex;
    flex-direction: column;
}


/* === Preset 2 Layout Styles === */

/* Container for shipping options below form */
.codform-preset-2 #codplugin-preset2-shipping {
    margin-top: 20px; /* Space above shipping options */
    padding-top: 15px;
    border-top: 1px dashed #eee; /* Separator */
}

.codform-preset-2 .shipping-preset2-title {
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center; /* Or left */
}

/* Horizontal layout for shipping options */
.codform-preset-2 #shipping-methods {
    flex-direction: row; /* Horizontal */
    flex-wrap: wrap; /* Allow wrapping */
    justify-content: center; /* Center options */
    gap: 10px; /* Space between options */
    margin-left: 0; /* Override default margin */
}

.codform-preset-2 .codplugin-shipping-option {
    margin-bottom: 0; /* Remove bottom margin for horizontal layout */
    border: 2px solid transparent; /* Keep for consistency */
    padding: 0; /* Remove padding, handled by label */
}

/* Adjust label for horizontal layout */
.codform-preset-2 .codplugin-shipping-label {
    padding: 0.75rem calc(2.1em + 0.75rem) 0.75rem 1rem; /* Padding inside the label */
    border: 1px solid #bce0f7; /* Default border - Use default secondary */
    border-radius: 0.25rem;
    transition: all 0.25s cubic-bezier(0.25, 0.25, 0.5, 1.9);
    line-height: 1.6em; /* Match ::before height */
    margin-left: 0.5em; /* Add space between graphic and text for LTR */
    margin-right: 0;
}

/* Adjust ::before position within the padded label */
.codform-preset-2 .codplugin-shipping-label::before {
    left: auto; /* Position inside label padding */
    right: 0.75rem;
    top: 50%; /* Center vertically */
    transform: translateY(-50%); /* Center vertically */
    /* Size (1.6em) and border-radius (50%) are inherited */
    /* Border color is set by Customizer */
}

/* Selected state style from example (background expansion) */
.codform-preset-2 .codplugin-shipping-input:checked + .codplugin-shipping-label {
    padding-left: 1em; /* Reduce left padding */
    padding-right: 1em; /* Add right padding */
    /* Text color will be set by Customizer */
}

.codform-preset-2 .codplugin-shipping-input:checked + .codplugin-shipping-label::before {
    width: 100%; /* Expand to fill label */
    height: 100%; /* Expand to fill label */
    border-radius: 0.25rem; /* Match label's border-radius */
    top: 0;
    left: auto;
    right: 0;
    transform: none; /* Reset transform */
    z-index: -1; /* Place behind label text */
    /* Background, border, and box-shadow are set by Customizer */
}

/* Hide the inset shadow effect for preset 2 as we use background expansion */
.codform-preset-2 .codplugin-shipping-input:checked + .codplugin-shipping-label::before {
    box-shadow: none !important;
}

/* Ensure default preset styles don't interfere */
.codform-preset-1 #shipping-methods {
    /* Styles for default vertical layout inside summary */
    flex-direction: column;
    margin-left: 10px;
}
.codform-preset-1 .codplugin-shipping-label {
    padding-left: 2.4em;
    line-height: 1.6em;
    margin-right: 0.5em; /* Add space between graphic and text for LTR */
}
.codform-preset-1 .codplugin-shipping-label::before {
    left: 0;
    top: 0;
    transform: none;
    width: 1.6em;
    height: 1.6em;
    border-radius: 50%;
}
/* We might need more specific overrides if needed */

.codplugin-available-stock {
    text-align: left;
}

.rtl .codplugin-available-stock {
    text-align: right;
}

/* --- Chargily Pay Integration Styles --- */
.codplugin-payment-methods-container {
    margin: 15px 0;
    padding: 15px;
    border: 1px solid #e0e0e0; /* Light border */
    border-radius: 4px;
    background-color: #fdfdfd; /* Slightly off-white background */
    grid-column: 1 / -1; /* Span full width in the form grid */
}

.codplugin-payment-methods {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 20px; /* Space between radio buttons */
    margin-bottom: 15px; /* Space before Chargily fields if shown */
}

.codplugin-payment-methods .payment-method-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 5px; /* Add some bottom margin for wrapped items */
}

.codplugin-payment-methods input[type="radio"] {
    margin-right: 8px; /* Space between radio and label text */
    width: auto !important; /* Override potential width restrictions */
    height: auto !important; /* Override potential height restrictions */
    /* Optional: Use accent color for radio */
    /* accent-color: #4C3BCF; */
}

#chargily_pay_fields_container .Chargily-container {
    /* Resetting some styles that might conflict from Chargily's default CSS */
    margin: 0;
    padding: 0;
    border: none;
}

#chargily_pay_fields_container .Chargily-option {
    margin-bottom: 10px; /* Space between Chargily options */
}

#chargily_pay_fields_container .Chargily-logo-z {
    margin-top: 10px;
    justify-content: center; /* Center the Chargily logo */
}

/* RTL Fix for Chargily QR Code Image Alignment */
html[dir="rtl"] .codplugin-payment-methods-container img.appCardImage {
    margin-right: auto; /* Push image to the left in RTL */
    margin-left: inherit; /* Reset left margin */
}
/* --- End Chargily Pay Integration Styles --- */

/* --- Styled Payment Selector --- */
.codplugin-payment-methods.styled-selector {
    display: flex;
    gap: 10px; /* Adjust gap between buttons */
    margin-bottom: 15px; /* Keep space before Chargily fields */
    flex-wrap: wrap; /* Allow wrapping */
}

.payment-option-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

label.payment-option {
    display: flex;
    align-items: center;
    padding: 8px 15px; /* Adjust padding for desired size */
    border: 2px solid #bce0f7; /* Use secondary color for border */
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative; /* Needed for indicator positioning */
    flex-grow: 1; /* Allow buttons to grow */
    justify-content: center; /* Center content */
    min-width: 150px; /* Ensure minimum width */
    height: 45px; /* Shorter height */
    box-sizing: border-box;
}

label.payment-option:hover {
    background-color: #f8f8f8;
    border-color: #a0c8e0;
}

.payment-option-icon {
    width: 24px; /* Adjust icon size */
    height: 24px;
    margin-right: 8px;
    object-fit: contain; /* Prevent distortion */
}
.rtl .payment-option-icon {
    margin-left: 8px;
    margin-right: 0;
}

.payment-option-label {
    font-size: 14px; /* Adjust font size */
    font-weight: 500;
    line-height: 1.2; /* Adjust line height */
}

.payment-option-indicator {
    display: none; /* Hide the example indicator for now, selection is shown by border/bg */
}

/* Selected state */
.payment-option-input:checked + label.payment-option {
    border-color: #4C3BCF; /* Use accent color for selected border */
    background-color: #f0f9ff; /* Light accent background */
    box-shadow: 0 0 5px rgba(37, 155, 234, 0.3); /* Optional subtle glow */
    /* You could add back the indicator here if desired */
}

/* --- End Styled Payment Selector --- */

/* --- File Upload Field Styles --- */
.codform-file-upload-field-container {
	grid-column: 1 / -1; /* Make it span full width if in a grid */
	margin-bottom: 15px; /* Spacing similar to other fields */
}

.codform-file-upload-label {
	display: block;
	margin-bottom: 5px; /* Space between label and input */
	font-weight: bold; /* Optional: make label bold */
}

.codform-custom-file-input {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	height: 50px; /* Match other input fields */
	border: 2px solid #bce0f7; /* Match other input fields */
	border-radius: 3px; /* Match other input fields */
	padding: 0;
	box-sizing: border-box;
	overflow: hidden; /* To contain the button */
	cursor: pointer;
}

.codform-file-upload-button {
	background-color: #e9e9e9; /* Light grey button background */
	color: #333;
	padding: 0 15px;
	height: 100%;
	border: none;
	border-right: 2px solid #bce0f7; /* Separator line */
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	font-size: 14px; /* Adjust as needed */
}

.codform-file-upload-button:hover {
	background-color: #dcdcdc;
}

.codform-file-upload-filename {
	padding-left: 10px;
	font-size: 14px; /* Match button or general text */
	color: #555; /* Placeholder-like color */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex-grow: 1; /* Allow filename to take remaining space */
}

/* Ensure the hidden input doesn't take up space or become visible */
#codform_uploaded_file {
	display: none !important;
}

/* --- End File Upload Field Styles --- */

/* --- Custom Layout Control Styles --- */

/* Force Compact Layout: Keeps main form fields in 2 columns on small screens */
@media (max-width: 488px) {
	body.force-compact-layout #codplugin_woo_single_form {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Force Single-Line Quantity & Button */
body.force-single-line-qty #codplugin_woo_single_form .form-qte {
	grid-column: 1 / -1; /* Make quantity input span full width of the main form grid */
}

body.force-single-line-qty #codplugin-checkout .form-footer {
	grid-column: 1 / -1; /* Make form footer span full width of the main form grid */
	grid-template-columns: 1fr; /* Ensure button inside takes full width of footer */
}

body.force-single-line-qty #codplugin-checkout .form-footer #nrwooconfirm {
	grid-column: 1 / -1; /* Make button span full width of the .form-footer grid */
}
/* If #nrwooconfirm.atc-buy-button is active, it also needs to be handled */
body.force-single-line-qty #codplugin-checkout .form-footer #nrwooconfirm.atc-buy-button {
    grid-template-columns: 1fr; /* Ensure its internal parts also stack if it's the buy button variant */
}


/* --- End Custom Layout Control Styles --- */
