/* ==========================================
   BuddyPress Member Controls — Frontend CSS
   ========================================== */

.bpmc-settings-container {
    max-width: 780px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Tab Navigation */
.bpmc-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    background: #f7f8fc;
    border: 1px solid #e2e8f0;
    border-radius: 10px 10px 0 0;
    padding: 10px 10px 0;
}

.bpmc-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s;
    outline: none;
}

.bpmc-tab-btn:hover {
    color: #2d3748;
    background: rgba(255,255,255,0.8);
}

.bpmc-tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: #fff;
}

.bpmc-tab-btn.bpmc-tab-danger {
    color: #e53e3e;
}

.bpmc-tab-btn.bpmc-tab-danger:hover,
.bpmc-tab-btn.bpmc-tab-danger.active {
    color: #c53030;
    border-bottom-color: #e53e3e;
}

/* Tab Content */
.bpmc-tab-content {
    display: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 28px 30px;
}

.bpmc-tab-content.active {
    display: block;
}

.bpmc-tab-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: #1a202c;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f4f8;
}

.bpmc-tab-content h4 {
    color: #2d3748;
    margin-bottom: 14px;
}

/* Fields */
.bpmc-field-group {
    margin-bottom: 18px;
}

.bpmc-field-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
}

.bpmc-field-group input[type="text"],
.bpmc-field-group input[type="email"],
.bpmc-field-group input[type="url"],
.bpmc-field-group input[type="password"],
.bpmc-field-group textarea,
.bpmc-field-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #2d3748;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.bpmc-field-group input:focus,
.bpmc-field-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.bpmc-field-group input[disabled] {
    background: #f7f8fc;
    color: #a0aec0;
    cursor: not-allowed;
}

.bpmc-field-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Radio buttons */
.bpmc-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 14px;
    color: #2d3748;
}

.bpmc-radio-label:hover {
    background: #f7f8fc;
    border-color: #3b82f6;
}

.bpmc-radio-label input[type="radio"] {
    width: auto;
    margin: 0;
}

/* Toggle Switch */
.bpmc-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f0f4f8;
    font-size: 14px;
    color: #2d3748;
}

.bpmc-toggle-row:last-child { border-bottom: none; }

.bpmc-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.bpmc-toggle input { opacity: 0; width: 0; height: 0; }

.bpmc-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e0;
    border-radius: 26px;
    transition: 0.3s;
}

.bpmc-toggle-slider:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.bpmc-toggle input:checked + .bpmc-toggle-slider { background: #3b82f6; }
.bpmc-toggle input:checked + .bpmc-toggle-slider:before { transform: translateX(22px); }

/* Buttons */
.bpmc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.bpmc-btn-primary {
    background: #3b82f6;
    color: #fff;
}

.bpmc-btn-primary:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59,130,246,0.4); }

.bpmc-btn-danger {
    background: #e53e3e;
    color: #fff;
}

.bpmc-btn-danger:hover { background: #c53030; }

.bpmc-btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

/* Status Messages */
.bpmc-form-status {
    display: inline-block;
    margin-left: 12px;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
}

.bpmc-form-status.success { background: #f0fff4; color: #276749; }
.bpmc-form-status.error   { background: #fff5f5; color: #c53030; }

/* Block List */
.bpmc-block-user-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.bpmc-block-user-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.bpmc-blocked-list ul { list-style: none; padding: 0; margin: 0; }

.bpmc-blocked-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f4f8;
}

.bpmc-blocked-user img { border-radius: 50%; }
.bpmc-blocked-user span { flex: 1; font-size: 14px; color: #2d3748; }

/* Notices */
.bpmc-notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.bpmc-notice-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.bpmc-info { color: #718096; font-size: 13px; }
.bpmc-empty { color: #a0aec0; font-style: italic; font-size: 14px; }

/* Danger Zone */
.bpmc-danger-heading { color: #e53e3e !important; }

.bpmc-danger-zone {
    background: #fff5f5;
    border: 1.5px solid #fed7d7;
    border-radius: 10px;
    padding: 24px;
}

.bpmc-danger-zone p { color: #742a2a; font-size: 14px; margin-top: 0; }

/* Rules box */
.bpmc-rules-box {
    background: #ebf4ff;
    border: 1.5px solid #bee3f8;
    border-radius: 8px;
    padding: 16px 20px;
}

.bpmc-rules-box h4 { margin: 0 0 10px; color: #2b6cb0; }
.bpmc-rules-box ul { margin: 0; padding-left: 18px; color: #2c5282; font-size: 14px; }
.bpmc-rules-box li { margin-bottom: 5px; }

/* Export */
#bpmc-export-result {
    background: #f0fff4;
    border: 1.5px solid #9ae6b4;
    border-radius: 8px;
    padding: 16px;
    font-size: 13px;
    color: #276749;
}

#bpmc-export-result pre {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    overflow-x: auto;
    font-size: 12px;
    color: #2d3748;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 600px) {
    .bpmc-tab-nav { gap: 2px; padding: 8px 8px 0; }
    .bpmc-tab-btn { padding: 8px 10px; font-size: 12px; }
    .bpmc-tab-content { padding: 18px; }
    .bpmc-toggle-row { flex-wrap: wrap; gap: 8px; }
    .bpmc-block-user-form { flex-direction: column; }
}
