/* On Page Checkout — Admin Styles */

.w3opcfe-field-wrapper {
    margin-bottom: 12px;
}

.w3opcfe-dependent-fields label {
    display: block;
    margin-bottom: 4px;
}

/* Modern Toggle Switch */
.w3opcfe-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.w3opcfe-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
}

.w3opcfe-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
    margin: 0;
}

.w3opcfe-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: background-color 0.25s ease;
    border-radius: 24px;
}

.w3opcfe-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: transform 0.25s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

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

.w3opcfe-switch input:focus + .w3opcfe-slider {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #2271b1;
}

.w3opcfe-switch input:checked + .w3opcfe-slider:before {
    transform: translateX(22px);
}

.w3opcfe-switch-desc {
    color: #64748b;
    font-size: 13px;
}

/* Checkout Fields Editor Card Layout */
.w3opcfe-field-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.w3opcfe-field-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.w3opcfe-field-card.is-disabled {
    background: #f8fafc;
    opacity: 0.65;
}

.w3opcfe-field-main {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
}

.w3opcfe-field-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.w3opcfe-field-title {
    font-size: 14px;
    color: #1e293b;
    font-weight: 600;
}

.w3opcfe-field-key {
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: Consolas, Monaco, monospace;
}

.w3opcfe-dependent-options {
    display: flex;
    align-items: center;
    gap: 20px;
}

.w3opcfe-opt-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.w3opcfe-input-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
}

.w3opcfe-label-input {
    min-width: 260px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    font-size: 13px;
}

.w3opcfe-label-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.w3opcfe-required-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    padding: 6px 14px;
    border-radius: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    user-select: none;
    transition: all 0.2s ease;
    margin-top: 16px;
}

.w3opcfe-required-pill:hover {
    background: #e2e8f0;
}

.w3opcfe-required-pill input[type="checkbox"] {
    margin: 0;
    border-radius: 3px;
}

.w3opcfe-required-pill:has(input:checked) {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

/* Source Badges in Blocklist/Allowlist */
.w3opcfe-source-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.w3opcfe-source-manual {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.w3opcfe-source-auto {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.w3opcfe-source-network {
    background: #ede9fe;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}
.w3opcfe-source-import {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}
