/**
 * Shibhu Matrimony - Admin Styles
 */

/* Settings Page */
.sm-shortcodes-info {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.sm-shortcodes-info h2 {
    margin-top: 0;
    font-size: 1.3em;
}

.sm-shortcodes-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sm-shortcodes-info li {
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.sm-shortcodes-info code {
    padding: 4px 8px;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: Monaco, Consolas, monospace;
    font-size: 0.9em;
    color: #d63384;
}

.sm-shortcodes-info small {
    display: block;
    margin-top: 5px;
    color: #666;
}

/* Meta Box Styling */
.sm-meta-box-content {
    padding: 10px 0;
}

.sm-meta-box-content table.form-table {
    margin: 0;
}

.sm-meta-box-content table.form-table th {
    width: 200px;
    padding: 15px 10px 15px 0;
    vertical-align: middle;
}

.sm-meta-box-content table.form-table td {
    padding: 15px 10px;
}

.sm-meta-box-content .regular-text {
    width: 100%;
    max-width: 400px;
}

.sm-meta-box-content .description {
    margin: 5px 0 0;
    color: #666;
    font-style: italic;
}

/* Profile List Column */
.column-mm_gender,
.column-mm_age,
.column-mm_city {
    width: 100px;
}

.sm-profile-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

/* Quick Edit Support */
.inline-edit-col-left label span.title {
    width: 120px;
}

/* Admin Notice */
.sm-admin-notice {
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid #007bff;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.sm-admin-notice.notice-success {
    border-left-color: #46b450;
}

.sm-admin-notice.notice-error {
    border-left-color: #dc3232;
}

.sm-admin-notice.notice-warning {
    border-left-color: #ffb900;
}

.sm-admin-notice p {
    margin: 0.5em 0;
}

/* Dashboard Widget */
.sm-dashboard-widget {
    padding: 15px;
}

.sm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.sm-stat-box {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.sm-stat-number {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #007bff;
}

.sm-stat-label {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

/* Responsive Admin */
@media screen and (max-width: 782px) {
    .sm-meta-box-content table.form-table th,
    .sm-meta-box-content table.form-table td {
        display: block;
        width: 100%;
        padding: 10px 0;
    }

    .sm-meta-box-content table.form-table th {
        width: 100%;
    }

    .sm-stats-grid {
        grid-template-columns: 1fr;
    }
}


.sm-metabox-wrapper {
    display: flex;
    gap: 0;
    min-height: 500px;
    background: #fff;
    margin: -12px -12px 0;
}

.sm-metabox-tabs {
    flex: 0 0 200px;
    background: #f8f9fa;
    padding: 0;
}

.sm-tab-button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: #50575e;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sm-tab-button:hover {
    background: rgba(0, 123, 255, 0.05);
    color: #007bff;
}

.sm-tab-button.active {
    background: #fff;
    color: #007bff;
    border-left-color: #007bff;
    font-weight: 600;
}

.sm-tab-button svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sm-metabox-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    padding-top: 0;
}

.sm-tab-panel {
    display: none;
}

.sm-tab-panel.active {
    display: block;
    animation: smFadeIn 0.3s ease-in-out;
}

@keyframes smFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sm-tab-panel-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.sm-tab-panel-header h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
}

.sm-tab-panel-header p {
    margin: 0;
    font-size: 13px;
    color: #646970;
}

.sm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 45px 20px;
    margin-bottom: 20px;
}

.sm-form-grid.sm-single-column {
    grid-template-columns: 1fr;
}

.sm-form-field {
    display: flex;
    flex-direction: column;
}

.sm-form-field.sm-full-width {
    grid-column: 1 / -1;
}

.sm-form-field label {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
}

.sm-form-field label .required {
    color: #d63638;
    margin-left: 2px;
}

.sm-form-field input[type="text"],
.sm-form-field input[type="email"],
.sm-form-field input[type="tel"],
.sm-form-field input[type="number"],
.sm-form-field input[type="date"],
.sm-form-field select,
.sm-form-field textarea {
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sm-form-field input[type="text"]:focus,
.sm-form-field input[type="email"]:focus,
.sm-form-field input[type="tel"]:focus,
.sm-form-field input[type="number"]:focus,
.sm-form-field input[type="date"]:focus,
.sm-form-field select:focus,
.sm-form-field textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.sm-form-field textarea {
    min-height: 100px;
    resize: vertical;
}

.sm-form-field .description {
    margin-top: 5px;
    font-size: 12px;
    color: #646970;
    font-style: italic;
}

.sm-form-field input[type="number"] {
    max-width: 150px;
}

.sm-form-field select {
    max-width: 250px;
}

.sm-range-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.sm-range-field label {
    font-size: 12px;
    font-weight: 500;
    color: #646970;
}

/* Required field indicator */
.sm-required-note {
    margin-top: 25px;
    padding: 12px;
    background: #f0f6fc;
    border-left: 3px solid #007bff;
    font-size: 12px;
    color: #646970;
}

.sm-required-note .required {
    color: #d63638;
}

/* Responsive */
@media (max-width: 1200px) {
    .sm-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 782px) {
    .sm-metabox-wrapper {
        flex-direction: column;
    }

    .sm-metabox-tabs {
        flex: none;
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding: 10px 0;
        display: flex;
        overflow-x: auto;
    }

    .sm-tab-button {
        flex: 0 0 auto;
        padding: 10px 15px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .sm-tab-button.active {
        border-left: none;
        border-bottom-color: #007bff;
    }

    .sm-metabox-content {
        padding: 20px;
    }

    .sm-form-field input[type="number"],
    .sm-form-field select {
        max-width: 100%;
    }
}

/* ==========================================================================
   Shibhu Matrimony — Settings Page (Modern Tabbed UI)
   ========================================================================== */

/* Wrap */
.sm-settings-wrap {
    max-width: 1100px;
    margin: 20px 20px 0 0;
}

/* Header */
.sm-settings-header {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #ec4899 100%);
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 24px;
    color: #fff;
}

.sm-settings-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sm-settings-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    flex-shrink: 0;
}

.sm-settings-logo svg {
    width: 28px;
    height: 28px;
    color: #fff;
    stroke: #fff;
}

.sm-settings-title {
    margin: 0 0 2px;
    font-size: 30px !important;
    font-weight: 700;
    color: #111 !important;
    line-height: 1.2;
    margin-bottom: 30px !important
}

.sm-settings-subtitle {
    margin: 0;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

/* Container */
.sm-settings-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
}

/* ---- Horizontal Tab Nav ---- */
.sm-settings-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    overflow-x: auto;
    scrollbar-width: none;
}

.sm-settings-tabs::-webkit-scrollbar {
    display: none;
}

.sm-settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    font-size: 13.5px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color .15s ease, border-color .15s ease;
    white-space: nowrap;
}

.sm-settings-tab svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: .7;
    transition: opacity .15s ease;
}

.sm-settings-tab:hover {
    color: #7c3aed;
    text-decoration: none;
}

.sm-settings-tab:hover svg {
    opacity: 1;
}

.sm-settings-tab.is-active {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
    font-weight: 600;
}

.sm-settings-tab.is-active svg {
    opacity: 1;
}

/* ---- Body ---- */
.sm-settings-body {
    padding: 32px;
}

/* Section header */
.sm-section-header {
    margin-bottom: 24px;
}

.sm-section-header h2 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.sm-section-header p {
    margin: 0;
    color: #6b7280;
    font-size: 13.5px;
}

/* Settings Card */
.sm-settings-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
}

.sm-card-title {
    margin: 0 0 20px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

/* ---- Setting Row ---- */
.sm-setting-row {
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}

.sm-setting-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sm-setting-row:first-child {
    padding-top: 0;
}

/* ---- Toggle Switch ---- */
.sm-toggle-row {
    display: flex;
    align-items: flex-start;
}

.sm-toggle-wrap {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
}

.sm-toggle {
    position: relative;
    display: inline-flex;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 1px;
    cursor: pointer;
}

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

.sm-toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 999px;
    transition: background .2s ease;
}

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

.sm-toggle input:checked + .sm-toggle-slider {
    background: #7c3aed;
}

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

.sm-toggle input:focus-visible + .sm-toggle-slider {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

.sm-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sm-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    line-height: 1.4;
}

.sm-toggle-desc {
    font-size: 12.5px;
    color: #6b7280;
    line-height: 1.5;
}

/* ---- Text / Number Fields ---- */
.sm-setting-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.sm-setting-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sm-input {
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    width: 100%;
    max-width: 420px;
    transition: border-color .15s ease, box-shadow .15s ease;
    box-sizing: border-box;
}

.sm-input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.sm-input-number {
    max-width: 120px;
}

.sm-field-desc {
    margin: 0;
    font-size: 12.5px;
    color: #6b7280;
    line-height: 1.5;
}

/* ---- Save Button ---- */
.sm-settings-footer {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.sm-save-btn.button-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
    border-color: #7c3aed !important;
    color: #fff !important;
    padding: 8px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    height: auto !important;
    line-height: 1.5 !important;
    box-shadow: 0 2px 4px rgba(124,58,237,.3) !important;
    transition: opacity .15s ease, box-shadow .15s ease !important;
}

.sm-save-btn.button-primary:hover,
.sm-save-btn.button-primary:focus {
    opacity: .9 !important;
    box-shadow: 0 4px 12px rgba(124,58,237,.35) !important;
}

/* ---- Shortcode Cards ---- */
.sm-shortcode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.sm-shortcode-card {
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    border-radius: 12px;
    padding: 24px;
    transition: box-shadow .2s ease, transform .2s ease;
}

.sm-shortcode-card:hover {
    box-shadow: 0 4px 16px rgba(124,58,237,.12);
    transform: translateY(-2px);
}

.sm-shortcode-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #7c3aed;
    border-radius: 10px;
    margin-bottom: 16px;
}

.sm-shortcode-card-icon svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
}

.sm-shortcode-card h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.sm-shortcode-card p {
    margin: 8px 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

.sm-shortcode-code {
    display: inline-block;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e9d5ff;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #7c3aed;
    font-weight: 600;
    margin: 4px 0;
}

.sm-shortcode-params {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 12px;
    color: #6b7280;
}

.sm-param {
    background: #ede9fe;
    color: #5b21b6;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    font-family: monospace;
}

.sm-shortcode-example {
    font-size: 12px !important;
    color: #9ca3af !important;
    margin-top: 12px !important;
}

.sm-shortcode-example code {
    font-size: 11px;
    color: #7c3aed;
}

/* ---- Responsive ---- */
@media screen and (max-width: 782px) {
    .sm-settings-wrap {
        margin-right: 10px;
    }

    .sm-settings-header {
        padding: 20px;
        border-radius: 8px;
    }

    .sm-settings-body {
        padding: 20px;
    }

    .sm-settings-tabs {
        padding: 0 8px;
    }

    .sm-settings-tab {
        padding: 12px 12px;
        font-size: 13px;
    }

    .sm-settings-tab span {
        display: none;
    }

    .sm-settings-tab svg {
        width: 18px;
        height: 18px;
    }

    .sm-shortcode-grid {
        grid-template-columns: 1fr;
    }

    .sm-input {
        max-width: 100%;
    }

    .sm-input-number {
        max-width: 120px;
    }
}

.sm-settings-tabs a:focus {
    box-shadow: none;
}