/**
 * COD Plugin - Simple & Clean Modern Theme
 * High-Converting Single-Column Cash On Delivery Interface for Algeria
 */

:root {
    --cod-simple-bg: #ffffff;
    --cod-simple-input-bg: #f8fafc;
    --cod-simple-input-focus: #ffffff;
    --cod-simple-primary: #10b981;
    --cod-simple-primary-hover: #059669;
    --cod-simple-text: #0f172a;
    --cod-simple-text-muted: #64748b;
    --cod-simple-border: #e2e8f0;
    --cod-simple-border-input: #cbd5e1;
    --cod-simple-radius: 12px;
    --cod-simple-radius-sm: 8px;
    --cod-simple-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Form Container Card */
#codplugin-checkout {
    width: 100% !important;
    max-width: 600px;
    box-sizing: border-box;
    position: relative;
    padding: 28px 24px;
    background: var(--cod-simple-bg) !important;
    border: 1px solid var(--cod-simple-border) !important;
    border-radius: var(--cod-simple-radius) !important;
    margin: 20px auto;
    box-shadow: var(--cod-simple-shadow) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 15px;
    line-height: 1.5;
    color: var(--cod-simple-text) !important;
}

#codplugin-checkout * {
    box-sizing: border-box;
}

/* Header Title */
.codplugin-checkout-title {    
    text-align: center;
    margin-bottom: 22px;
}

.codplugin-checkout-title h3,
.codplugin-checkout-title p {
    background: #ecfdf5 !important;
    color: #047857 !important;
    padding: 10px 22px !important;
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px !important;
    border: 1px solid #a7f3d0 !important;
    margin: 0;
    letter-spacing: 0.2px;
}

/* Single Column Stacked Form Inputs (One Below the Other) */
.codplugin-inputs {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
    margin-bottom: 16px;
}

.codplugin-inputs > input,
.codplugin-inputs > select,
.codplugin-inputs > div {
    width: 100% !important;
}

/* Input Fields & Select Dropdowns */
#codplugin_woo_single_form input[type="text"],
#codplugin_woo_single_form input[type="tel"],
#codplugin_state,
#codplugin_city,
.has-no-states {
    border: 1.5px solid var(--cod-simple-border-input) !important;
    height: 50px !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: var(--cod-simple-radius-sm) !important;
    background: var(--cod-simple-input-bg) !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: var(--cod-simple-text) !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

#codplugin_woo_single_form input::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

#codplugin_woo_single_form input:hover,
#codplugin_state:hover,
#codplugin_city:hover {
    border-color: #94a3b8 !important;
    background: #ffffff !important;
}

#codplugin_woo_single_form input:focus,
#codplugin_state:focus,
#codplugin_city:focus {
    outline: none !important;
    background: var(--cod-simple-input-focus) !important;
    border-color: var(--cod-simple-primary) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18) !important;
}

/* Select Dropdown Styling */
select#codplugin_state,
select#codplugin_city {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-position: right 1.2rem center !important;
    background-repeat: no-repeat !important;
    background-size: 16px !important;
    padding-right: 40px !important;
    cursor: pointer !important;
}

/* Form Footer Actions */
#codplugin-checkout .form-footer {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    margin-top: 18px;
    width: 100% !important;
}

/* Hide Quantity Stepper */
.form-qte {
    display: none !important;
}

/* Clean CTA Confirm Button */
input#nrwooconfirm {
    background: var(--cod-simple-primary) !important;
    border: none !important;
    color: #ffffff !important;
    height: 52px !important;
    line-height: 52px !important;
    border-radius: var(--cod-simple-radius-sm) !important;
    margin: 0 !important;
    padding: 0 20px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25) !important;
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    transition: all 0.2s ease !important;
}

input#nrwooconfirm:hover {
    background: var(--cod-simple-primary-hover) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35) !important;
}

input#nrwooconfirm:active {
    transform: translateY(0) !important;
}

/* ATC & Buy Button Grid */
#nrwooconfirm.atc-buy-button {
    display: grid !important;
    grid-gap: 12px !important;
    grid-template-columns: repeat(2, 1fr) !important;
    background: none !important;
    width: 100% !important;
}

#nrwooconfirm.atc-buy-button .button,
#nrwooconfirm.atc-buy-button input {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 52px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    background: var(--cod-simple-primary) !important;
    color: #ffffff !important;
    border-radius: var(--cod-simple-radius-sm) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

#nrwooconfirm.atc-buy-button .button:hover,
#nrwooconfirm.atc-buy-button input:hover {
    background: var(--cod-simple-primary-hover) !important;
    transform: translateY(-1px) !important;
}

/* WhatsApp Button */
.whatsapp-order-section {
    margin-top: 14px;
    width: 100%;
}

.whatsapp-order-section #whatsapp-orders {
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    background: #25d366 !important;
    border-radius: 50px !important;
    padding: 12px 24px !important;
    border: none !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25) !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
}

.whatsapp-order-section #whatsapp-orders:hover {
    background: #128c7e !important;
    transform: translateY(-1px) !important;
}

/* Order Summary Accordion */
div#codplugin_order_history {
    height: 50px !important;
    cursor: pointer;
    background: #f8fafc !important;
    border: 1.5px solid var(--cod-simple-border-input) !important;
    border-radius: var(--cod-simple-radius-sm) !important;
    margin-top: 18px;
    padding: 0 16px;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: all 0.2s ease !important;
}

div#codplugin_order_history:hover {
    background: #f1f5f9 !important;
}

span#codplugin_h_o {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--cod-simple-text) !important;
}

span#codplugin_h_o i, 
div#codplugin_h_left i {
    color: var(--cod-simple-primary) !important;
}

/* Order Summary Table Box */
#codplugin_show_hide {
    background: #ffffff !important;
    border: 1.5px solid var(--cod-simple-border) !important;
    border-top: none !important;
    border-radius: 0 0 var(--cod-simple-radius-sm) var(--cod-simple-radius-sm) !important;
    padding: 16px;
    margin-top: -2px;
}

#codplugin-checkout table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

#codplugin-checkout td {
    padding: 12px 10px !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: var(--cod-simple-text) !important;
    font-size: 14px;
}

#codplugin_count_number {
    display: inline-block;
    font-size: 12px;
    padding: 2px 7px;
    background: var(--cod-simple-primary) !important;
    border-radius: 4px;
    color: #ffffff;
    font-weight: 700;
}

#codplugin_count_number::before {
    content: 'x';
}

#codplugin_d_free span {
    display: inline-block;
    font-size: 13px;
    padding: 3px 10px;
    background: var(--cod-simple-primary) !important;
    border-radius: 50px !important;
    color: #ffffff;
    font-weight: 700;
}

.full-price td {
    font-weight: 800 !important;
    font-size: 16px !important;
    color: #047857 !important;
    padding-top: 14px !important;
}

/* Simple Shipping Methods - Stacked Rows (One Below the Other, No Outer Price) */
#shipping-methods {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 10px !important;
    width: 100% !important;
}

.cod-shipping-pill-btn {
    width: 100% !important;
    display: block !important;
    cursor: pointer !important;
    user-select: none !important;
    margin: 0 !important;
}

.cod-shipping-pill-btn input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

.cod-shipping-pill-content {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    width: 100% !important;
    background: #f8fafc !important;
    border: 1.5px solid var(--cod-simple-border-input) !important;
    border-radius: var(--cod-simple-radius-sm) !important;
    transition: all 0.2s ease !important;
}

.cod-shipping-pill-main {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.cod-shipping-pill-btn:hover .cod-shipping-pill-content {
    background: #ffffff !important;
    border-color: var(--cod-simple-primary) !important;
}

.cod-shipping-pill-btn input[type="radio"]:checked + .cod-shipping-pill-content {
    background: #ecfdf5 !important;
    border-color: var(--cod-simple-primary) !important;
}

.cod-shipping-pill-label {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--cod-simple-text) !important;
}

/* Simple Spinner Loader */
#codplugin_gif,
#cod-upsell-loader {
    display: none;
    margin: 14px auto;
    text-align: center;
}

.cod-liquid-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: #f8fafc;
    border: 1px solid var(--cod-simple-border);
    border-radius: 50px;
}

.cod-liquid-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid var(--cod-simple-primary);
    border-radius: 50%;
    animation: codSimpleSpin 0.7s linear infinite;
}

@keyframes codSimpleSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    #codplugin-checkout {
        padding: 20px 16px !important;
        margin: 10px auto !important;
    }
}