/**
 * YeeVisibility Admin Styles
 */
.woocommerce_page_wc-settings-yeevisibility .woocommerce-save-button {
    display: none;
}

/* Wrapper */
.yeekit-wrapper {
    max-width: 900px;
    margin-top: 20px;
}

/* Blocks */
.yeekit-block {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.yeekit-block-header {
    background: #f8f9fa;
    border-bottom: 1px solid #ebecf0;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.yeekit-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.yeekit-block-content {
    padding: 20px;
}

/* Form Rows */
.yeekit-form-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}

.yeekit-form-row:last-child {
    margin-bottom: 0;
}

.yeekit-form-row label {
    flex: 0 0 160px;
    font-weight: 600;
    padding-top: 6px;
    color: #3c434a;
}

.yeekit-form-field {
    flex: 1;
}

.yeekit-form-field input[type="text"],
.yeekit-form-field select,
.yeekit-form-field textarea {
    width: 100%;
    max-width: 100%;
}

.yeekit-form-field .description {
    color: #646970;
    font-style: italic;
    margin-top: 4px;
}

/* Switch Toggle */
.yeekit-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.yeekit-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.yeekit-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.yeekit-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 7px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.yeekit-slider {
    background-color: #2271b1;
}

input:checked+.yeekit-slider:before {
    transform: translateX(24px);
}

/* Repeater Table */
.yeekit-repeater-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.yeekit-repeater-table th {
    text-align: left;
    color: #646970;
    font-weight: 600;
    padding: 0 0 10px 0;
    border-bottom: 2px solid #ebecf0;
}

.yeekit-repeater-table td {
    padding: 10px 5px 10px 0;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: top;
}

.yeekit-repeater-table input,
.yeekit-repeater-table select {
    width: 100%;
}

.yeekit-repeater-table button.remove-condition {
    background: transparent;
    border: none;
    color: #d63638;
    cursor: pointer;
    font-size: 18px;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.yeekit-repeater-table button.remove-condition:hover {
    background: #ffeeee;
}

/* Buttons */
.yeekit-button-secondary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.yeekit-footer-actions {
    margin-top: 30px;
    text-align: right;
    border-top: 1px solid #dcdcde;
    padding-top: 20px;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .yeekit-form-row {
        flex-direction: column;
    }

    .yeekit-form-row label {
        margin-bottom: 6px;
    }

    .yeekit-repeater-table th,
    .yeekit-repeater-table td {
        display: block;
        width: 100% !important;
        border: none;
        padding: 5px 0;
    }

    .yeekit-repeater-table tr {
        border-bottom: 1px solid #ddd;
        display: block;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
}

#add_condition span,
.remove-condition span {
    padding: 5px 0;
}

/* --- Global Settings Tab Styling --- */
/* Target the form table in Yeekit Settings tab */
.woocommerce table.form-table th {
    padding: 20px 0 10px 0;
    width: 220px;
    font-weight: 600;
    color: #3c434a;
    vertical-align: top;
}

.woocommerce table.form-table td {
    padding: 15px 0 25px 0;
    vertical-align: top;
}

.woocommerce table.form-table input[type="text"],
.woocommerce table.form-table input[type="url"],
.woocommerce table.form-table textarea,
.woocommerce table.form-table select {
    padding: 0px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    min-height: 40px;
    box-shadow: none;
    max-width: 600px;
    /* Limit width */
}

/* Section Headers in Global Settings */
.woocommerce h3#yeekit_visibility_section_visibility,
.woocommerce h3#yeekit_visibility_section_redirection,
.woocommerce h3#yeekit_visibility_section_advanced {
    padding-top: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 18px;
    border-bottom: 1px solid #dcdcde;
    padding-bottom: 10px;
    color: #1d2327;
}

/* Checkboxes */
.woocommerce table.form-table input[type="checkbox"] {
    margin-top: 2px;
    transform: scale(1.2);
    margin-right: 10px;
}