/* === Easy WC Returns - Form Styles === */
/* Dopasowany do stylu WooCommerce My Account */

/* Główny wrapper formularza */
.itewr-return-form-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 10px 0;
}

.itewr-return-form-wrapper h2 {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid #ddd;
    font-size: 1.35em;
    color: #333;
}

/* ============================================
   TABELA PRODUKTÓW
   ============================================ */
.itewr-products-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-bottom: 0;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* Nagłówek tabeli */
.itewr-products-table thead {
    background: #f0f0f0;
    background: linear-gradient(to bottom, #f8f8f8, #f0f0f0);
    border-bottom: 2px solid #d0d0d0;
}

.itewr-products-table thead th {
    padding: 14px 16px;
    font-size: 0.92em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #555;
    text-align: left;
    border-bottom: none;
}

/* Wiersze produktów */
.itewr-products-table tbody tr {
    transition: background-color 0.15s ease;
}

.itewr-products-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.itewr-products-table tbody tr:hover {
    background-color: #f4f8fb;
}

.itewr-products-table tbody td {
    padding: 16px 16px;
    vertical-align: middle;
    border-top: 1px solid #e8e8e8;
}

.itewr-products-table tbody tr:first-child td {
    border-top: none;
}

/* Nazwa produktu */
.itewr-product-name {
    font-weight: 500;
    color: #2c2c2c;
    font-size: 1em;
}

/* Ilość — blok z inputem */
.itewr-product-qty {
    width: 190px;
}

.itewr-qty-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.itewr-qty-input {
    width: 80px !important;
    height: 40px !important;
    padding: 8px 6px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 1em !important;
    font-weight: 500 !important;
    text-align: center !important;
    background-color: #fff !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07) !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    -moz-appearance: textfield !important;
}

.itewr-qty-input::-webkit-inner-spin-button,
.itewr-qty-input::-webkit-outer-spin-button {
    opacity: 1;
    height: 32px;
    cursor: pointer;
}

.itewr-qty-input:focus {
    border-color: #7a9c59 !important;
    box-shadow: 0 0 0 2px rgba(122, 156, 89, 0.2), inset 0 1px 2px rgba(0,0,0,0.07) !important;
    outline: none !important;
}

.itewr-qty-max {
    font-size: 0.88em;
    color: #888;
    white-space: nowrap;
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 3px;
    border: 1px solid #e0e0e0;
    font-weight: 500;
}

/* ============================================
   POLA NIESTANDARDOWE (Dodatkowe informacje)
   ============================================ */
.itewr-custom-fields-container {
    margin-top: 40px;
    margin-bottom: 30px;
    padding: 24px 28px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.itewr-custom-fields-container h3 {
    margin: 0 0 20px 0;
    padding-bottom: 14px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1.1em;
    color: #444;
    font-weight: 600;
}

/* Wiersz pola */
.itewr-field-row {
    margin-bottom: 18px !important;
    padding: 0 !important;
}

.itewr-field-label {
    display: block !important;
    margin-bottom: 6px !important;
    font-weight: 600 !important;
    color: #333 !important;
    font-size: 0.92em;
    line-height: 1.4;
}

.itewr-field-label .required {
    color: #e2401c;
    font-weight: 700;
    text-decoration: none;
}

/* Input text */
.itewr-field-input {
    width: 100% !important;
    max-width: 480px !important;
    height: 42px !important;
    padding: 8px 14px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 0.95em !important;
    background-color: #fff !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06) !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.itewr-field-input:focus {
    border-color: #7a9c59 !important;
    box-shadow: 0 0 0 2px rgba(122, 156, 89, 0.2) !important;
    outline: none !important;
}

/* Textarea */
.itewr-field-textarea {
    width: 100% !important;
    max-width: 480px !important;
    padding: 10px 14px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 0.95em !important;
    background-color: #fff !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06) !important;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.itewr-field-textarea:focus {
    border-color: #7a9c59 !important;
    box-shadow: 0 0 0 2px rgba(122, 156, 89, 0.2) !important;
    outline: none !important;
}

/* Select */
.itewr-field-select {
    width: 100% !important;
    max-width: 480px !important;
    height: 42px !important;
    padding: 0 36px 0 14px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 0.95em !important;
    background-color: #fff !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06) !important;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.itewr-field-select:focus {
    border-color: #7a9c59 !important;
    box-shadow: 0 0 0 2px rgba(122, 156, 89, 0.2) !important;
    outline: none !important;
}

/* Radio buttons */
.itewr-radio-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0;
}

.itewr-radio-label {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-weight: normal !important;
    font-size: 0.95em;
    padding: 7px 10px;
    margin: 0 !important;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.itewr-radio-label:hover {
    background-color: #f0f0f0;
}

.itewr-radio-label input[type="radio"] {
    margin: 0 !important;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #7a9c59;
}

/* Checkbox */
.itewr-checkbox-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0;
}

.itewr-checkbox-label {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-weight: normal !important;
    font-size: 0.95em;
    padding: 7px 10px;
    margin: 0 !important;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.itewr-checkbox-label:hover {
    background-color: #f0f0f0;
}

.itewr-checkbox-label input[type="checkbox"] {
    margin: 0 !important;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #7a9c59;
}

/* ============================================
   PRZYCISK SUBMIT
   ============================================ */
.itewr-submit-wrapper {
    margin-top: 30px !important;
    padding: 0 !important;
    text-align: left;
}

.itewr-submit-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    padding: 14px 36px !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.itewr-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.itewr-submit-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* ============================================
   RESPONSYWNOŚĆ
   ============================================ */
@media (max-width: 768px) {
    .itewr-return-form-wrapper {
        padding: 5px 0;
    }

    /* Tabela → karty */
    .itewr-products-table,
    .itewr-products-table tbody,
    .itewr-products-table tr,
    .itewr-products-table td {
        display: block;
    }

    .itewr-products-table {
        border-radius: 4px;
        box-shadow: none;
        border: none;
    }

    .itewr-products-table thead {
        display: none;
    }

    .itewr-products-table tbody tr {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 14px 16px;
        margin-bottom: 10px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    .itewr-products-table tbody tr:nth-child(even) {
        background: #fff;
    }

    .itewr-products-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border: none;
    }

    .itewr-product-name::before,
    .itewr-product-qty::before {
        content: attr(data-title);
        font-weight: 600;
        font-size: 0.85em;
        color: #888;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        display: block;
        margin-right: 12px;
        white-space: nowrap;
    }

    .itewr-product-name {
        font-size: 0.95em;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
        margin-bottom: 6px;
    }

    .itewr-product-qty {
        width: auto;
    }

    .itewr-qty-input {
        width: 70px !important;
    }

    .itewr-custom-fields-container {
        padding: 16px 18px;
    }

    .itewr-field-input,
    .itewr-field-textarea,
    .itewr-field-select {
        max-width: 100% !important;
    }

    .itewr-submit-button {
        width: 100%;
        text-align: center;
    }
}