/**
 * =======================================================
 * PakTrading Form (Final Clean B2B Layout)
 * =======================================================
 */
.paktrading-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: auto;
}

/* ===============================
   FORM CONTAINER
================================ */
.paktrading-form {
    max-width: 1140px;
    margin: 10px auto;
    padding: 20px;
    background: #f5f5f5;

    border-radius: 10px;
    font-family: inherit;
        border-radius: 5px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);

}


/* ===============================
   MAIN 2x2 GRID LAYOUT
================================ */
.paktrading-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap:20px;
    align-items: start;
}

/* Force correct layout positioning */
.paktrading-section:nth-child(1) { grid-column: 1; }
.paktrading-section:nth-child(2) { grid-column: 2; }
.paktrading-section:nth-child(3) { grid-column: 1; }
.paktrading-section:nth-child(4) { grid-column: 2; }


/* ===============================
   SECTION BLOCK
================================ */
.paktrading-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    
    background: #ffffff;
    padding: 18px 18px 22px;
    border-radius: 5px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.paktrading-section {
    transition: 0.2s;
}

.paktrading-section:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

/* ===============================
   HEADINGS
================================ */

.paktrading-form h3 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1a1a1a;
}
.paktrading-form h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 14px;
    color: #111;

    display: flex;
    align-items: center;
    gap: 8px;
}

.paktrading-form h3::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #db2d2f;
    border-radius: 1px;
}


/* ===============================
   FIELD WRAPPER
================================ */
.paktrading-field {
    display: flex;
    flex-direction: column;
}


/* ===============================
   LABELS
================================ */
.paktrading-field label {
    font-size: 13px;
    margin-bottom: 6px;
    color: #333;
    font-weight: 500;
}

/* Required star */
.paktrading-field .required {
    color: #db2d2f;
}


/* ===============================
   INPUTS (CONTROLLED)
================================ */
.paktrading-field input {
    /*width: 100% !important;*/
    /*padding: 10px 12px !important;*/
    /*border: 1px solid #ddd !important;*/
    /*border-radius: 6px !important;*/
    /*font-size: 14px !important;*/
    /*transition: 0.2s;*/
}

 /*Keep select mostly theme-controlled */
.paktrading-field select {
    /*width: 100%;*/
    /*font-size: 14px;*/
}

.paktrading-field input:hover {
    border-color: #bbb;
}
.select2-selection__rendered{
    color:#444 !important;
}

/* Hover state for the rendered selection area */
.select2-container .select2-selection:hover {
    background-color: #f0f0f0 !important; /* Light gray background on hover */
}

/* Change background and text color on hover for options */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #f0f0f0 !important; /* Hover background */
    color: #000 !important;              /* Hover text color */
}

/* ===============================
   FOCUS STATE
================================ */
.paktrading-field input:focus,
.paktrading-field select:focus {
    /*border-color: #db2d2f;*/
    /*outline: none;*/
    /*box-shadow: 0 0 0 2px rgba(219,45,47,0.1);*/
}
/* Select2 Focus */
.select2-container--focus .select2-selection {
    border-color: #333 !important;
}
.select2-error .select2-selection {
    border-color: #db2d2f !important;
}
/* ===============================
   BUTTON
================================ */
.paktrading-form button {
    margin-top: 24px;
    /*width: 200px;*/
    background: #db2d2f;
    color: #fff;
    border: none;
    /*padding: 12px;*/
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.paktrading-form button:hover {
    opacity: 0.9;
    background: #247AF9;
    color: #fff;
}
.paktrading-form button:focus {
    opacity: 0.9;
    background: #919191;
    color: #fff;
}


/* ===============================
   ERROR MESSAGE & INVALID FIELDS
   =============================== */
.paktrading-error {
    color: #d63638;
    font-size: 12px;
    margin-top: 4px;
}
.paktrading-invalid{
    border: 1px solid #db2d2f !important;
    background-color: #fff5f5 !important;
}
/* Optional smooth focus effect */
.paktrading-invalid:focus {
    box-shadow: 0 0 0 2px rgba(214,54,56,0.15) !important;
}

/* ===============================
   On Form Submit Wait Spinner
   =============================== */
#paktrading-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #ddd;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite, scale 0.3s ease;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   RESPONSIVE                               */
/* =========================================
   TABLET (<= 1024px)
   ========================================= */
@media (max-width: 1024px) {

    .paktrading-sections {
        grid-template-columns: 1fr; /* Single column */
        gap: 20px;
    }

    /**
     * Reset manual grid positioning
     * (IMPORTANT otherwise layout breaks)
     */
    .paktrading-section {
        grid-column: auto !important;
    }

}


/* =========================================
   MOBILE (<= 768px)
   ========================================= */
@media (max-width: 768px) {

    .paktrading-form {
        padding: 15px;
    }

    .paktrading-sections {
        gap: 18px;
    }

    /**
     * Make inputs more touch-friendly
     */
    .paktrading-field input,
    .paktrading-field select {
        font-size: 16px; /* prevents zoom on iOS */
    }

    /**
     * Full width button
     */
    .paktrading-form button {
        width: 100%;
    }

}


/* =========================================
   SMALL MOBILE (<= 480px)
   ========================================= */
@media (max-width: 480px) {

    .paktrading-form {
        padding: 12px;
        border-radius: 8px;
    }

    .paktrading-form h3 {
        font-size: 15px;
    }

}

.woocommerce-shipping-totals th {
    visibility:hidden;
    position: relative;
}

.woocommerce-shipping-totals th::after {
    content: "Shipping Charges";
    visibility: visible;
    position: absolute;
    left: 0;
}
/* Remove underline from shipping price */
.woocommerce-shipping-methods label {
    text-decoration: none !important;
}

/* Also target links inside just in case */
.woocommerce-shipping-methods label * {
    text-decoration: none !important;
}

/* ===============================
   LOCKED BILLING FIELDS (INPUTS)
================================ */
.woocommerce form .form-row input[readonly],
.woocommerce form .form-row textarea[readonly],
.woocommerce-checkout input[readonly],
.woocommerce-checkout textarea[readonly] {
    background: #f5f5f5 !important;
    color: #777 !important;
    border: 1px solid #ddd !important;
    cursor: not-allowed !important;
    pointer-events: none; /* KEY FIX */
}

/* Remove hover/focus effects */
.woocommerce form .form-row input[readonly]:focus,
.woocommerce form .form-row input[readonly]:hover {
    box-shadow: none !important;
    outline: none !important;
    border-color: #ddd !important;
}

/* ===============================
   SELECT2 DISABLED STYLE MATCH
================================ */
.select2-container--disabled .select2-selection {
    background-color: #f5f5f5 !important;
    color: #777 !important;
    border-color: #ddd !important;
    cursor: not-allowed;
}

/* Disable pointer interactions */
.select2-container--disabled {
    pointer-events: none;
    opacity: 1; /* keep visible but inactive */
}

/* ===============================
   OPTIONAL: LABEL STYLE
================================ */
.woocommerce form .form-row label {
    font-weight: 500;
}

/* Optional subtle indicator */
.locked-field label::after {
    content: " (locked)";
    font-size: 12px;
    color: #999;
}


/* ===============================
 Add Download Button on Cart Page
================================ */
#cart-pdf-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    background: #fff;
    /*border: 2px solid #000;*/
    padding: 6px 8px;
    /*border-radius: 6px;*/
    z-index: 10;
}

#cart-pdf-icon:hover {
    border: 2px solid #e0e0e0;
    border-radius: 4px;
}



