/* Simple Entry Booking for WooCommerce - Settings Page */

.sebfw-settings-wrap {
    max-width: 1220px;
}

.sebfw-settings-header {
    margin: 20px 0 24px;
}

.sebfw-settings-header h1 {
    margin-bottom: 6px;
}

.sebfw-settings-tagline {
    font-size: 14px;
    color: #646970;
    margin: 0;
}

/* Layout */
.sebfw-settings-layout {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.sebfw-settings-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sebfw-settings-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 32px;
}

@media (max-width: 960px) {
    .sebfw-settings-layout {
        flex-direction: column;
    }

    .sebfw-settings-sidebar {
        width: 100%;
        position: static;
    }
}

/* Cards */
.sebfw-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
    padding: 20px 24px 24px;
}

.sebfw-card-title {
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f1;
    font-size: 16px;
}

.sebfw-card-desc {
    color: #646970;
    margin: 12px 0 0;
}

/* Field rows (General card) */
.sebfw-field-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f1;
}

.sebfw-field-row:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}

.sebfw-field-label {
    width: 180px;
    flex-shrink: 0;
    font-weight: 600;
    padding-top: 6px;
}

.sebfw-field-control {
    flex: 1;
    min-width: 0;
}

.sebfw-field-control input[type="text"] {
    width: 100%;
    max-width: 360px;
}

.sebfw-field-control .description {
    margin-top: 6px;
}

@media (max-width: 640px) {
    .sebfw-field-row {
        flex-direction: column;
        gap: 6px;
    }

    .sebfw-field-label {
        width: auto;
        padding-top: 0;
    }
}

/* Toggle switch */
.sebfw-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    vertical-align: middle;
}

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

.sebfw-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccd0d4;
    border-radius: 999px;
    transition: background-color 0.15s ease;
}

.sebfw-switch-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    top: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

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

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

.sebfw-switch-label {
    vertical-align: middle;
    margin-left: 8px;
}

/* Weekly rules table */
.sebfw-table-scroll {
    overflow-x: auto;
    margin-top: 16px;
}

.sebfw-rules-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 720px;
}

.sebfw-rules-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 13px;
}

.sebfw-rules-table td {
    padding: 8px 12px;
    vertical-align: middle;
}

.sebfw-rules-table .sebfw-day-name {
    font-weight: 600;
    white-space: nowrap;
}

.sebfw-rules-table tr.sebfw-row-blocked {
    background-color: #fcf0f1;
}

.sebfw-rules-table tr.sebfw-row-blocked .sebfw-day-name {
    color: #b32d2e;
}

.sebfw-rules-table input[type="number"],
.sebfw-rules-table select {
    width: 100px;
}

.sebfw-rules-table input[type="time"] {
    width: 110px;
}

/* Category picker */
.sebfw-category-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 12px;
    flex-wrap: wrap;
}

.sebfw-category-search {
    flex: 1;
    min-width: 180px;
    max-width: 280px;
    height: 34px;
    box-sizing: border-box;
    padding: 0 10px;
}

.sebfw-cat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    box-sizing: border-box;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sebfw-cat-btn-primary {
    background-color: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.sebfw-cat-btn-primary:hover {
    background-color: #135e96;
    border-color: #135e96;
    color: #fff;
}

.sebfw-cat-btn-secondary {
    background-color: #f0f0f1;
    border-color: #dcdcde;
    color: #2c3338;
}

.sebfw-cat-btn-secondary:hover {
    background-color: #e2e2e3;
    border-color: #c3c4c7;
}

.sebfw-cat-btn:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 1px;
}

.sebfw-category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 4px 12px;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 12px;
    background: #fbfbfc;
}

.sebfw-category-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: 4px;
}

.sebfw-category-item:hover {
    background: #f0f0f1;
}

.sebfw-category-item em {
    color: #8c8f94;
    font-style: normal;
}

/* Submit */
.sebfw-submit-row {
    margin: 4px 0 0;
}

/* Pro upsell sidebar card */
.sebfw-pro-upsell {
    background: linear-gradient(180deg, #f6f7f9 0%, #ffffff 140px);
}

.sebfw-pro-upsell-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.sebfw-pro-badge {
    display: inline-block;
    background: #2271b1;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 999px;
}

.sebfw-pro-upsell-header h2 {
    margin: 0;
    font-size: 15px;
}

.sebfw-pro-features {
    margin: 12px 0;
    padding-left: 20px;
    font-size: 13px;
}

.sebfw-pro-features li {
    margin-bottom: 6px;
}

.sebfw-pro-cta {
    display: block;
    text-align: center;
    margin-top: 8px;
}

.sebfw-pro-note {
    color: #8c8f94;
    font-size: 12px;
    margin: 10px 0 0;
}

/* Core tweak retained */
.widefat tr th {
    padding-left: 12px;
}
