/**
 * Universal Custom Fields (UCF) - General Styles
 */

/* ========================================
   Product Add-ons (Frontend)
   ======================================== */

.ucf-product-addons {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.ucf-addon-field {
    margin-bottom: 15px;
}

.ucf-addon-field:last-child {
    margin-bottom: 0;
}

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

.ucf-addon-field label .required {
    color: #e74c3c;
    text-decoration: none;
    font-weight: bold;
}

.ucf-addon-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.2s ease;
}

.ucf-addon-field select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.ucf-addon-field select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* WooCommerce integration */
.single-product .ucf-product-addons {
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .ucf-product-addons {
        padding: 12px;
    }

    .ucf-addon-field select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* ========================================
   Admin Table Columns (Backend)
   ======================================== */

/* UCF Columns in WP Admin Tables (Users, Orders, Products) */
.wp-list-table [class*="column-ucf_"] {
    width: auto;
    max-width: 150px;
    min-width: 80px;
}

/* Ensure text wraps properly in narrow columns */
.wp-list-table [class*="column-ucf_"] {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Truncate long text with ellipsis */
.wp-list-table [class*="column-ucf_"] {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Allow wrapping for multi-term displays */
.wp-list-table [class*="column-ucf_"] a {
    display: inline;
    white-space: normal;
}

/* Ensure proper alignment */
.wp-list-table [class*="column-ucf_"] {
    vertical-align: middle;
}

/* Empty cell indicator (matches WordPress default) */
.wp-list-table [class*="column-ucf_"] .na,
.wp-list-table [class*="column-ucf_"] span[aria-hidden="true"] {
    color: #a0a5aa;
    font-weight: 400;
}

/* ========================================
   Future styles can be added below
   ======================================== */
