/**
 * NGW - WooCommerce egyedi pénztár mezők - Public CSS
 * 
 * @package NGWWCCUFI
 * @since 1.0.0
 */

/* Belépett felhasználó vásárló típus mező stílusai */
.ngwwccufi-field select.disabled {
    background-color: #f7f7f7;
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

.ngwwccufi-field select.disabled:focus {
    border-color: #ddd;
    box-shadow: none;
}



/* Egyedi mezők szekciók */
.ngwwccufi-custom-fields-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Mezők stílusok */
.ngwwccufi-field {
    margin-bottom: 15px;
}

.ngwwccufi-field input[type="text"],
.ngwwccufi-field input[type="email"],
.ngwwccufi-field input[type="tel"],
.ngwwccufi-field input[type="number"],
.ngwwccufi-field input[type="url"],
.ngwwccufi-field input[type="date"],
.ngwwccufi-field select,
.ngwwccufi-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.ngwwccufi-field input[type="checkbox"],
.ngwwccufi-field input[type="radio"] {
    margin-right: 8px;
}

.ngwwccufi-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.ngwwccufi-field .description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Kötelező mezők jelölése */
.ngwwccufi-field .required {
    color: #e2401c;
}

/* Mezők sorrendje prioritás szerint */
.ngwwccufi-custom-fields-section .form-row {
    display: block;
    width: 100%;
    margin-bottom: 15px;
}

/* Rendelés admin oldal stílusok */
.ngwwccufi-admin-order-fields {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ngwwccufi-admin-order-fields h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #23282d;
    font-size: 14px;
    font-weight: 600;
}

.ngwwccufi-admin-order-fields table {
    width: 100%;
    border-collapse: collapse;
}

.ngwwccufi-admin-order-fields th,
.ngwwccufi-admin-order-fields td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #f1f1f1;
}

.ngwwccufi-admin-order-fields th {
    background: #f9f9f9;
    font-weight: 600;
}

/* Rendelés részletek oldal stílusok (vásárlói oldal) */
.ngwwccufi-order-details-fields {
    margin: 0;
}

.ngwwccufi-order-details-fields h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--general-text-color, #000) !important;
    font-size: 18px;
    font-weight: 600;
}

/* WooCommerce order details szekció stílusok */
.woocommerce-order-details h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--general-text-color, #000) !important;
    font-size: 18px;
    font-weight: 600;
}

.ngwwccufi-fields-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.ngwwccufi-fields-table th,
.ngwwccufi-fields-table td {
    text-align: left !important;
    border-bottom: 1px solid #ddd !important;
    color: var(--general-text-color, #000) !important;
}

.ngwwccufi-fields-table th {
    background: transparent !important;
    font-weight: 600 !important;
    width: 30% !important;
}

.ngwwccufi-fields-table td {
    background: transparent !important;
}

/* WooCommerce osztályok felülírása */
.woocommerce-table.ngwwccufi-fields-table th,
.woocommerce-table.ngwwccufi-fields-table td {
    background: transparent !important;
    color: var(--general-text-color, #000) !important;
}

.shop_table.ngwwccufi-fields-table th,
.shop_table.ngwwccufi-fields-table td {
    background: transparent !important;
    color: var(--general-text-color, #000) !important;
}

/* Validáció stílusok - WooCommerce mezők osztályait használjuk */
.woocommerce form .form-row input.ngwwccufi-field-error,
.woocommerce form .form-row textarea.ngwwccufi-field-error,
.woocommerce form .form-row select.ngwwccufi-field-error {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
}

.ngwwccufi-field-error-message {
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    font-style: italic;
}

.woocommerce form .form-row input.ngwwccufi-error-min-length,
.woocommerce form .form-row textarea.ngwwccufi-error-min-length,
.woocommerce form .form-row select.ngwwccufi-error-min-length {
    border-color: #ffb900 !important;
    box-shadow: 0 0 0 1px #ffb900 !important;
}

.woocommerce form .form-row input.ngwwccufi-error-max-length,
.woocommerce form .form-row textarea.ngwwccufi-error-max-length,
.woocommerce form .form-row select.ngwwccufi-error-max-length {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
}

/* Formázási maszk stílusok */
.woocommerce form .form-row input[data-format-mask] {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* Automatikus nagybetűsítés stílus */
.woocommerce form .form-row input[data-auto-uppercase] {
    text-transform: uppercase;
}

/* Rejtett mezők stílusa */
.ngwwccufi-hidden {
    display: none !important;
}


/* Kötelező mezők "(nem kötelező)" felirat elrejtése */
.ngwwccufi-field[required] + .woocommerce-input-wrapper label .optional,
.ngwwccufi-field.validate-required + .woocommerce-input-wrapper label .optional,
.form-row:has(.ngwwccufi-field[required]) label .optional,
.form-row:has(.ngwwccufi-field.validate-required) label .optional,
/* Erősebb szabályok */
[id^="ngwwccufi_"][required] ~ .woocommerce-input-wrapper label .optional,
[id^="ngwwccufi_"].validate-required ~ .woocommerce-input-wrapper label .optional,
.form-row:has([id^="ngwwccufi_"][required]) label .optional,
.form-row:has([id^="ngwwccufi_"].validate-required) label .optional,
/* Még erősebb - minden ngwwccufi mezőnél */
.form-row:has([id^="ngwwccufi_"]) label .optional {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .ngwwccufi-custom-fields-section {
        margin: 15px 0;
        padding: 10px;
    }
    
    .ngwwccufi-field input[type="text"],
    .ngwwccufi-field input[type="email"],
    .ngwwccufi-field input[type="tel"],
    .ngwwccufi-field input[type="number"],
    .ngwwccufi-field input[type="url"],
    .ngwwccufi-field input[type="date"],
    .ngwwccufi-field select,
    .ngwwccufi-field textarea {
        font-size: 16px; /* Mobil optimalizálás */
    }
    
    .ngwwccufi-order-details-fields {
        margin: 20px 0;
        padding: 15px;
    }
    
    .ngwwccufi-fields-table th,
    .ngwwccufi-fields-table td {
        padding: 8px;
        font-size: 14px;
    }
    
    .ngwwccufi-fields-table th {
        width: 40%;
    }
}

/* Billing details mezők margó nélkül - teljesen eltávolítjuk a hézagokat */
[class*="woocommerce-customer-details--"] {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    font-size: inherit !important;
}

/* Teljesen eltávolítjuk a hézagokat a details mezők között */
.woocommerce-customer-details p[class*="woocommerce-customer-details--"] {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    font-size: inherit !important;
}

/* Address elemben lévő details mezők */
address p[class*="woocommerce-customer-details--"] {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    font-size: inherit !important;
}

/* Köszönő oldal számlázási adatok kompakt megjelenítés */
.woocommerce-order address p[class*="woocommerce-customer-details--"] {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    font-size: inherit !important;
}

/* Első details elem felett kis margó */
.woocommerce-order address p[class*="woocommerce-customer-details--"]:first-of-type {
    margin-top: 8px !important;
}

/* Before értékek eltávolítása minden details mezőből */
.woocommerce-customer-details--custom::before,
.woocommerce-customer-details--phone::before,
.woocommerce-customer-details--email::before,
address p[class*="woocommerce-customer-details--"]::before {
    content: none !important;
    display: none !important;
}

/* Custom mezők formázása - margók eltávolítása */
.woocommerce-customer-details--custom {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    font-size: inherit !important;
    display: inline !important;
}

/* Custom mezők közötti térköz eltávolítása */
.woocommerce-customer-details--custom + .woocommerce-customer-details--custom {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Custom mezők és <br> tag-ek közötti térköz eltávolítása */
.woocommerce-customer-details--custom + br,
br + .woocommerce-customer-details--custom {
    margin: 0 !important;
    line-height: 1.2 !important;
}
