:root {
    --primary-color: #007bff;
    --primary-hover-color: #0056b3;
    --secondary-color: #f1f1f1;
    --secondary-hover-color: #e2e2e2;
    --text-color: #333;
    --inactive-color: #636d75;
    --inactive-bg-color: #f6f6f6;
    --light-text-color: #666;
    --box-shadow-color: rgba(0, 0, 0, 0.1);
    --box-shadow-hover-color: rgba(0, 0, 0, 0.2);
    --selected-box-shadow-color: rgba(0, 123, 255, 0.5);
}

/* General Styling for Inactive Plan Features */
.inactive-plan-feature {
    position: relative;
    margin: 0;
    padding: 18px;
    color: var(--inactive-color);
    background: var(--inactive-bg-color);
    text-decoration: line-through;
}

/* Prevent Hover Effect on Inactive Plan Features */
ul.pricing-features > li.inactive-plan-feature:hover:before {
    content: unset !important;
}

/* Styling for Back Link */
.back-link {
    display: inline-block;
    margin: 20px 0;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.back-link:hover {
    background-color: var(--secondary-hover-color);
}

/* Styling for Category Boxes */
.category-box {
    background: #ffffff;
    padding: 20px;
    margin: 10px 0;
    border-radius: 10px;
    box-shadow: 0 2px 5px var(--box-shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.category-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px var(--box-shadow-hover-color);
}

.category-box i {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.category-box h3 {
    margin-bottom: 15px;
    font-size: 24px;
}

.category-box p {
    margin-bottom: 20px;
    color: var(--light-text-color);
}

.category-box .btn {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    transition: background-color 0.3s ease;
}

.category-box .btn:hover {
    background-color: var(--primary-hover-color);
}

/* Styling for Subcategory Containers */
.subcategory-container {
    margin-top: 30px;
}

.subcategory-container h3 {
    margin-bottom: 20px;
}

.subcategory-container .btn {
    margin-bottom: 10px;
    width: 100%;
}

/** Styling for selecting theme **/
.theme-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px;
}

.theme-box {
    position: relative;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
    width: 31.333333%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.theme-box img {
    width: 100%;
    height: auto;
}

.theme-details {
    padding: 15px;
}

.theme-details h3 {
    margin-top: 0;
}

.theme-box.selected {
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 10px var(--selected-box-shadow-color);
}

.pagination {
    display: flex;
    justify-content: center;
    margin: 20px;
}

.pagination a {
    margin: 0 5px;
    padding: 10px 20px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s ease;
}

.pagination a:hover {
    background-color: #e2e2e2;
}

.pagination a.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.stars-outer {
    display: inline-block;
    position: relative;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.stars-inner {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
}

.stars-outer::before {
    content: "\f006 \f006 \f006 \f006 \f006";
    font-size: 16px;
    color: #ccc;
}

.stars-inner::before {
    content: "\f005 \f005 \f005 \f005 \f005";
    font-size: 16px;
    color: #f8ce0b;
}

.stars-gray::before {
    content: "\f005 \f005 \f005 \f005 \f005";
    font-size: 16px;
    color: #ccc;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.tooltip {
    position: absolute;
    display: inline-block;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: #fff;
    padding: 5px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.theme-box:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* Website builder start page */
.wb-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.wb-step-card {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #d8dee5;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    min-height: 52px;
}

.wb-order-steps {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.wb-order-step {
    opacity: 0.8;
}

.wb-order-step .wb-step-index {
    background: #eef2f7;
    color: #64748b;
}

.wb-order-step.is-active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
    opacity: 1;
}

.wb-order-step.is-active .wb-step-index {
    background: #dbeafe;
    color: #1d4ed8;
}

.wb-order-hint {
    margin: 10px 0 0;
}

.wb-choice-link {
    margin-bottom: 12px !important;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    white-space: normal;
}

.wb-inline-alert {
    margin-bottom: 12px;
}

.wb-step-index {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--primary-color);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.wb-setup-panel {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 18px 18px 4px;
    margin-bottom: 10px;
}

.wb-theme-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.wb-theme-card {
    margin: 0;
    cursor: pointer;
    display: block;
    position: relative;
}

.wb-theme-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wb-theme-card-inner {
    height: 100%;
    border: 1px solid #d8dee5;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.wb-theme-card:hover .wb-theme-card-inner {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.wb-theme-card.is-selected .wb-theme-card-inner,
.wb-theme-radio:checked + .wb-theme-card-inner {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.22), 0 12px 24px rgba(0, 0, 0, 0.08);
}

.wb-theme-selected-mark {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #d8dee5;
    color: var(--primary-color);
    font-weight: 700;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.wb-theme-card.is-selected .wb-theme-selected-mark,
.wb-theme-radio:checked + .wb-theme-card-inner .wb-theme-selected-mark {
    opacity: 1;
    transform: scale(1);
}

.wb-theme-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-bottom: 1px solid #eef1f4;
}

.wb-theme-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 13px;
    background: linear-gradient(135deg, #f4f6f8 0%, #edf1f5 100%);
}

.wb-theme-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
}

.wb-theme-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.wb-theme-desc {
    margin: 0;
    color: #4b5563;
    line-height: 1.4;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wb-theme-meta {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.wb-theme-slug {
    margin: auto 0 0;
    font-size: 12px;
}

.wb-plugin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.wb-plugin-card {
    margin: 0;
    cursor: pointer;
    display: block;
}

.wb-plugin-card-inner {
    border: 1px solid #d8dee5;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 78px;
}

.wb-plugin-card-inner small {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

.wb-plugin-card:hover .wb-plugin-card-inner {
    border-color: #bfc9d4;
}

.wb-plugin-card.is-selected .wb-plugin-card-inner {
    border-color: var(--primary-color);
    background: #f7fbff;
    box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.2);
}

.wb-plugin-checkbox {
    margin-top: 2px;
}

.wb-sticky-submit {
    position: sticky;
    bottom: 10px;
    z-index: 4;
    margin-top: 14px;
    padding: 10px;
    border: 1px solid #d8dee5;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

@media (max-width: 991px) {
    .wb-steps,
    .wb-order-steps,
    .wb-theme-grid,
    .wb-plugin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .wb-steps,
    .wb-order-steps,
    .wb-theme-grid,
    .wb-plugin-grid {
        grid-template-columns: 1fr;
    }

    .wb-setup-panel {
        padding: 14px 14px 2px;
    }

    .wb-sticky-submit .btn {
        min-height: 48px;
        font-size: 16px;
    }
}

/* ================================================
   Dashboard page
   ================================================ */

.sitepress-project-grid,
.wb-dashboard-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
}

.sitepress-project-card,
.wb-dashboard-card {
    background: #fff;
    border: 1px solid #d6e6f8;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(16, 45, 74, 0.06);
    min-width: 0;
    padding: 14px;
}

.sitepress-project-card-header,
.wb-dashboard-card__head {
    align-items: center;
    border-bottom: 1px solid #edf4fb;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.sitepress-project-domain,
.wb-dashboard-card__title {
    color: #1d3553;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.sitepress-project-meta,
.wb-dashboard-meta {
    background: #f8fbff;
    border: 1px solid #e4eef9;
    border-radius: 8px;
    display: grid;
    gap: 7px 12px;
    grid-template-columns: minmax(96px, max-content) minmax(0, 1fr);
    margin: 0;
    padding: 10px 12px;
}

.sitepress-project-meta dt,
.wb-dashboard-meta dt {
    color: #6b7f95;
    font-size: 12px;
    font-weight: 600;
    margin: 0;
}

.sitepress-project-meta dd,
.wb-dashboard-meta dd {
    color: #1f3550;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.sitepress-project-actions,
.wb-dashboard-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.sitepress-project-action {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
    justify-content: center;
    line-height: 1.2;
    min-height: 34px;
    padding: 7px 11px;
    white-space: nowrap;
}

.sitepress-project-danger {
    border-top: 1px solid #edf4fb;
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 10px;
}

.sitepress-project-delete {
    align-items: center;
    background: #fff;
    border: 1px solid #f2b8b8;
    border-radius: 6px;
    color: #b42318;
    display: inline-flex;
    font-size: 12px;
    font-weight: 600;
    gap: 6px;
    justify-content: center;
    line-height: 1.2;
    min-height: 32px;
    padding: 6px 10px;
    white-space: nowrap;
}

.sitepress-project-delete:hover,
.sitepress-project-delete:focus {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 991px) {
    .sitepress-project-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   Preview page
   ================================================ */

.wb-preview-meta-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wb-preview-meta-item {
    background: #f8fbff;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    padding: 14px 16px;
}

.wb-preview-meta-item--full {
    grid-column: 1 / -1;
}

.wb-preview-meta-label {
    color: #5f6f83;
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.wb-preview-meta-value {
    color: #1d2f45;
    font-size: 15px;
    line-height: 1.5;
}

.wb-preview-meta-value a {
    color: #2f6fed;
    font-weight: 600;
}

.wb-preview-plugin-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wb-preview-banner {
    margin-bottom: 16px;
    border-radius: 8px;
}

.wb-preview-summary {
    margin-bottom: 20px;
}

.wb-summary-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 16px;
    margin: 0;
    padding: 6px 0;
}

.wb-summary-list dt {
    font-weight: 600;
    color: #374151;
    align-self: start;
    padding-top: 2px;
}

.wb-summary-list dd {
    margin: 0;
    color: #374151;
    word-break: break-word;
}

.wb-plugin-badge {
    display: inline-block;
    margin: 0;
    background: #eef4ff;
    color: #2356b6;
    border: 1px solid #d4e2ff;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
}

/* Status label chips */
.wb-status-label {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
}

.wb-status-ready {
    background: #d1fae5;
    color: #065f46;
}

.wb-status-published {
    background: #d1fae5;
    color: #065f46;
}

.wb-status-provisioning {
    background: #dbeafe;
    color: #1e40af;
}

.wb-status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.sitepress-status-badge,
.wb-status-chip {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    flex: 0 0 auto;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    padding: 5px 9px;
    white-space: nowrap;
}

.wb-status--default {
    background: #f1f5f9;
    border-color: #d7e0ea;
    color: #334155;
}

.wb-status--ready,
.wb-status--published {
    background: #dcfce7;
    border-color: #b7f0ca;
    color: #166534;
}

.wb-status--provisioning {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.wb-status--publishing {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #075985;
}

.wb-status--failed {
    background: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
}

.wb-status--expired {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.wb-preview-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.wb-btn-primary {
    min-width: 160px;
}

.wb-btn-secondary {
    min-width: 140px;
}

.cpanel-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.cpanel-inline-actions .btn {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    justify-content: center;
    min-height: 42px;
}

.wb-design-switch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.wb-design-switch-actions .wb-design-switch-btn {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    justify-content: center;
    min-height: 42px;
    margin: 0 !important;
    padding: 10px 16px;
    line-height: 1.2;
    font-weight: 600;
    border-radius: 12px;
    vertical-align: middle;
}

.wb-design-switch-actions .wb-design-switch-btn .fa {
    line-height: 1;
}

.wb-design-switch-actions .btn-primary.wb-design-switch-btn {
    box-shadow: none;
}

.wb-design-preview-card {
    margin-bottom: 14px;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background: #f8fbff;
    overflow: hidden;
}

.wb-design-preview-card__media {
    border-bottom: 1px solid #dbe5f0;
    background: #eef3f9;
}

.wb-design-preview-card__media img {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: cover;
}

.wb-design-preview-card__placeholder {
    align-items: center;
    color: #5f6f83;
    display: flex;
    justify-content: center;
    gap: 8px;
    min-height: 180px;
    font-size: 14px;
}

.wb-design-preview-card__body {
    padding: 12px 14px;
}

.wb-design-preview-card__body p {
    margin: 6px 0 0;
}

.wb-preview-sidebar {
    padding: 14px;
}

.wb-diagnostics {
    margin-top: 16px;
    padding: 12px;
    background: #f9f9f9;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.wb-diagnostics-pre {
    margin: 8px 0 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 12px;
    color: #6b7280;
}

/* ================================================
   Publish page
   ================================================ */

.wb-publish-card,
.wb-publish-help {
    padding: 20px 20px 16px;
    margin-bottom: 20px;
}

.wb-publish-subtitle {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.wb-publish-divider {
    margin: 18px 0;
    border-top: 1px solid #e5e7eb;
}

.wb-domain-input-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid #ced4da;
    border-radius: 6px;
    overflow: hidden;
}

.wb-domain-prefix {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 13px;
    border-right: 1px solid #ced4da;
    white-space: nowrap;
    user-select: none;
}

.wb-domain-input {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex: 1;
}

.wb-domain-input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.wb-publish-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.wb-help-list {
    padding-left: 18px;
    margin: 0 0 0 0;
    color: #4b5563;
}

.wb-help-list li {
    margin-bottom: 8px;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .sitepress-project-grid,
    .wb-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .sitepress-project-card-header {
        align-items: flex-start;
    }

    .sitepress-project-actions {
        align-items: stretch;
    }

    .sitepress-project-action {
        flex: 1 1 150px;
        white-space: normal;
    }

    .sitepress-project-danger {
        justify-content: stretch;
    }

    .sitepress-project-delete {
        width: 100%;
        white-space: normal;
    }

    .wb-preview-meta-grid {
        grid-template-columns: 1fr;
    }

    .wb-summary-list {
        grid-template-columns: 1fr;
        gap: 2px 0;
    }

    .wb-summary-list dt {
        margin-top: 8px;
    }

    .wb-preview-actions,
    .wb-publish-actions,
    .wb-design-switch-actions,
    .cpanel-inline-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .wb-btn-primary,
    .wb-btn-secondary,
    .wb-design-switch-actions .wb-design-switch-btn,
    .cpanel-inline-actions .btn {
        width: 100%;
        min-height: 44px;
        font-size: 15px;
    }
}


/* ============================================================
   Camoo Website Builder — Editor UI
   ============================================================ */

.wb-editor-wrap {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 18px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 640px;
    padding: 0;
    background: transparent;
}

.wb-editor-page-locked .wb-editor-wrap {
    user-select: none;
}

.wb-editor-ai-blocker {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(13, 23, 36, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wb-editor-ai-blocker__content {
    background: #fff;
    border: 1px solid #d8e3ef;
    box-shadow: 0 16px 36px rgba(16, 45, 74, 0.2);
    border-radius: 12px;
    color: #1f3550;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
}

/* Left panel */
.wb-editor-panel {
    width: 100%;
    min-width: 0;
    background: #fff;
    border: 1px solid rgba(219, 229, 240, 0.95);
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(16, 45, 74, 0.08);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.wb-editor-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(219, 229, 240, 0.95);
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.wb-editor-back {
    align-items: center;
    background: #fff;
    border: 1px solid #dce7f4;
    border-radius: 999px;
    color: #29486a;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
    padding: 6px 12px;
    text-decoration: none;
    white-space: nowrap;
}

.wb-editor-back:hover {
    border-color: #2f6fed;
    color: #2f6fed;
    text-decoration: none;
}

.wb-editor-title {
    color: #162b46;
    font-weight: 800;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tabs */
.wb-editor-tabs {
    list-style: none;
    margin: 0;
    padding: 8px;
    display: flex;
    border-bottom: 1px solid rgba(219, 229, 240, 0.95);
}

.wb-editor-tab {
    flex: 1;
    text-align: center;
    padding: 9px 8px;
    cursor: pointer;
    font-size: 12px;
    color: #5c6f86;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 700;
    margin: 0 3px;
    transition: color .15s, border-color .15s;
}

.wb-editor-tab:hover { color: #2f6fed; }

.wb-editor-tab.active {
    color: #2f6fed;
    background: #eef4ff;
    border-color: #d7e5ff;
}

.wb-generic-editor-sticky {
    position: sticky;
    top: 0;
    z-index: 6;
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(219, 229, 240, 0.95);
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.wb-generic-editor-sticky .wb-editor-section-title {
    margin: 0 0 6px;
    padding-bottom: 5px;
}

.wb-generic-editor-sticky #wb-generic-label {
    margin-bottom: 8px;
}

.wb-generic-editor-tabs {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: flex;
    gap: 8px;
}

.wb-generic-editor-tab {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background: #fff;
    color: #53657d;
    cursor: pointer;
    font-weight: 700;
}

.wb-generic-editor-tab.active {
    background: #eef4ff;
    color: #2f6fed;
    border-color: #cfe0ff;
}

.wb-generic-editor-sticky .wb-design-group.hidden,
.wb-generic-editor-sticky #wb-generic-content-panel.hidden,
.wb-generic-editor-sticky #wb-generic-design-editor.hidden {
    display: none;
}

.wb-generic-editor-sticky .wb-design-group {
    margin-bottom: 12px;
}

.wb-color-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wb-color-picker {
    width: 44px;
    height: 38px;
    padding: 2px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
}

.wb-color-preview {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
    background: #fff;
}

.wb-color-preview--empty {
    background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 6px, #e2e8f0 6px, #e2e8f0 12px);
}

.wb-color-preview--overlay {
    width: 64px;
}

.wb-color-preview--overlay-none {
    background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 6px, #e2e8f0 6px, #e2e8f0 12px);
}

.wb-color-preview--overlay-light {
    background: rgba(255, 255, 255, 0.8);
}

.wb-color-preview--overlay-dark {
    background: rgba(17, 24, 39, 0.8);
}

.wb-color-swatch-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.wb-color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #cbd5e1;
    cursor: pointer;
    padding: 0;
    position: relative;
    overflow: hidden;
    background: #fff;
}

.wb-color-swatch.is-active {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.wb-color-swatch--overlay {
    width: auto;
    min-width: 68px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #1f2937;
    background: #fff;
}

.wb-color-swatch--overlay[data-overlay-value="none"] { background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 6px, #e2e8f0 6px, #e2e8f0 12px); }
.wb-color-swatch--overlay[data-overlay-value="light"] { background: rgba(255, 255, 255, 0.9); }
.wb-color-swatch--overlay[data-overlay-value="dark"] { background: rgba(17, 24, 39, 0.9); color: #fff; }

.wb-color-swatch__label {
    position: relative;
    z-index: 1;
}

#wb-generic-open-link-btn {
    margin-left: 8px;
}

.wb-selected-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.wb-selected-image-card {
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    padding: 8px;
    background: #f8fbff;
}

.wb-selected-image-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #4a607a;
    margin-bottom: 6px;
}

.wb-selected-image-preview {
    width: 100%;
    max-height: 140px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #d4e0ee;
    background: #fff;
}

.wb-selected-image-empty {
    font-size: 12px;
    color: #5f6f83;
    min-height: 60px;
    display: flex;
    align-items: center;
}

/* Panes */
.wb-editor-pane {
    display: none;
    padding: 18px 16px;
    flex: 1;
    background: #fff;
}

.wb-editor-pane.active { display: block; }

.wb-editor-pane .form-control {
    border: 1px solid #d4e0ee;
    border-radius: 8px;
    box-shadow: none;
    min-height: 38px;
}

.wb-editor-pane textarea.form-control {
    min-height: 74px;
}

.wb-editor-pane .form-control:focus {
    border-color: #2f6fed;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
}

.wb-editor-section-title {
    font-size: 13px;
    font-weight: 800;
    color: #213956;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 18px 0 12px;
    padding-bottom: 7px;
    border-bottom: 1px solid #e6eef7;
}

.wb-editor-section-title:first-child { margin-top: 0; }

/* Service items */
.wb-service-item {
    background: #f8fbff;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.wb-service-item-head {
    color: #4a607a;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* Form actions */
.wb-editor-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid rgba(219, 229, 240, 0.95);
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.wb-editor-apply-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid rgba(219, 229, 240, 0.95);
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.wb-editor-apply-hint { font-size: 12px; }

.wb-editor-actions .btn,
.wb-editor-apply-bar .btn {
    border-radius: 10px;
    font-weight: 700;
}

#wb-ai-status {
    color: #5f6f83;
    font-size: 12px;
    margin: 0 16px 10px;
}

/* Color picker */
.wb-color-picker { width: 60px; height: 34px; padding: 2px; cursor: pointer; }

/* Upload widget */
.wb-upload-widget { margin-top: 4px; }

.wb-media-thumb-img,
.wb-media-thumb { max-width: 120px; max-height: 80px; border: 1px solid #ddd; border-radius: 3px; display: block; margin-bottom: 8px; }

/* Gallery thumbs */
.wb-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.wb-gallery-thumb {
    position: relative;
    width: 80px;
}

.wb-gallery-thumb .wb-thumb-img img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.wb-gallery-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    padding: 1px 5px;
    font-size: 11px;
    line-height: 1.4;
}

/* Right preview */
.wb-editor-preview {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(219, 229, 240, 0.95);
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(16, 45, 74, 0.08);
    overflow: hidden;
}

.wb-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    border-bottom: 1px solid rgba(219, 229, 240, 0.95);
    position: sticky;
    top: 0;
    z-index: 5;
}

.wb-device-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
}
.wb-preview-mode-buttons {
    display: inline-flex;
    gap: 0;
    border: 1px solid #d6e1ee;
    border-radius: 10px;
    background: #f6f9fd;
    padding: 2px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.wb-preview-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.wb-preview-toolbar .btn {
    border: 1px solid #d8e3ef;
    border-radius: 8px;
    color: #365372;
    font-weight: 600;
}

.wb-preview-toolbar .btn.active,
.wb-preview-toolbar .btn:hover {
    border-color: #2f6fed;
    color: #2f6fed;
}

.wb-device {
    min-width: 42px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .15s ease;
}

.wb-device.active {
    background: linear-gradient(180deg, #f7fbff 0%, #e7f1ff 100%);
    border-color: #2f6fed !important;
    color: #1450a8 !important;
    box-shadow: 0 2px 8px rgba(47, 111, 237, 0.2), inset 0 0 0 1px rgba(47, 111, 237, 0.2);
}

.wb-device-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #d0def0;
    background: #f4f8ff;
    color: #204668;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.wb-device-status i {
    color: #2f6fed;
}

.wb-device-status--toolbar {
    margin-left: 0;
    background: linear-gradient(180deg, #f8fbff 0%, #eaf3ff 100%);
    border-color: #bcd4f6;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.wb-preview-mode-btn {
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #4b627a !important;
    font-weight: 700 !important;
    letter-spacing: .01em;
    min-width: 118px;
    transition: background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .06s ease;
}

.wb-preview-mode-btn:hover {
    background: #ecf2f9 !important;
    color: #243e58 !important;
}

.wb-preview-mode-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18) !important;
}

.wb-preview-mode-btn.active {
    background: linear-gradient(180deg, #ffffff 0%, #edf4ff 100%) !important;
    color: #1f4f8d !important;
    box-shadow: 0 1px 2px rgba(23, 47, 76, 0.12), inset 0 0 0 1px rgba(47, 111, 237, 0.22);
}

.wb-preview-mode-btn:active {
    transform: translateY(1px);
}

.wb-preview-action-btn {
    min-height: 38px;
    padding: 7px 14px;
    border-radius: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    transition: transform .08s ease, box-shadow .16s ease, border-color .16s ease, color .16s ease;
}

.wb-preview-action-btn i {
    font-size: 13px;
    width: 13px;
    text-align: center;
}

.wb-preview-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 67, 111, 0.14);
}

.wb-preview-action-btn:active {
    transform: translateY(0);
}

.wb-preview-action-btn--refresh.is-loading i {
    animation: wb-spin .8s linear infinite;
}

.wb-preview-action-btn--refresh {
    background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
}

.wb-preview-action-btn--open {
    background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
    border-color: #c6d6ea !important;
}

@keyframes wb-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.wb-editor-tip {
    border-radius: 10px;
    margin: 12px;
}

.wb-iframe-wrap {
    flex: 1;
    margin: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    transition: max-width .25s;
    min-height: 620px;
    padding: 14px;
    background: #f4f7fb;
    border-top: 1px solid #e0e8f2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: auto;
}

.wb-preview-iframe {
    width: 100%;
    height: 100%;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: #fff;
    display: block;
}

.wb-no-preview {
    margin: 20px;
}

/* Responsive: stack on small screens */
@media (max-width: 900px) {
    .wb-editor-wrap {
        grid-template-columns: 1fr;
        gap: 12px;
        min-height: auto;
    }
    
    .wb-editor-panel {
        width: 100%;
        min-width: 0;
        border-right: 1px solid rgba(219, 229, 240, 0.95);
        border-bottom: 1px solid rgba(219, 229, 240, 0.95);
        max-height: 50vh;
    }
    
    .wb-editor-preview {
        min-height: 60vh;
    }

    .wb-iframe-wrap {
        min-height: 420px;
    }

    .wb-selected-image-grid {
        grid-template-columns: 1fr;
    }
}


/* AI generate button loading state */
.wb-ai-generate-btn.is-loading {
    opacity: 0.75;
    cursor: wait;
    pointer-events: none;
}

/* Editor locked during AI generation */
.wb-editor-locked {
    position: relative;
    pointer-events: none;
    user-select: none;
    opacity: 0.6;
}

.wb-editor-locked::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.45);
    z-index: 10;
    cursor: wait;
}

.wb-field-highlight {
    outline: 2px solid #2f80ed !important;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.15) !important;
}

.wb-ai-generate-btn.is-loading::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    vertical-align: -2px;
    animation: wb-spin 0.8s linear infinite;
}

@keyframes wb-spin {
    to {
        transform: rotate(360deg);
    }
}
