/**
 * Product Code for WooCommerce Admin Styles
 */

/* ============================================
   PANEL BOX STYLING - 8px border radius
   ============================================ */

.pcfw-section.postbox {
    border-radius: 8px;
    overflow: hidden;
}

.pcfw-section.postbox .postbox-header {
    border-radius: 8px 8px 0 0;
}

/* ============================================
   ROW INDENTATION - 15px indent for rows
   ============================================ */

.pcfw-section.postbox .inside {
    padding: 0 15px 0 15px;
}

.pcfw-admin-ui .pcfw-table.form-table {
    margin-left: 15px;
}

/* ============================================
   ROW SPACING - Reduced by ~50%
   ============================================ */

.pcfw-admin-ui .pcfw-table.form-table th,
.pcfw-admin-ui .pcfw-table.form-table td {
    padding-top: 8px;
    padding-bottom: 8px;
}

.pcfw-admin-ui .pcfw-table.form-table td {
    padding-left: 30px;
}

.pcfw-admin-ui .pcfw-table.form-table tr {
    border-bottom: none;
}

/* ============================================
   CONSISTENT LABEL COLOR - #3c434a
   ============================================ */

.pcfw-admin-ui .pcfw-table.form-table th label,
.pcfw-admin-ui .pcfw-table.form-table .description,
.pcfw-admin-ui .pcfw-table.form-table .checkinput-description {
    color: #3c434a;
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.pcfw-admin-ui .pcfw-table.form-table tr.pcfw-section-header th {
    padding-top: 10px;
    padding-bottom: 5px;
}

.pcfw-admin-ui .pcfw-table.form-table tr.pcfw-section-header th h3 {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1d2327;
}

.pcfw-admin-ui .pcfw-table.form-table tr.pcfw-section-header:first-child th {
    padding-top: 10px;
}

/* ============================================
   UNIFIED INPUT FIELD STYLING
   All fields: 36px height, same border/shadow
   ============================================ */

.pcfw-admin-ui .pcfw-table.form-table input[type="text"],
.pcfw-admin-ui .pcfw-table.form-table input[type="number"],
.pcfw-admin-ui .pcfw-table.form-table select,
.pcfw-admin-ui .pcfw-table.form-table textarea {
    width: 100%;
    max-width: 250px;
    height: 36px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
    background-color: #fff;
    color: #3c434a;
    padding: 0 10px;
    box-sizing: border-box;
    line-height: 34px;
    font-size: 14px;
    vertical-align: middle;
}

.pcfw-admin-ui .pcfw-table.form-table input[type="text"]:focus,
.pcfw-admin-ui .pcfw-table.form-table input[type="number"]:focus,
.pcfw-admin-ui .pcfw-table.form-table select:focus,
.pcfw-admin-ui .pcfw-table.form-table textarea:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.pcfw-admin-ui .pcfw-table.form-table textarea {
    height: 70px;
    line-height: 1.4;
    padding: 8px 10px;
    resize: none;
}

/* Input + tooltip wrapper to keep them on same line */
.pcfw-admin-ui .pcfw-input-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.pcfw-admin-ui .pcfw-input-wrap input[type="text"],
.pcfw-admin-ui .pcfw-input-wrap select {
    flex: 0 0 auto;
}

.pcfw-admin-ui .pcfw-input-wrap .pcfw-tooltip {
    flex: 0 0 auto;
    margin-left: 0;
}

/* ============================================
   TOOLTIP STYLING
   ============================================ */

.pcfw-tooltip {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
}

.pcfw-tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    text-align: left;
    font-size: 12px;
    line-height: 1.4;
    border-radius: 4px;
    padding: 8px 10px;
    position: absolute;
    z-index: 9999;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}

.pcfw-tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent rgba(0, 0, 0, 0.75) transparent transparent;
}

.pcfw-tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.pcfw-tooltip span.dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    vertical-align: top;
    line-height: 1;
    cursor: help;
}

.pcfw-tooltip .dashicons-editor-help:before {
    color: #72777c;
}

.pcfw-tooltip:hover .dashicons-editor-help:before {
    color: #2271b1;
}

/* ============================================
   CHECKBOX STYLING
   ============================================ */

.pcfw-admin-ui .checkinput-description {
    display: inline;
    margin: 0;
    padding: 0;
    color: #3c434a;
    font-size: 14px;
    line-height: 1.4;
}

.pcfw-admin-ui .checkinput-box {
    margin-top: -2px;
}

/* Tooltip inline with checkbox description */
.pcfw-admin-ui .pcfw-table.form-table td .checkinput-description + .pcfw-tooltip {
    vertical-align: middle;
    margin-left: 4px;
}

/* Wrapper for checkbox + description + tooltip to keep inline */
.pcfw-admin-ui .pcfw-checkbox-row {
    display: inline;
}

/* ============================================
   SUBMIT AREA - Inside panel
   ============================================ */

.pcfw-submit-inside-panel {
    padding: 15px 20px;
    background: #f8f8f8;
    border-top: 1px solid #c3c4c7;
    margin: 15px -15px 0 -15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-radius: 0 0 8px 8px;
}

.pcfw-submit-inside-panel .submit-buttons {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pcfw-submit-inside-panel .button {
    white-space: nowrap;
    flex-shrink: 0;
}

.pcfw-submit-inside-panel .button-primary {
    margin: 0;
}

.pcfw-donation-text {
    color: #3c434a;
    font-size: 13px;
    margin: 0;
}

.pcfw-donation-text .button {
    margin-left: 5px;
}

/* ============================================
   DELETE DATA WARNING
   ============================================ */

.pcfw-warning-text {
    color: #d63638;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media only screen and (max-width: 800px) {
    .pcfw-admin-ui .pcfw-table.form-table {
        margin-left: 0;
    }
    
    .pcfw-admin-ui .pcfw-table.form-table td {
        padding-left: 10px;
    }
    
    .pcfw-admin-ui .pcfw-table.form-table input[type="text"],
    .pcfw-admin-ui .pcfw-table.form-table select {
        width: auto;
        min-width: 150px;
        max-width: 200px;
    }
    
    .pcfw-submit-inside-panel {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .pcfw-submit-inside-panel .submit-buttons {
        flex-wrap: wrap;
    }
    
    .pcfw-donation-text {
        display: none;
    }
    
    .pcfw-tooltip .tooltiptext {
        left: 28px;
        top: 50%;
        transform: translateY(-50%);
        width: 180px;
    }
    
    .pcfw-tooltip .tooltiptext::after {
        top: 50%;
        right: 100%;
        left: auto;
        margin-top: -5px;
        border-color: transparent rgba(0, 0, 0, 0.75) transparent transparent;
    }
}

@media screen and (max-width: 782px) {
    .pcfw-submit-inside-panel .submit-buttons a.button.button-secondary {
        padding: 0px 10px;
        font-size: 13px;
        min-height: 30px;
        margin-bottom: 0px;
        max-height: 30px;
        line-height: 28px;
    }
}
