.wcpo-document-upload {
    margin-bottom: 20px;
}

.wcpo-document-upload label a {
    cursor: pointer;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.wcpo-document-upload label a:hover {
    color: #005a87;
    text-decoration: underline;
}

#wcpo-document-file {
    display: none;
}

.wcpo-document-preview {
    padding: 15px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: none;
    background-color: #f9f9f9;
    margin-top: 10px;
    position: relative;
    min-height: 60px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.wcpo-document-preview:empty {
    display: none;
}

.wcpo-document-preview span:not(.wcpo-remove) {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.wcpo-document-preview img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: white;
    padding: 2px;
}

.wcpo-remove {
    color: #fff;
    background-color: #dc3545;
    border-radius: 50%;
    margin-right: 10px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
    border: none;
    outline: none;
}

.wcpo-remove:hover {
    background-color: #c82333;
    transform: scale(1.1);
}

.wcpo-remove:active {
    transform: scale(0.95);
}

/* Admin note styling */
.wcpo-admin-note {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #007cba;
    border-radius: 4px;
}

.wcpo-admin-note-content {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.wcpo-admin-note-content p {
    margin: 0 0 10px 0;
}

.wcpo-admin-note-content p:last-child {
    margin-bottom: 0;
}

/* Form field styling */
#wc-wc-purchase-orders-po-form .form-row-wide label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

#wc-wc-purchase-orders-po-form .form-row-wide input[type="text"],
#wc-wc-purchase-orders-po-form .form-row-wide input[type="email"],
#wc-wc-purchase-orders-po-form .form-row-wide input[type="tel"],
#wc-wc-purchase-orders-po-form .form-row-wide textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

#wc-wc-purchase-orders-po-form .form-row-wide input[type="text"]:focus,
#wc-wc-purchase-orders-po-form .form-row-wide input[type="email"]:focus,
#wc-wc-purchase-orders-po-form .form-row-wide input[type="tel"]:focus,
#wc-wc-purchase-orders-po-form .form-row-wide textarea:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

#wc-wc-purchase-orders-po-form .form-row-wide textarea {
    resize: vertical;
    min-height: 80px;
}

#wc-wc-purchase-orders-po-form .required {
    color: #e74c3c;
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wcpo-document-preview {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .wcpo-document-preview img {
        width: 28px;
        height: 28px;
    }

    .wcpo-remove {
        position: absolute;
        top: 8px;
        right: 8px;
        margin-right: 0;
    }

    .wcpo-admin-note {
        padding: 12px;
        margin-bottom: 15px;
    }

    #wc-wc-purchase-orders-po-form .form-row-wide input[type="text"],
    #wc-wc-purchase-orders-po-form .form-row-wide input[type="email"],
    #wc-wc-purchase-orders-po-form .form-row-wide input[type="tel"],
    #wc-wc-purchase-orders-po-form .form-row-wide textarea {
        padding: 10px;
        font-size: 16px;
        /* Prevent zoom on iOS */
    }
}

/* Contact and Billing Information Groups */
.wcpo-contact-info-group,
.wcpo-billing-info-group {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    position: relative;
}

.wcpo-section-title {
    margin: 0 0 15px 0;
    padding: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #007cba;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wcpo-contact-info-group .form-row,
.wcpo-billing-info-group .form-row {
    margin-bottom: 15px;
}

.wcpo-contact-info-group .form-row:last-child,
.wcpo-billing-info-group .form-row:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments for groups */
@media (max-width: 768px) {

    .wcpo-contact-info-group,
    .wcpo-billing-info-group {
        padding: 15px;
        margin-bottom: 20px;
    }

    .wcpo-section-title {
        font-size: 14px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
}

/* Website compatibility */
.woocommerce-order-details .woocommerce-table--order-details td {
    text-align: left !important;
    background-color: #fff !important;
}

.xlwcty_wrap .woocommerce-order-details {
    background-color: #fff;
}