/**
 * Űrlapok - Frontend CSS
 */

/* Régi EPO (TM Extra Product Options) elrejtése, ha van új űrlap */
/* Ez biztosítja, hogy ha van új űrlap, akkor a régi EPO ne jelenjen meg */
.uf-wrapper ~ #tm-extra-product-options,
.uf-wrapper ~ .tm-extra-product-options,
body:has(.uf-wrapper) #tm-extra-product-options,
body:has(.uf-wrapper) .tm-extra-product-options,
body:has(.uf-wrapper) [data-epo-id] {
    display: none !important;
}

/* Wrapper - NINCS KERET */
.uf-wrapper {
    border: none !important;
    padding: 10px 5px !important;
    margin: 10px 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Mező */
.uf-field {
    margin-bottom: 6px !important;
}

.uf-field:last-child {
    margin-bottom: 0 !important;
}

/* Feltételes mező - MINDIG LÁTHATÓ */
.uf-conditional {
    display: block;
}

/* Címke */
.uf-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 3px !important;
    text-align: left;
}

.uf-req {
    color: #dc3545;
}

/* Select és Input - EGYFORMA MÉRET */
.uf-select,
.uf-input {
    width: 100% !important;
    padding: 8px 10px !important;
    font-size: 14px !important;
    line-height: 22px !important;
    color: #000 !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-sizing: border-box !important;
    height: 38px !important;
    font-family: inherit !important;
    vertical-align: middle !important;
    margin: 0 !important;
    display: block !important;
}

.uf-select {
    cursor: pointer;
    -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' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23000' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    padding-right: 30px !important;
}

.uf-input {
    /* Ugyanazok a stílusok, mint a select */
}

.uf-input:focus,
.uf-select:focus {
    outline: none;
    box-shadow: 0 0 0 1px #000;
}

.uf-pattern-hint {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}

/* Képfeltöltés */
.uf-images-field {
    border: 1px dashed #ccc;
    padding: 10px;
    border-radius: 4px;
    background: #fafafa;
}

.uf-images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.uf-images-preview:empty {
    margin-bottom: 0;
}

/* Kép item - FIX NÉGYZET */
.uf-image-item {
    position: relative;
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.uf-image-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: block;
}

.uf-image-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    padding: 0;
}

.uf-image-remove:hover {
    background: #c82333;
}

.uf-add-image-btn {
    padding: 8px 16px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: 0;
}

.uf-add-image-btn:hover {
    background: #333;
}

.uf-add-image-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.uf-images-hint {
    font-size: 11px;
    color: #666;
    margin-top: 8px;
}

.uf-uploading {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
    border-radius: 4px;
    font-size: 20px;
}

/* Hiba */
.uf-field.uf-error .uf-select,
.uf-field.uf-error .uf-input {
    border-color: #dc3545;
}

.uf-error-msg {
    color: #dc3545;
    font-size: 12px;
    margin-top: 3px;
}

/* Kosár képek - NÉGYZET */
.uf-cart-images {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.uf-cart-images img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .uf-wrapper {
        padding: 10px 5px !important;
    }
    
    .uf-select,
    .uf-input {
        font-size: 16px;
        padding: 10px;
        height: 44px;
        line-height: 24px; /* Ugyanaz mindkettőnél */
    }
    
    .uf-image-item {
        width: 60px;
        height: 60px;
    }
    
    .uf-image-item img {
        width: 60px;
        height: 60px;
    }
}
