/* ================================================= */
/* ===== GLOBALNE STYLE I ZMIENNE CSS (ROOT) ===== */
/* ================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');



:root {
    --green-primary: #59B259;
    --green-dark: #388E3C;
    --green-light: #76C776;
    --white-background: #FFFFFF;
    --dark-grey-text: #292929
    --medium-grey-text: #4A5568;
    --border-color-light: #E2E8F0;
    --shadow-color-light: rgba(0, 0, 0, 0.05);
    --shadow-color-medium: rgba(0, 0, 0, 0.1);
    --full-black: #000000;
	  --field-color: #f0f0f0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark-grey-text);
    background-color: var(--light-grey-background); /* Zastosowanie nowego tła */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================================= */
/* ===== GŁÓWNY KONTENER I UKŁAD ===== */
/* ================================================= */

.wcm-ipricelist-hidden-field {
    display: none !important;
}

.wcm-ipricelist-form {
    margin: 40px auto;
    max-width: 1200px;
    padding: 30px;
    font-family: 'Inter', sans-serif;
    color: var(--dark-grey-text);
    position: relative;
    overflow-x: hidden;
    background-color: var(--white-background);
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow-color-light); /* Nowoczesny, delikatny cień */
}

/* ================================================= */
/* ===== NAGŁÓWEK FORMULARZA I OPIS ===== */
/* ================================================= */

.wcm-ipricelist-fields h2 {
    text-align: center;
    color: var(--green-primary);
    margin: 20px 0px;
    font-size: 1.8em; /* Większy nagłówek */
    text-transform: uppercase;
    font-weight: 500;
		word-spacing: 0.3em;
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
    position: relative;
}

.wcm-ipricelist-fields h2:after {
    content: '';
    display: block;
    width: 60px; /* Krótsza, bardziej nowoczesna linia */
    height: 4px;
    background: var(--green-primary);
    margin: 20px auto 0;
    border-radius: 2px;
}

.wcm-ipricelist-fields .wcm-ipricelist-description {
    text-align: center; /* Wyśrodkowany opis */
    color: var(--medium-grey-text);
    margin: 10px 20px 40px;
    line-height: 1.6;
    font-size: 0.7rem;
	  font-family: 'Lato', sans-serif;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ================================================= */
/* ===== STYLE PÓL FORMULARZA ===== */
/* ================================================= */
.wcm-ipricelist-field-vlook2d,
.wcm-ipricelist-field
{
    display: flex;
    flex-direction: column;
    margin-bottom: 5px !important;
}

.wcm-ipricelist-field label {
    font-weight: 400;
    margin-bottom: 15px !important;
    color: var(--dark-grey-text);
    font-size: 0.9em;
    font-family: 'Poppins', sans-serif;
    display: block;
}

.wcm-ipricelist-field input[type="text"],
.wcm-ipricelist-field input[type="number"],
.wcm-ipricelist-field input[type="email"],
.wcm-ipricelist-field select,
.wcm-ipricelist-field textarea {
    width: 100%;
    padding: 10px 20px;
	  margin-bottom: 10px !important;
    border: 2px solid var(--border-color-light);
    border-radius: 12px;
    font-size: 0.8rem !important;
    min-height: 50px;
    font-weight: 400;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background-color: var(--white-background);
	    font-family: 'Lato', sans-serif;
    color: var(--dark-grey-text);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
    /* Usunięto 'white-space: pre-wrap;' - będzie stosowane selektywnie */
    overflow-wrap: break-word;
    word-break: break-word;
}

.wcm-ipricelist-field select:active; {
	background-color: var(--field-color) !important;
}

.wcm-ipricelist-field input[type="text"]:focus,
.wcm-ipricelist-field input[type="number"]:focus,
.wcm-ipricelist-field input[type="email"]:focus,
.wcm-ipricelist-field select:focus,
.wcm-ipricelist-field textarea:focus {
    border-color: var(--green-primary);
    box-shadow: 0 0 0 4px rgba(89, 178, 89, 0.25), inset 0 2px 4px rgba(0,0,0,0.06);
    outline: none;
    background-color: var(--field-color) !important; 
}

.wcm-ipricelist-field select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.25em top 50%;
    background-size: 1rem auto;
    padding-right: 3.5em; /* Więcej miejsca na strzałkę i potencjalne zawijanie */
}

.wcm-ipricelist-field textarea {
    resize: vertical;
    min-height: 100px;
	  margin-bottom: 15px !important;
    white-space: pre-wrap; /* Stosowane tylko do textarea */
}

.wcm-ipricelist-field-vlook2d {
   margin-top: 15px !important;
}



.wcm-ipricelist-display-field,
.wcm-ipricelist-vlook1d-value,
.wcm-ipricelist-vlook2d-value,
.wcm-ipricelist-calculation-value {
    padding: 10px 20px;
    border: 2px solid #D1D5DB;
    border-radius: 12px;
    background-color: var(--field-color); 
    color: var(--dark-grey-text);
    font-size: 0.8em !important;
		font-weight: 400;
    font-family: 'Open Sans', sans-serif;
    min-height: 50px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    cursor: default;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* ================================================= */
/* ===== PRZYCISKI ===== */
/* ================================================= */

.wcm-ipricelist-send-quote-button,
.wcm-ipricelist-recalculate-button {
    display: block;
    width: 100%;
    max-width: 400px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--green-primary), var(--green-dark));
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.0em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 10px 20px rgba(89, 178, 89, 0.3);
    margin: 30px auto;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.wcm-ipricelist-send-quote-button:hover,
.wcm-ipricelist-recalculate-button:hover {
    background: linear-gradient(135deg, var(--green-light), var(--green-dark));
    box-shadow: 0 15px 30px rgba(89, 178, 89, 0.4);
    transform: translateY(-5px);
}

.wcm-ipricelist-send-quote-button:focus,
.wcm-ipricelist-recalculate-button:focus {
    background: var(--green-dark);
    box-shadow: inset 0 3px 8px rgba(0,0,0,0.4);
    transform: translateY(0);
}

/* ================================================= */
/* ===== KOMUNIKATY (SUCCESS/ERROR) ===== */
/* ================================================= */

#wcm-ipricelist-frontend-messages {
    margin-top: 30px;
    padding: 20px 25px;
    border-radius: 12px;
    display: none;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.6;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#wcm-ipricelist-frontend-messages.success {
    background-color: #E8F5E9;
    border: 1px solid #4CAF50;
    color: #2E7D32;
}

#wcm-ipricelist-frontend-messages.error {
    background-color: #FEE2E2;
    border: 1px solid #EF4444;
    color: #B91C1C;
}

/* ================================================= */
/* ===== GRUPY PÓL ===== */
/* ================================================= */

.wcm-ipricelist-group {
    border-radius: 12px;
    padding: 15px;
    margin: 25px 0;
    background-color: var(--white-background);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color-light);
}

.wcm-ipricelist-group-title {
    color: var(--full-black);
    text-align: left;
    font-size: 1.2em;
		padding-bottom: 10px;
		font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    border-bottom: 2px solid var(--white-background);
}

h3.wcm-ipricelist-group-title {
  color: var(--full-black);
}

/* === POLA CHECKBOX I POLA ZALEŻNE === */

.wcm-ipricelist-checkbox-group-container {
    width: 100%;
    flex-direction: column;
}

.wcm-ipricelist-field-checkbox {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.wcm-ipricelist-checkbox-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    margin: 0; !important;
    width: auto !important;
    line-height: 1.0 !important;
    font-size: 0.8em !important;
}

.wcm-ipricelist-checkbox-input {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border: 2px solid #a0a0a0;
    border-radius: 8px;
    appearance: none;
    background-color: var(--white-background);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.wcm-ipricelist-checkbox-input:checked {
  background-color: var(--green-primary) !important;
  border-color: var(--green-primary);
  box-shadow: 0 0 0 4px rgba(89, 178, 89, 0.25);
}

.wcm-ipricelist-checkbox-input:checked::before {
    content: '✓';
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.0em;
    line-height: 1;
    font-weight: 900;
}

.wcm-ipricelist-checkbox-input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(89, 178, 89, 0.25);
}

/* POLA ZALEŻNE */

.wcm-ipricelist-dependent-fields-wrapper {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    padding-left: 20px;
    transition: opacity 0.4s ease-out, max-height 0.4s ease-out;
    overflow: hidden;
}

.wcm-ipricelist-dependent-fields-wrapper.wcm-ipricelist-hidden-field {
    visibility: hidden !important;
    opacity: 0 !important;
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.wcm-ipricelist-dependent-fields-wrapper .wcm-ipricelist-field {
    margin: 0px !important;
    padding-top: 10px !important;
		font-size: 0.9em !important;
}

.wcm-ipricelist-dependent-fields-wrapper label {
   font-weight: 500;
   color: var(--medium-grey-text);
}

/* ================================================= */
/* ===== POLE PODSUMOWANIA (SUMMARY) ===== */
/* ================================================= */

/* ================================================= */
/* ===== POLE PODSUMOWANIA (SUMMARY) ===== */
/* ================================================= */

.wcm-ipricelist-summary-field {
    position: static;
    border-radius: 30px;
    width: 100%;
    background: var(--white-background);
    box-shadow: 0 -8px 25px rgba(76, 175, 80, 0.15);
    border: 2px solid var(--green-dark);
    padding: 20px 0;
    transition: all 0.3s ease-in-out;
}

.wcm-ipricelist-summary-field select {
    width: 100%;
    max-width: 100%;
    padding: 15px 30px;
    border: 2px solid var(--border-color-light);
    border-radius: 12px;
    font-size: 0.90rem;
    min-height: 50px;
    font-weight: 500;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background-color: var(--white-background);
    color: var(--dark-grey-text);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}


.wcm-ipricelist-summary-field .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 10px 50px 10px 50px;
    gap: 20px;
    width: 100%;
}

.wcm-ipricelist-summary-field .summary-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.wcm-ipricelist-summary-field .summary-right {
    display: flex;
    flex-direction: column; /* Zmiana na kolumnę dla lepszej responsywności */
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.wcm-ipricelist-summary-field .summary-net {
    font-size: 1.0em !important;
    color: var(--medium-grey-text);
    white-space: nowrap;
    text-align: center;
    display: block;
}

.wcm-ipricelist-summary-field .summary-net .net-value {
    font-weight: 600;
    color: var(--dark-grey-text);
}

.wcm-ipricelist-summary-field .summary-vat-rate {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 1.05em;
    margin: 0px !important;
}

.wcm-ipricelist-summary-field .wcm-summary-vat-select {
    margin: 5px !important;
    padding-bottom: 10px !important;
    padding-top: 5px !important;
}

.wcm-ipricelist-summary-field .wcm-summary-vat select {
    margin: 5px !important;
}

.wcm-ipricelist-summary-field .summary-vat-rate label {
    font-weight: 500;
    color: var(--dark-grey-text);
    white-space: nowrap;
    margin: 0px !important;
    padding: 4px !important;
}

.wcm-ipricelist-summary-field .summary-gross {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 1.2em;
    font-weight: 700;
    color: var(--dark-grey-text);
    text-align: center;
}

.wcm-ipricelist-summary-field .summary-gross strong,
.wcm-ipricelist-summary-field .summary-gross .gross-value {
    display: inline-block;
    margin: 0px !important;
    line-height: 1.2;
}

.wcm-ipricelist-summary-field .summary-gross .gross-value {
    font-size: 1.6em !important;
    font-weight: 900;
    color: var(--green-primary);
    text-shadow: 1px 1px 5px rgba(0,0,0,0.15);
}

/* ================================================= */
/* ===== POLE FINANSOWANIA (FINANCING) v1.22 ===== */
/* ================================================= */

/* Główny kontener pola - dopasowany do responsywności Summary */
.wcm-ipricelist-financing-field {
    padding: 20px;
    border: 1px solid var(--border-color-light);
    border-radius: 20px; /* Dopasowanie do Summary */
    background-color: var(--white-background);
    margin-top: 15px !important;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

/* ================================================= */
/* ===== NOWA SCALONA GRUPA (FINANCING + SUMMARY) ===== */
/* ================================================= */

/* 1. Nowy wrapper przejmuje style z .wcm-ipricelist-summary-field */
.wcm-ipricelist-finance-summary-group {
    position: static;
    border-radius: 30px;
    width: 100%;
    background: var(--white-background);
    box-shadow: 0 -8px 25px rgba(76, 175, 80, 0.15);
    border: 2px solid var(--green-dark);
    transition: all 0.3s ease-in-out;
    margin-top: 25px; /* Zachowaj odstęp od pól powyżej */
    overflow: hidden; /* Kluczowe dla zaokrąglonych rogów */
}

/* 2. Resetujemy styl .wcm-ipricelist-financing-field WEWNĄTRZ grupy */
.wcm-ipricelist-finance-summary-group .wcm-ipricelist-financing-field {
    border: none;
    box-shadow: none;
    margin-top: 0 !important; /* Usuń domyślny margines */
    border-radius: 0;
    background: none;
    padding-bottom: 0; /* Zmniejsz odstęp do podsumowania */
}

/* 3. Resetujemy styl .wcm-ipricelist-summary-field WEWNĄTRZ grupy */
.wcm-ipricelist-finance-summary-group .wcm-ipricelist-summary-field {
    border: none;
    box-shadow: none;
    margin: 0;
    border-radius: 0;
    background: none;
    padding-top: 0; /* Usuń górny padding, aby połączyć się z finansowaniem */
}

/* 4. Poprawka dla responsywności (mobile) */
@media (max-width: 768px) {
    .wcm-ipricelist-finance-summary-group {
         border-radius: 20px;
         margin-top: 20px;
    }
    
    .wcm-ipricelist-finance-summary-group .wcm-ipricelist-financing-field {
        padding: 15px 15px 0; /* Mniejszy padding na mobile */
    }
    
    .wcm-ipricelist-finance-summary-group .wcm-ipricelist-summary-field {
        padding-bottom: 0;
    }
}

/* ================================================= */
/* ===== SEKCJA WYSYŁKI E-MAIL ===== */
/* ================================================= */

.wcm-ipricelist-email-quote-section {
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    margin: 60px auto;
    padding: 40px;
    background: var(--white-background);
    border: 1px solid var(--border-color-light);
}

.wcm-ipricelist-email-quote-section h3 {
    color: var(--dark-grey-text);
    font-size: 1.5em;
		font-family: 'Open Sans', sans-serif;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 800;
}

.wcm-ipricelist-email-quote-section p {
    margin-bottom: 12px;
    font-size: 0.9em;
	font-family: 'Poppins', sans-serif;

    color: var(--medium-grey-text);
}

.wcm-ipricelist-email-quote-section textarea,
.wcm-ipricelist-email-quote-section input[type="text"],
.wcm-ipricelist-email-quote-section input[type="email"]
{
    width: 100%;
    max-width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-color-light);
    border-radius: 12px;
    font-size: 0.90rem;
    min-height: 50px;
    font-weight: 500;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background-color: var(--white-background);
    color: var(--dark-grey-text);
    resize: vertical;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
		font-family: 'Lato', sans-serif;

}

.wcm-ipricelist-email-quote-section textarea:focus,
.wcm-ipricelist-email-quote-section input[type="text"]:focus,
.wcm-ipricelist-email-quote-section input[type="email"]:focus
{
    background-color: var(--field-color) !important; 
}


.wcm-ipricelist-email-quote-section p.description {
    font-size: 0.6em;
    color: #888888;
    margin-top: -10px;
    line-height: 1.0;
    margin-bottom: 30px;
}

.wcm-ipricelist-email-quote-section .wcm-ipricelist-field {
    margin-bottom: 20px;
}

.wcm-ipricelist-email-quote-section .button-primary {
    display: block;
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--green-primary), var(--green-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(89, 178, 89, 0.2);
}

.wcm-ipricelist-email-quote-section .button-primary:hover {
    background: #eeeeee;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(89, 178, 89, 0.3);
}

.wcm-ipricelist-email-quote-section .button-primary:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#wcm-ipricelist-email-quote-messages {
    margin-bottom: 20px;
}

.wcm-ipricelist-error,
.wcm-ipricelist-success {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.wcm-ipricelist-error.show,
.wcm-ipricelist-success.show {
    opacity: 1;
    transform: translateY(0);
}

.wcm-ipricelist-error {
    background-color: #FEE2E2;
    color: #B91C1C;
    border: 1px solid #EF4444;
}

.wcm-ipricelist-success {
    background-color: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #4CAF50;
}

/* ================================================= */
/* ===== STYLE DLA EKRANU ŁADOWANIA ===== */
/* ================================================= */

.wcm-ipricelist-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(240, 242, 245, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease-out;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.wcm-ipricelist-loading-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.wcm-ipricelist-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    padding: 30px;
    background-color: var(--white-background);
    border-radius: 15px;
    box-shadow: 0 10px 40px var(--shadow-color-light);
    position: relative;
}

.wcm-ipricelist-spinner-container {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcm-ipricelist-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(89, 178, 89, 0.2);
    border-top: 6px solid var(--green-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.wcm-ipricelist-spinner-logo {
    width: 40px;
    height: auto;
    z-index: 1;
	background-image: url("https://wecanmore.com.pl/wp-content/uploads/2025/09/iPricelist-WCM-logo-kolo-SVG-300x300-1.svg");
    background-size: contain;   /* dopasowanie obrazka */
    background-repeat: no-repeat;
    background-position: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wcm-ipricelist-loading-text {
    font-weight: 700;
    color: var(--dark-grey-text);
    font-size: 1.5em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ================================================= */
/* ===== MEDIA QUERIES (RESPONSYWNOŚĆ) ===== */
/* ================================================= */

@media (max-width: 1024px) {
    .wcm-ipricelist-form {
        margin: 30px auto;
        padding: 25px;
        border-radius: 15px;
    }

    .wcm-ipricelist-fields h2 {
        font-size: 1.6em;
    }

    .wcm-ipricelist-summary-field .summary-row {
        padding: 15px 30px;
    }

    .wcm-ipricelist-email-quote-section {
        padding: 30px;
        margin: 40px auto;
    }
}

/* ================================================= */
/* ===== URZĄDZENIA MOBILNE (do 768px) ===== */
/* ================================================= */

@media (max-width: 768px) {
    body {
        /* Lepsze renderowanie czcionek na mobile */
        -webkit-text-size-adjust: 100%;
    }
    
    .wcm-ipricelist-form {
        margin: 20px 15px; /* Mniejsze marginesy na zewnątrz */
        padding: 20px; /* Mniejszy padding wewnątrz */
        border-radius: 10px;
        box-shadow: 0 5px 25px var(--shadow-color-light);
    }

    .wcm-ipricelist-fields h2 {
        font-size: 1.4em;
        margin: 15px 0;
        word-spacing: 0.1em;
    }

    .wcm-ipricelist-fields h2:after {
        margin-top: 15px;
        width: 50px;
        height: 3px;
    }

    .wcm-ipricelist-fields .wcm-ipricelist-description {
        font-size: 0.8rem;
        margin: 10px 10px 30px;
    }

    .wcm-ipricelist-field input[type="text"],
    .wcm-ipricelist-field input[type="number"],
    .wcm-ipricelist-field input[type="email"],
    .wcm-ipricelist-field select,
    .wcm-ipricelist-field textarea,
    .wcm-ipricelist-display-field,
    .wcm-ipricelist-vlook1d-value,
    .wcm-ipricelist-vlook2d-value,
    .wcm-ipricelist-calculation-value {
        font-size: 1rem !important; /* Zwiększenie czcionki w polach dla lepszej czytelności na mobile */
    }

    /* === Kluczowe zmiany w sekcji podsumowania === */

    .wcm-ipricelist-summary-field {
        border-radius: 20px;
        padding: 15px 0;
        box-shadow: 0 -5px 20px rgba(76, 175, 80, 0.1);
    }

    .wcm-ipricelist-summary-field .summary-row {
        flex-direction: column; /* Zmiana na układ pionowy */
        align-items: center; /* Wyśrodkowanie elementów w kolumnie */
        padding: 15px 20px;
        gap: 15px; /* Odstęp między elementami w kolumnie */
    }

    .wcm-ipricelist-summary-field .summary-left,
    .wcm-ipricelist-summary-field .summary-right {
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .wcm-ipricelist-summary-field .summary-vat-rate {
        flex-direction: column; /* Stawka VAT również w kolumnie */
        gap: 10px;
        margin-bottom: 10px !important;
        width: 100%;
    }
    
    .wcm-ipricelist-summary-field select {
        text-align: center;
    }

    .wcm-ipricelist-summary-field .summary-gross .gross-value {
        font-size: 1.5em !important;
    }

    /* === Sekcja Email === */
    .wcm-ipricelist-email-quote-section {
        margin: 40px 0; /* Usunięcie marginesów bocznych */
        padding: 25px 20px;
        border-radius: 10px;
    }

    .wcm-ipricelist-email-quote-section h3 {
        font-size: 1.3em;
    }
    
    /* === Przyciski === */
    .wcm-ipricelist-send-quote-button,
    .wcm-ipricelist-recalculate-button {
         padding: 12px 20px;
         font-size: 0.9em;
         border-radius: 12px;
         margin: 20px auto;
    }

    /* === Grupy pól === */
    .wcm-ipricelist-group {
        padding: 15px;
    }
    
    .wcm-ipricelist-dependent-fields-wrapper {
        padding-left: 10px;
    }
}


/* ================================================= */
/* ===== BARDZO MAŁE EKRANY (do 480px) ===== */
/* ================================================= */

@media (max-width: 480px) {
    .wcm-ipricelist-form {
        margin: 15px 10px;
        padding: 15px;
    }

    .wcm-ipricelist-fields h2 {
        font-size: 1.3em;
    }

    .wcm-ipricelist-summary-field .summary-row {
        padding: 10px 15px;
    }
    
    .wcm-ipricelist-summary-field .summary-net,
    .wcm-ipricelist-summary-field .summary-vat-rate label {
        font-size: 0.9em !important;
    }
    
    .wcm-ipricelist-summary-field .summary-gross {
        font-size: 1.1em;
    }
    
    .wcm-ipricelist-summary-field .summary-gross .gross-value {
        font-size: 1.4em !important;
    }

    .wcm-ipricelist-email-quote-section {
        padding: 20px 15px;
    }
    
    #wcm-ipricelist-frontend-messages {
        padding: 15px;
        font-size: 1em;
    }
}


/* POPRAWKA v1.21: Bardziej specyficzny selektor, aby wymusić zawijanie tekstu */
.wcm-ipricelist-financing-field .wcm-financing-method-select,
.wcm-ipricelist-financing-field .wcm-financing-plan-select,
.wcm-ipricelist-financing-field .wcm-financing-plan-select-partial {
    white-space: normal; /* Pozwala na zawijanie tekstu */
    height: auto; /* Automatyczna wysokość dopasowana do treści */
    line-height: 1.4; /* Lepsza czytelność wieloliniowa */
    padding-top: 12px;
    padding-bottom: 12px;
}

/* Główne pole wyboru (Gotówka / Raty / Częściowe) */
.wcm-ipricelist-financing-field .wcm-financing-method-select {
    font-weight: 600;
    font-size: 0.9em !important;
    border-width: 2px;
}

/* Kontenery dla opcji (całościowe i częściowe) - styl "Card" */
.wcm-ipricelist-financing-field .wcm-financing-installments-container,
.wcm-ipricelist-financing-field .wcm-financing-partial-container {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid var(--border-color-light); /* Lżejsza ramka */
    background-color: #fcfdff; /* Subtelne tło */
    border-radius: 12px; /* Większe zaokrąglenie */
    border-top: 3px solid var(--green-primary); /* Górny akcent */
    transition: all 0.4s ease-in-out; 
}

/* Etykiety wewnątrz kart */
.wcm-ipricelist-financing-field .wcm-financing-plan-container,
.wcm-ipricelist-financing-field .wcm-financing-cash-input-container {
    margin-bottom: 25px; /* Odstęp między inputami a wynikami */
}

.wcm-ipricelist-financing-field .wcm-financing-plan-label,
.wcm-ipricelist-financing-field .wcm-financing-cash-label {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--dark-grey-text);
    display: block;
    margin-bottom: 8px;
}

/* --- NOWOŚĆ v1.22: Style dla jednostki (waluty) --- */

/* 1. Wrapper dla pola input i jednostki */
.wcm-ipricelist-financing-field .wcm-financing-input-with-unit {
    position: relative; /* Kluczowe dla pozycjonowania jednostki */
}

/* 2. Jednostka (np. PLN) */
.wcm-ipricelist-financing-field .wcm-financing-input-unit {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 1.5em; /* Odstęp od prawej krawędzi */
    font-size: 1em; /* Rozmiar jak tekst w polu */
    font-weight: 600;
    color: var(--medium-grey-text);
    pointer-events: none; /* Pozwala klikać "przez" jednostkę */
}

/* 3. Modyfikacja pola input wpłaty gotówkowej */
.wcm-ipricelist-financing-field .wcm-financing-cash-input {
    /* POPRAWKA v1.21: Dodanie !important, aby nadpisać globalny skrypt JS */
    width: 100% !important; 
    box-sizing: border-box; 
    
    /* NOWOŚĆ v1.22: Dodanie miejsca po prawej na jednostkę */
    padding-right: 5em !important; /* np. 4em dla 'PLN' + 1em marginesu */
    
    /* Istniejące style */
    font-size: 1.1em !important;
    font-weight: 700;
    color: var(--green-dark);
    border-color: var(--green-primary);
    min-height: 50px; 
}

.wcm-ipricelist-financing-field .wcm-financing-cash-input:focus {
     border-color: var(--green-dark);
     box-shadow: 0 0 0 4px rgba(89, 178, 89, 0.25), inset 0 2px 4px rgba(0,0,0,0.06);
}

/* ----- Style dla pól wyników (KPI Boxes) ----- */

/* Wspólny styl dla wszystkich boksów z wynikami */
.wcm-ipricelist-financing-field .wcm-financing-installments-count-container,
.wcm-ipricelist-financing-field .wcm-financing-installment-amount-container,
.wcm-ipricelist-financing-field .wcm-financing-financed-amount-container,
.wcm-ipricelist-financing-field .wcm-financing-installments-count-partial-container,
.wcm-ipricelist-financing-field .wcm-financing-installment-amount-partial-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--field-color);
    border-radius: 8px;
    margin-top: 10px;
    border-left: 5px solid var(--green-primary);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

/* Etykieta wyniku (np. "Ilość rat:") */
.wcm-ipricelist-financing-field .wcm-financing-label {
    font-size: 0.85em;
    font-weight: 500;
    color: var(--medium-grey-text);
    transition: all 0.3s ease;
}

/* Obliczona wartość (np. "12") */
.wcm-ipricelist-financing-field .wcm-financing-installments-count-value,
.wcm-ipricelist-financing-field .wcm-financing-installment-amount-value,
.wcm-ipricelist-financing-field .wcm-financing-financed-amount-value,
.wcm-ipricelist-financing-field .wcm-financing-installments-count-partial-value,
.wcm-ipricelist-financing-field .wcm-financing-installment-amount-partial-value {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--dark-grey-text);
    transition: all 0.3s ease;
}

/* SPECJALNE WYRÓŻNIENIE dla finalnej wysokości raty */
.wcm-ipricelist-financing-field .wcm-financing-installment-amount-container,
.wcm-ipricelist-financing-field .wcm-financing-installment-amount-partial-container {
     background-color: #e8f5e9; 
     border-left-color: var(--green-dark);
}

.wcm-ipricelist-financing-field .wcm-financing-installment-amount-value,
.wcm-ipricelist-financing-field .wcm-financing-installment-amount-partial-value {
    color: var(--green-dark);
    font-weight: 800;
    font-size: 1.4em; /* Mocno wyróżniona kwota raty */
}


/* ================================================= */
/* ===== RESPONSYWNOŚĆ POLA FINANSOWANIA v1.22 ===== */
/* ================================================= */

@media (max-width: 768px) {
    
    /* Dopasowanie głównego kontenera do Summary */
    .wcm-ipricelist-financing-field {
        padding: 15px;
        border-radius: 20px; /* Identyczny radius jak Summary na mobile */
    }

    /* Mniejszy padding na kartach wewnętrznych */
    .wcm-ipricelist-financing-field .wcm-financing-installments-container,
    .wcm-ipricelist-financing-field .wcm-financing-partial-container {
        padding: 15px;
    }
    
    /* KLUCZOWA ZMIANA: Układ KPI Boxów na mobilny
      Naśladuje zachowanie .summary-row 
    */
    .wcm-ipricelist-financing-field .wcm-financing-installments-count-container,
    .wcm-ipricelist-financing-field .wcm-financing-installment-amount-container,
    .wcm-ipricelist-financing-field .wcm-financing-financed-amount-container,
    .wcm-ipricelist-financing-field .wcm-financing-installments-count-partial-container,
    .wcm-ipricelist-financing-field .wcm-financing-installment-amount-partial-container {
        flex-direction: column; /* Stosuj elementy pionowo */
        align-items: center;  /* Wyśrodkuj (jak Summary) */
        gap: 5px;               /* Mały odstęp między etykietą a wartością */
        padding: 12px;
        border-left: none;      /* Usuń boczny akcent */
        border-top: 4px solid var(--green-primary); /* Dodaj górny akcent */
        text-align: center;
    }
    
    /* Mniejsza etykieta na mobile */
    .wcm-ipricelist-financing-field .wcm-financing-label {
        font-size: 0.8em;
    }
    
    /* Lekko większa czcionka wartości dla czytelności */
    .wcm-ipricelist-financing-field .wcm-financing-installments-count-value,
    .wcm-ipricelist-financing-field .wcm-financing-financed-amount-value,
    .wcm-ipricelist-financing-field .wcm-financing-installments-count-partial-value {
        font-size: 1.2em;
    }

    /* Wyróżniona rata na mobile */
    .wcm-ipricelist-financing-field .wcm-financing-installment-amount-container,
    .wcm-ipricelist-financing-field .wcm-financing-installment-amount-partial-container {
        border-top-color: var(--green-dark); /* Ciemniejszy górny akcent */
    }

    .wcm-ipricelist-financing-field .wcm-financing-installment-amount-value,
    .wcm-ipricelist-financing-field .wcm-financing-installment-amount-partial-value {
        font-size: 1.5em; /* Zachowaj dużą, czytelną kwotę raty */
    }
    
    /* NOWOŚĆ v1.22: Dostosowanie jednostki na mobile */
    .wcm-ipricelist-financing-field .wcm-financing-input-unit {
        right: 1.2em;
        font-size: 0.9em;
    }
    
    .wcm-ipricelist-financing-field .wcm-financing-cash-input {
         padding-right: 4.5em !important; /* Mniej miejsca na mniejszą czcionkę */
    }
}
