/* Layout & Tabs */
.writdr-dashboard {
    max-width: 1000px;
    margin: 20px 0;
}

.writdr-tabs-nav {
    border-bottom: 1px solid #c3c4c7;
    margin-bottom: 20px;
}

.writdr-tab-btn {
    background: transparent;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #50575e;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.writdr-tab-btn:hover {
    color: #2271b1;
}

.writdr-tab-btn.active {
    border-bottom-color: #2271b1;
    color: #2271b1;
}

.writdr-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    padding: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.writdr-card.writdr-no-padding {
    padding: 0;
}

/* Engine Sidebar Layout */
.writdr-engine-layout {
    display: flex;
    min-height: 400px;
}

.writdr-engine-sidebar {
    width: 200px;
    background: #f6f7f7;
    border-right: 1px solid #c3c4c7;
    padding-top: 10px;
}

.writdr-engine-sidebar h3 {
    padding: 0 15px;
    font-size: 12px;
    text-transform: uppercase;
    color: #646970;
    margin-bottom: 5px;
}

.writdr-engine-sidebar ul {
    margin: 0;
}

.writdr-engine-sidebar li {
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.writdr-engine-sidebar li:hover {
    background: #fff;
}

.writdr-engine-sidebar li.active {
    background: #fff;
    border-left-color: #2271b1;
    color: #2271b1;
    font-weight: 600;
}

.writdr-engine-settings {
    flex: 1;
    padding: 25px;
}

.writdr-input-group {
    margin-bottom: 20px;
}

.writdr-input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

/* Status Colors */
.writdr-status-ok {
    color: #46b450;
    font-weight: bold;
}



/* --- Global Badge Styles --- */
.writdr-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    line-height: 1.2;
    vertical-align: middle;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



/* NEW: Eye-catching "PRO Feature" Lock Badge (Gold Gradient) */
.writdr-badge.writdr-pro-lock {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #fff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 4px rgba(253, 160, 133, 0.3);
    border: 1px solid #fbdc8e;
}

/* Optional: Add a tiny lock icon inside the badge */
.writdr-badge.writdr-pro-lock .dashicons {
    font-size: 10px;
    width: 10px;
    height: 10px;
    line-height: 1;
    margin-right: 3px;
    margin-top: 1px;
}



/* Enterprise Branding Styles */
.writdr-header-hero {
    background: #fff;
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.writdr-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #23282d;
}

.writdr-brand h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1;
}

.writdr-brand small {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #eee;
    padding: 2px 5px;
    border-radius: 4px;
}


.writdr-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
}

.writdr-tag.writdr-success {
    background: #d1e7dd;
    color: #0f5132;
}

.writdr-tag.writdr-warning {
    background: #fff3cd;
    color: #664d03;
}

.writdr-notice-box {
    background: #f0f6fc;
    border: 1px solid #d0d7de;
    padding: 15px;
    border-radius: 6px;
}

/* --- Premium Active Plan Badge (Dashboard) --- */
.writdr-badge.writdr-pro-active {
    background: linear-gradient(135deg, #6f42c1 0%, #8e44ad 100%);
    color: #ffffff;
    border: 1px solid #59359a;
    box-shadow: 0 3px 6px rgba(111, 66, 193, 0.25);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    /* Makes it pill-shaped for the dashboard */
}

/* Make sure the dashicon inside lines up perfectly */
.writdr-badge.writdr-pro-active .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
}

/* Clean Free Tier Badge */
.writdr-badge.writdr-free-tier {
    background: #f0f0f1;
    color: #646970;
    border: 1px solid #c3c4c7;
    border-radius: 20px;
}


/* --- Password Visibility Toggle --- */
.writdr-password-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 400px;
    /* Keeps regular-text size constrained */
}

/* For widefat inputs in the engine sidebar */
.writdr-widefat-wrapper {
    max-width: 100%;
}

.writdr-password-wrapper input {
    width: 100%;
    padding-right: 40px;
    /* Make room for the eye icon */
}

.writdr-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #8c8f94;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.writdr-password-toggle:hover {
    color: #2271b1;
}

.writdr-password-toggle:focus {
    outline: none;
    box-shadow: none;
}


/* Dark background overlay */
.writdr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    /* Dims the background */
    z-index: 99999;
    /* Ensures it is on top of everything */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The actual white window */
.writdr-modal-window {
    background: #fff;
    width: 80%;
    max-width: 700px;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: writdrFadeIn 0.3s ease;
}

.writdr-modal-header {
    padding: 20px;
    background: #f6f7f7;
    border-bottom: 1px solid #dcdcde;
    display: flex;
    justify-content: space-between;
}

.writdr-modal-close {
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    color: #646970;
}

.writdr-modal-content {
    padding: 30px;
    overflow-y: auto;
    /* Makes long text scrollable */
    line-height: 1.6;
}

@keyframes writdrFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.writdr-placeholder-item {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: default;
}

.writdr-pro-link {
    font-size: 11px;
    text-decoration: none;
    color: #2271b1;
    font-weight: 600;
}

.writdr-pro-link:hover {
    text-decoration: underline;
}