/* =====================================================
   Wondalizer Basic SEO — Admin Styles v1.4.0
   ===================================================== */

/* ---- Global ---- */
.wbs-wrap {
    max-width: 1200px;
}

.wbs-wrap h1 {
    margin-bottom: 20px;
    font-size: 23px;
    font-weight: 600;
}

/* ---- Settings Page ---- */
.wbs-settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (min-width: 960px) {
    .wbs-settings-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1400px) {
    .wbs-settings-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.wbs-settings-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease;
}

.wbs-settings-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.wbs-settings-card h2 {
    margin-top: 0;
    font-size: 16px;
    border-bottom: 1px solid #f0f0f1;
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wbs-settings-card h2 .dashicons {
    color: #2271b1;
}

.wbs-card-wide {
    grid-column: 1 / -1;
}

.wbs-card-highlight {
    border-left: 4px solid #2271b1;
}

.wbs-post-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.wbs-save-btn {
    padding: 8px 24px !important;
    font-size: 14px !important;
}

/* ---- Import Page ---- */
.wbs-import-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.wbs-import-box {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.wbs-import-box:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.wbs-import-box h3 {
    margin-top: 0;
    font-size: 16px;
    margin-bottom: 12px;
}

.wbs-detected {
    color: #00a32a;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 15px;
}

.wbs-not-detected {
    color: #8c8f94;
    font-size: 14px;
    margin-bottom: 15px;
}

.wbs-import-form {
    margin: 0;
}

.wbs-import-btn-form {
    padding: 6px 18px;
}

/* ---- Redirects Page ---- */
.wbs-redirect-form {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 20px;
    max-width: 800px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.wbs-redirect-form h3 {
    margin-top: 0;
    font-size: 16px;
    margin-bottom: 15px;
}

.wbs-status-active {
    color: #00a32a;
    font-weight: 600;
}

.wbs-status-inactive {
    color: #d63638;
    font-weight: 600;
}

.wbs-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
}

@media screen and (max-width: 782px) {
    .wbs-responsive-table thead {
        display: none;
    }
    .wbs-responsive-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #c3c4c7;
        border-radius: 4px;
        background: #fff;
    }
    .wbs-responsive-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 12px;
        border-bottom: 1px solid #f0f0f1;
    }
    .wbs-responsive-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 10px;
        flex-shrink: 0;
        color: #1d2327;
    }
    .wbs-responsive-table tbody td:last-child {
        border-bottom: none;
    }
}

/* ---- About Page ---- */
.wbs-about-wrap {
    max-width: 1000px;
}

.wbs-about-hero {
    background: linear-gradient(135deg, #1d2327 0%, #2c3338 100%);
    border-radius: 8px;
    padding: 30px 35px;
    margin-bottom: 25px;
    color: #fff;
}

.wbs-about-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.wbs-heart {
    color: #d63638;
    font-size: 24px;
    line-height: 1;
}

.wbs-about-header h2 {
    margin: 0;
    font-size: 20px;
    color: #fff;
}

.wbs-about-tagline {
    margin: 0;
    font-size: 14px;
    color: #c3c4c7;
}

.wbs-about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .wbs-about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.wbs-about-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.wbs-about-card h3 {
    margin-top: 0;
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wbs-about-card h3 .dashicons {
    color: #2271b1;
}

.wbs-donation-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.wbs-donate-btn {
    padding: 8px 20px !important;
    font-size: 14px !important;
}

.wbs-donate-big {
    background: #dba617 !important;
    border-color: #b78b12 !important;
    color: #1d2327 !important;
}

.wbs-donate-big:hover {
    background: #c99a15 !important;
    border-color: #a67d0f !important;
}

.wbs-paypal-iframe {
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    overflow: hidden;
    background: #f6f7f7;
}

.wbs-hearthis-wrap {
    border-radius: 8px;
    overflow: hidden;
}

.wbs-features-list {
    display: grid;
    gap: 15px;
}

.wbs-feature-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.wbs-feature-item .dashicons {
    color: #2271b1;
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.wbs-feature-item strong {
    display: block;
    font-size: 13px;
    margin-bottom: 2px;
}

.wbs-feature-item p {
    margin: 0;
    font-size: 12px;
    color: #646970;
}

.wbs-about-footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: #f6f7f7;
    border-radius: 8px;
    font-size: 13px;
    color: #646970;
}

.wbs-heart-small {
    color: #d63638;
}

/* ---- Meta Box ---- */
#wbs_seo_meta_box .inside {
    padding: 0;
    margin: 0;
}

#wbs_seo_meta_box .hndle {
    font-size: 14px;
    font-weight: 600;
}

.wbs-meta-box {
    padding: 0;
}

/* Save toast */
.wbs-save-toast {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #00a32a;
    color: #fff;
    padding: 10px 16px;
    border-radius: 4px;
    margin: 10px 15px;
    font-weight: 500;
    font-size: 13px;
    animation: wbsToastSlide 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,163,42,0.3);
}

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

.wbs-toast-icon {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ---- Social Preview Section ---- */
.wbs-preview-section {
    background: #f6f7f7;
    border-bottom: 1px solid #c3c4c7;
    padding: 15px;
}

.wbs-preview-section h4 {
    margin: 0 0 12px 0;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wbs-preview-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.wbs-preview-tab {
    padding: 6px 14px;
    border: 1px solid #c3c4c7;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #646970;
    transition: all 0.15s ease;
}

.wbs-preview-tab:hover {
    background: #f0f6fc;
    color: #2271b1;
}

.wbs-preview-tab.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.wbs-preview-panel {
    display: none;
    animation: wbsFadeIn 0.2s ease;
}

.wbs-preview-panel.active {
    display: block;
}

@keyframes wbsFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Google Preview */
.wbs-google-preview {
    background: #fff;
    border: 1px solid #dfe1e5;
    border-radius: 8px;
    padding: 16px;
    max-width: 600px;
    font-family: arial, sans-serif;
}

.wbs-google-url {
    color: #202124;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wbs-google-url::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 28px;
    background: #f4f4f4;
    border-radius: 50%;
    flex-shrink: 0;
}

.wbs-google-title {
    color: #1a0dab;
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 6px;
    cursor: pointer;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wbs-google-title:hover {
    text-decoration: underline;
}

.wbs-google-desc {
    color: #4d5156;
    font-size: 14px;
    line-height: 1.58;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Facebook Preview */
.wbs-facebook-preview {
    background: #fff;
    border: 1px solid #dadde1;
    border-radius: 8px;
    max-width: 500px;
    overflow: hidden;
    font-family: Helvetica, Arial, sans-serif;
}

.wbs-fb-image-wrap {
    width: 100%;
    height: 260px;
    background: #f0f2f5;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wbs-fb-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wbs-fb-content {
    padding: 12px 16px;
    background: #f0f2f5;
}

.wbs-fb-domain {
    color: #606770;
    font-size: 12px;
    line-height: 16px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.wbs-fb-title {
    color: #1c1e21;
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wbs-fb-desc {
    color: #606770;
    font-size: 14px;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Twitter/X Preview */
.wbs-twitter-preview {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    max-width: 500px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.wbs-tw-image-wrap {
    width: 100%;
    height: 260px;
    background: #e1e8ed;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wbs-tw-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wbs-tw-content {
    padding: 12px 16px;
    border-top: 1px solid #e1e8ed;
}

.wbs-tw-title {
    color: #0f1419;
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wbs-tw-desc {
    color: #536471;
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wbs-tw-domain {
    color: #536471;
    font-size: 13px;
    line-height: 18px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wbs-tw-domain::before {
    content: '\1F517';
    font-size: 12px;
}

/* ---- Edit Tabs ---- */
.wbs-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #c3c4c7;
    background: #f6f7f7;
    padding: 0 15px;
    gap: 2px;
}

.wbs-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    color: #646970;
    font-size: 13px;
    transition: all 0.15s ease;
    margin-bottom: -1px;
}

.wbs-tab:hover {
    color: #1d2327;
    background: #f0f0f1;
}

.wbs-tab.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
    background: #fff;
}

.wbs-tab .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.wbs-tab-content {
    display: none;
    padding: 15px;
    animation: wbsFadeIn 0.2s ease;
}

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

/* Field rows */
.wbs-field-row {
    margin-bottom: 15px;
}

.wbs-field-row:last-child {
    margin-bottom: 0;
}

.wbs-two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 600px) {
    .wbs-two-col {
        grid-template-columns: 1fr 1fr;
    }
}

.wbs-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1d2327;
    font-size: 13px;
}

.wbs-field-group input[type="text"],
.wbs-field-group input[type="url"],
.wbs-field-group textarea,
.wbs-field-group select {
    margin-bottom: 4px;
    width: 100%;
}

/* Character counter */
.wbs-char-count {
    display: inline-block;
    font-size: 12px;
    color: #646970;
    margin-left: 5px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 3px;
    background: #f6f7f7;
    transition: all 0.2s ease;
}

.wbs-char-count.wbs-good {
    color: #00a32a;
    background: #edfaef;
}

.wbs-char-count.wbs-warning {
    color: #dba617;
    background: #fcf9e8;
}

.wbs-char-count.wbs-over-limit {
    color: #d63638;
    background: #fcf0f1;
    font-weight: 700;
}

/* Hint text */
.wbs-hint {
    display: block;
    font-size: 12px;
    color: #8c8f94;
    margin-top: 3px;
    margin-bottom: 0;
    line-height: 1.4;
}

/* Image actions */
.wbs-image-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.wbs-image-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wbs-image-actions .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
}

/* Image preview */
.wbs-image-preview {
    margin-top: 10px;
}

.wbs-image-preview img {
    max-width: 100%;
    max-height: 200px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 4px;
    background: #fff;
    display: block;
}

/* Checkboxes */
.wbs-checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.wbs-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: normal !important;
    font-size: 13px;
}

.wbs-checkbox-label input[type="checkbox"] {
    margin: 0;
}

/* ---- Quick Edit ---- */
.wbs-quick-edit {
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 12px 15px;
}

.wbs-qe-row {
    margin-bottom: 10px;
}

.wbs-qe-row:last-child {
    margin-bottom: 0;
}

.wbs-qe-row label .title {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 12px;
}

.wbs-qe-row input[type="text"],
.wbs-qe-row input[type="url"],
.wbs-qe-row textarea {
    width: 100%;
    margin-bottom: 2px;
}

.wbs-qe-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.wbs-qe-excerpt textarea {
    background: #fff;
}

/* ---- Gutenberg Sidebar ---- */
.wbs-gutenberg-panel .components-panel__body-title button {
    font-weight: 600;
}

.wbs-gutenberg-panel .components-base-control__help {
    font-size: 12px;
    margin-top: 4px;
}

.wbs-gutenberg-panel .wbs-gb-counter {
    display: inline-block;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 4px;
    font-weight: 500;
}

.wbs-gutenberg-panel .wbs-gb-counter.wbs-good {
    color: #00a32a;
    background: #edfaef;
}

.wbs-gutenberg-panel .wbs-gb-counter.wbs-warning {
    color: #dba617;
    background: #fcf9e8;
}

.wbs-gutenberg-panel .wbs-gb-counter.wbs-over-limit {
    color: #d63638;
    background: #fcf0f1;
    font-weight: 700;
}

/* ---- Mobile Responsive ---- */
@media screen and (max-width: 600px) {
    .wbs-tabs {
        padding: 0 8px;
    }
    .wbs-tab {
        padding: 8px 10px;
        font-size: 12px;
    }
    .wbs-tab .dashicons {
        display: none;
    }
    .wbs-tab-content {
        padding: 10px;
    }
    .wbs-preview-section {
        padding: 10px;
    }
    .wbs-google-preview,
    .wbs-facebook-preview,
    .wbs-twitter-preview {
        max-width: 100%;
    }
    .wbs-fb-image-wrap,
    .wbs-tw-image-wrap {
        height: 180px;
    }
    .wbs-about-hero {
        padding: 20px;
    }
    .wbs-donation-options {
        flex-direction: column;
    }
    .wbs-donate-btn {
        width: 100%;
        text-align: center;
    }
}

/* ---- Spin animation for import button ---- */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.wbs-import-btn .dashicons {
    line-height: 1;
    vertical-align: middle;
}
