/**
 * Admin styles for the Melu Live Chat settings page.
 */

.melu-wrap {
    max-width: 880px;
    margin: 20px auto 40px;
}

.melu-header {
    background: none;
    border-radius: 14px;
    padding: 32px 0 36px 0;
    color: #1d2327;
    margin-bottom: 24px;
}

.melu-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.melu-logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.melu-logo-mark {
    flex-shrink: 0;
    line-height: 0;
}

.melu-logo-text h1 {
    color: #1d2327;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.2;
}

.melu-logo-text p {
    color: #1d2327;
    font-size: 14px;
    margin: 0;
}

.melu-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.melu-btn {
    border-radius: 8px !important;
    font-weight: 600;
    padding: 6px 18px !important;
    line-height: 1.6;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.melu-btn:hover {
    transform: translateY(-1px);
}

.melu-btn-primary {
    background: #f89b1c !important;
    border-color: #f89b1c !important;
    color: #fff !important;
}

.melu-btn-primary:hover {
    background: #90df90 !important;
    border-color: #90df90 !important;
    color: #1d2327 !important;
}

.button-secondary.melu-btn {
    background: #6c9fd3;
    border-color: #6c9fd3;
    color: #fff;
}

.button-secondary.melu-btn:hover {
    background: #90df90;
    border-color: #90df90;
    color: #1d2327;
}

.melu-body {
    background: #fff;
    border-radius: 14px;
    padding: 32px 36px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.melu-body form h2 {
    font-size: 18px;
    font-weight: 600;
}

.melu-body .form-table th {
    padding: 20px 10px 20px 0;
    width: 220px;
}

.melu-body .form-table td {
    padding: 20px 10px;
}

.melu-body #submit {
    border-radius: 8px;
    padding: 6px 28px;
    font-weight: 600;
}

.melu-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 36px;
}

.melu-card {
    background: #fefaf5;
    border: 1px solid #fbeede;
    border-radius: 12px;
    padding: 22px 20px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.melu-card:hover {
    box-shadow: 0 4px 16px rgba(248, 155, 28, 0.1);
    transform: translateY(-2px);
}

.melu-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #fef3e2;
    color: #f89b1c;
    font-size: 22px;
    margin-bottom: 14px;
}

.melu-card h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #3d2e1a;
}

.melu-card p {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.6;
    color: #7a6b5a;
}

.melu-card a {
    font-size: 13px;
    font-weight: 600;
    color: #f89b1c;
    text-decoration: none;
}

.melu-card a:hover {
    text-decoration: underline;
}

.melu-notice {
    margin-top: 28px;
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 14px;
}

.melu-notice-info {
    background: #fef3e2;
    border: 1px solid #fcd990;
    color: #b8730f;
}

.melu-notice p {
    margin: 0;
}

@media (max-width: 600px) {
    .melu-header {
        padding: 24px 20px;
    }
    .melu-body {
        padding: 24px 20px;
    }
    .melu-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .melu-body .form-table th {
        width: auto;
        padding-bottom: 6px;
    }
}

/* ===== Display Settings ===== */

.melu-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #fbf0e6;
}

.melu-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.melu-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
}

.melu-section-intro {
    margin-bottom: 20px !important;
}

.melu-toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: #fefaf5;
    border: 1px solid #fbeede;
    border-radius: 12px;
    margin-bottom: 28px;
}

.melu-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    padding-top: 2px;
}

.melu-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.melu-toggle-track {
    width: 52px;
    height: 28px;
    background: #d4ccc0;
    border-radius: 14px;
    position: relative;
    transition: background 0.2s ease;
}

.melu-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.melu-toggle input:checked + .melu-toggle-track {
    background: #f89b1c;
}

.melu-toggle input:checked + .melu-toggle-track .melu-toggle-thumb {
    transform: translateX(24px);
}

.melu-toggle-label {
    flex: 1;
}

/* "Show only on ticked pages & posts" toggle, above the pages list */
.melu-page-mode {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
}

.melu-page-mode .melu-toggle {
    padding-top: 0;
}

.melu-page-mode-label {
    font-weight: 600;
    cursor: pointer;
}

.melu-mode-warning {
    color: #b42318;
    font-weight: 600;
}

.melu-status {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.melu-status-on {
    background: #fef3e2;
    color: #b8730f;
}

.melu-status-off {
    background: #fef0f0;
    color: #c53030;
}

.melu-display-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 28px;
}

.melu-display-col h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #3d2e1a;
}

.melu-post-types {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.melu-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #fefaf5;
    border: 1px solid #fbeede;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.melu-check:hover {
    border-color: #f89b1c;
    background: #fdf6ec;
}

.melu-check input {
    accent-color: #f89b1c;
}

.melu-check input:checked + span {
    font-weight: 600;
    color: #b8730f;
}

.melu-multiselect {
    border: 1px solid #fbeede;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.melu-search {
    width: 100%;
    padding: 11px 14px;
    border: none;
    border-bottom: 1px solid #fbeede;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    background: #fefaf5;
}

.melu-search:focus {
    background: #fff;
}

.melu-multiselect-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
}

.melu-multiselect-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.1s ease;
}

.melu-multiselect-item:hover {
    background: #fdf8f2;
}

.melu-multiselect-item.is-selected {
    background: #fef3e2;
}

.melu-multiselect-item input {
    accent-color: #f89b1c;
    flex-shrink: 0;
}

.melu-multiselect-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.melu-multiselect-type {
    font-size: 11px;
    color: #7a6b5a;
    background: #fbf0e6;
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.melu-notice-warning {
    background: #cc181821;
    border: 1px solid #cc1818;
    color: #d63638;
}

@media (max-width: 768px) {
    .melu-display-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .melu-toggle-row {
        flex-direction: column;
        gap: 12px;
    }
}