/* =====================================================
   LEIDSENS – PREMIUM ADMIN UI (STABLE v2)
===================================================== */

body.toplevel_page_leidsens_menu_settings {
    background: #f5f6f8;
}

/* Page container */
body.toplevel_page_leidsens_menu_settings .wrap {
    max-width: 1080px;
    margin-top: 20px;
}

/* Page title */
body.toplevel_page_leidsens_menu_settings h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
}

/* =====================================================
   FORM TABLE RESET
===================================================== */
body.toplevel_page_leidsens_menu_settings .form-table {
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0;
}

body.toplevel_page_leidsens_menu_settings .form-table tbody {
    display: block;
}

body.toplevel_page_leidsens_menu_settings .form-table tr {
    display: block;
    padding: 18px 22px;
}

/* =====================================================
   FIELD LABELS
===================================================== */
body.toplevel_page_leidsens_menu_settings .form-table th {
    display: block;
    width: 100%;
    padding: 0 0 6px;
    font-weight: 500;
    font-size: 13px;
    color: #374151;
}

body.toplevel_page_leidsens_menu_settings .form-table td {
    display: block;
    padding: 0 0 22px;
}

body.toplevel_page_leidsens_menu_settings .form-table tr:last-child td {
    padding-bottom: 0;
}

/* =====================================================
   INPUTS
===================================================== */
body.toplevel_page_leidsens_menu_settings input[type="text"],
body.toplevel_page_leidsens_menu_settings input[type="number"],
body.toplevel_page_leidsens_menu_settings select {
    width: 360px;
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 10px 12px;
    font-size: 14px;
    background: #ffffff;
    box-sizing: border-box;
}

body.toplevel_page_leidsens_menu_settings select {
    padding-right: 32px;
}

/* =====================================================
   COLOR PICKER
===================================================== */
body.toplevel_page_leidsens_menu_settings .wp-picker-container {
    margin-top: 6px;
}

body.toplevel_page_leidsens_menu_settings .wp-picker-container input[type="text"] {
    width: 100px;
}

/* =====================================================
   IMAGE UPLOADER
===================================================== */
.leidsens-field-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.leidsens-field-group input[type="text"] {
    flex: 1;
    min-width: 200px;
}

.leidsens-logo-preview {
    margin-top: 10px;
}

.leidsens-logo-preview img {
    border-radius: 10px;
    background: #f9fafb;
    padding: 8px;
    border: 1px solid #e5e7eb;
    max-width: 200px;
    height: auto;
    display: block;
}

/* =====================================================
   DESCRIPTIONS
===================================================== */
body.toplevel_page_leidsens_menu_settings .description {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

/* =====================================================
   SUBMIT BUTTON
===================================================== */
body.toplevel_page_leidsens_menu_settings .submit {
    margin-top: 30px;
    padding: 0;
}

body.toplevel_page_leidsens_menu_settings .button-primary {
    background: #2563eb !important;
    border-color: #2563eb !important;
    padding: 10px 26px;
    font-size: 14px;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    height: auto;
    line-height: 1.5;
}

body.toplevel_page_leidsens_menu_settings .button-primary:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

/* =====================================================
   TOGGLE SWITCH  (single unified rule – no duplicate)
===================================================== */
.leidsens-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.leidsens-toggle-wrapper > span {
    font-size: 13px;
    color: #374151;
}

/* The <label> that wraps checkbox + slider */
.leidsens-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    flex-shrink: 0;
}

.leidsens-toggle input {
    display: none;
}

.leidsens-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #d1d5db;
    border-radius: 999px;
    transition: background 0.25s;
}

.leidsens-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    top: 2px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.leidsens-toggle input:checked + .leidsens-slider {
    background: #2563eb;
}

.leidsens-toggle input:checked + .leidsens-slider::before {
    transform: translateX(20px);
}

/* =====================================================
   ACCORDION CORE
===================================================== */
.leidsens-accordion {
    position: relative;
    margin-bottom: 18px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* LEFT COLOR STRIP */
.leidsens-accordion::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: #2563eb;
    z-index: 1;
}

/* HEADER */
.leidsens-accordion-header {
    width: 100%;
    min-height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px 18px 26px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    color: #111827;
    background: linear-gradient(90deg, rgba(37,99,235,0.06), #ffffff 60%);
    transition: background 0.2s;
    text-align: left;
}

.leidsens-accordion-header:hover {
    background: linear-gradient(90deg, rgba(37,99,235,0.12), #ffffff 60%);
}

/* CHEVRON */
.leidsens-accordion-icon {
    font-size: 16px;
    color: #2563eb;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

.leidsens-accordion.open .leidsens-accordion-icon {
    transform: rotate(180deg);
}

/* BODY */
.leidsens-accordion-body {
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.leidsens-accordion.open .leidsens-accordion-body {
    max-height: 2000px;
    padding: 8px 0 0;
}

/* Divider between rows */
body.toplevel_page_leidsens_menu_settings .form-table tr + tr {
    border-top: 1px solid #f3f4f6;
}

/* =====================================================
   SECTION STRIP COLOR VARIANTS
===================================================== */
.leidsens-accordion:nth-of-type(1)::before { background: #2563eb; }
.leidsens-accordion:nth-of-type(2)::before { background: #16a34a; }
.leidsens-accordion:nth-of-type(3)::before { background: #9333ea; }
.leidsens-accordion:nth-of-type(4)::before { background: #ea580c; }
.leidsens-accordion:nth-of-type(5)::before { background: #0ea5e9; }

/* Matching header gradient per section */
.leidsens-accordion:nth-of-type(2) .leidsens-accordion-header {
    background: linear-gradient(90deg, rgba(22,163,74,0.06), #ffffff 60%);
}
.leidsens-accordion:nth-of-type(2) .leidsens-accordion-header:hover {
    background: linear-gradient(90deg, rgba(22,163,74,0.12), #ffffff 60%);
}
.leidsens-accordion:nth-of-type(2) .leidsens-accordion-icon { color: #16a34a; }

.leidsens-accordion:nth-of-type(3) .leidsens-accordion-header {
    background: linear-gradient(90deg, rgba(147,51,234,0.06), #ffffff 60%);
}
.leidsens-accordion:nth-of-type(3) .leidsens-accordion-header:hover {
    background: linear-gradient(90deg, rgba(147,51,234,0.12), #ffffff 60%);
}
.leidsens-accordion:nth-of-type(3) .leidsens-accordion-icon { color: #9333ea; }

.leidsens-accordion:nth-of-type(4) .leidsens-accordion-header {
    background: linear-gradient(90deg, rgba(234,88,12,0.06), #ffffff 60%);
}
.leidsens-accordion:nth-of-type(4) .leidsens-accordion-header:hover {
    background: linear-gradient(90deg, rgba(234,88,12,0.12), #ffffff 60%);
}
.leidsens-accordion:nth-of-type(4) .leidsens-accordion-icon { color: #ea580c; }

.leidsens-accordion:nth-of-type(5) .leidsens-accordion-header {
    background: linear-gradient(90deg, rgba(14,165,233,0.06), #ffffff 60%);
}
.leidsens-accordion:nth-of-type(5) .leidsens-accordion-header:hover {
    background: linear-gradient(90deg, rgba(14,165,233,0.12), #ffffff 60%);
}
.leidsens-accordion:nth-of-type(5) .leidsens-accordion-icon { color: #0ea5e9; }
