/* =========================================
   1. GLOBAL & LAYOUT
   ========================================= */
.wn-dashboard-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
}

/* Header Section */
.wn-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.wn-welcome h2 {
    margin: 0 0 5px 0;
    font-size: 28px;
    font-weight: 700;
    color: #23282d;
}

.wn-welcome p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.wn-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.button.wn-btn-create {
    background: #d32f2f !important; /* WriteNow Red */
    border-color: #d32f2f !important;
    color: #fff !important;
    text-transform: uppercase;
    font-weight: 600;
    padding: 10px 20px !important;
    height: auto !important;
    line-height: 1.4 !important;
}

.button.wn-btn-create:hover {
    background: #b71c1c !important;
}

.button.wn-btn-logout {
    border: 1px solid #ccc !important;
    background: #fff !important;
    color: #555 !important;
}

/* =========================================
   2. STATS BAR
   ========================================= */
.wn-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.wn-stat-box {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    text-align: center;
    transition: transform 0.2s;
}

.wn-stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.wn-stat-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: #0073aa;
    margin-bottom: 5px;
}

.wn-stat-label {
    font-size: 14px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* =========================================
   3. BOOK GRID
   ========================================= */
.wn-books-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #444;
    border-left: 4px solid #d32f2f;
    padding-left: 15px;
}

.wn-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.wn-book-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.wn-book-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transform: translateY(-5px);
    border-color: #d32f2f;
}

/* The visual "Spine" of the book */
.wn-book-cover-placeholder {
    height: 160px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    position: relative;
}

.wn-book-cover-placeholder .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    opacity: 0.5;
    color: #555;
}

.wn-book-details {
    padding: 20px;
    flex-grow: 1;
}

.wn-book-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}

.wn-book-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

/* Status Badges */
.wn-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wn-status-draft { background: #fff8e1; color: #f57c00; }
.wn-status-pending { background: #e3f2fd; color: #1976d2; }
.wn-status-publish { background: #e8f5e9; color: #2e7d32; }

.wn-book-actions {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    text-align: right;
}

/* Empty State */
.wn-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 2px dashed #ddd;
    border-radius: 12px;
    color: #777;
}

/* =========================================
   4. FORMS & INPUTS (From previous steps)
   ========================================= */
.wn-form-container {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    max-width: 800px;
    margin: 0 auto;
}
.wn-form-group { margin-bottom: 25px; }
.wn-form-group label { display: block; font-weight: 600; margin-bottom: 8px; color:#444; }
.wn-form-group input[type="text"], .wn-form-group textarea {
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-size:16px; box-sizing:border-box;
}
.wn-row { display: flex; gap: 20px; margin-bottom: 20px; }
.wn-col-half { flex: 1; }
.wn-hint { font-size: 0.85em; color: #888; margin-top: 5px; }
.wn-success { background: #d4edda; color: #155724; padding: 15px; border-radius: 6px; margin-bottom: 20px; }
.wn-error { background: #fce8e6; color: #d63638; padding: 12px; border-radius: 6px; margin-bottom: 20px; }

/* =========================================
   5. PRICING TABLE (From previous steps)
   ========================================= */
.wn-pricing-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 30px;
}
.wn-pricing-card {
    background: #fff; border: 1px solid #e1e1e1; border-radius: 12px; padding: 30px;
    text-align: center; transition: transform 0.2s; box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.wn-pricing-card:hover { transform: translateY(-5px); border-color: #0073aa; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.wn-pkg-title { font-size: 1.5rem; margin-bottom: 15px; color: #333; }
.wn-pkg-price { font-size: 2.2rem; font-weight: 700; color: #0073aa; margin-bottom: 20px; }
.wn-pkg-desc { color: #666; font-size: 0.95rem; margin-bottom: 25px; line-height: 1.6; }
.wn-btn-buy { width: 100%; justify-content: center; padding: 14px !important; font-size: 1rem !important; border-radius:6px; }

/* =========================================
   6. LOGIN/AUTH CARD (From previous steps)
   ========================================= */
.wn-auth-container {
    max-width: 450px; margin: 60px auto; background: #ffffff;
    border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); overflow: hidden; border: 1px solid #f0f0f0;
}
.wn-auth-tabs { display: flex; background: #f8f9fa; border-bottom: 1px solid #eaeaea; }
.wn-tab-btn {
    flex: 1; padding: 18px; border: none; background: transparent;
    font-size: 15px; font-weight: 600; color: #666; cursor: pointer; outline: none; position: relative;
}
.wn-tab-btn:hover { color: #333; background: #f1f3f5; }
.wn-tab-btn.active { background: #ffffff; color: #0073aa; }
.wn-tab-btn.active::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background-color: #0073aa;
}
.wn-auth-view { padding: 40px 30px; display: none; }
.wn-auth-view.active { display: block; animation: wnFadeIn 0.4s ease; }
.wn-auth-view h3 { text-align: center; margin-top: 0; margin-bottom: 25px; font-size: 1.5rem; color: #2c3338; }
.wn-auth-view label { display: block; font-size: 0.9rem; font-weight: 600; color: #444; margin-bottom: 6px; }
.wn-auth-view input[type="text"], .wn-auth-view input[type="email"], .wn-auth-view input[type="password"] {
    width: 100%; padding: 12px 15px; margin-bottom: 20px; border: 1px solid #dcdcde;
    border-radius: 6px; font-size: 1rem; background-color: #fff; box-sizing: border-box;
}
.wn-auth-view input[type="submit"] {
    width: 100%; padding: 14px; background-color: #0073aa; color: white;
    font-size: 1rem; font-weight: 600; border: none; border-radius: 6px; cursor: pointer; margin-top: 10px;
}
.wn-auth-view input[type="submit"]:hover { background-color: #005177; }
.wn-row-split { display: flex; gap: 15px; }
.wn-row-split > div { flex: 1; }
@keyframes wnFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   7. POLISHED PRICING TABLE
   ========================================= */

.wn-pricing-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    align-items: flex-start; /* Aligns cards at top */
}

.wn-price-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    width: 300px; /* Fixed width for consistency */
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wn-price-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: #b0bec5;
}

/* Featured (Gold) Card Styling */
.wn-price-card.featured {
    border: 2px solid #d32f2f; /* Brand Red */
    transform: scale(1.05); /* Slightly bigger */
    z-index: 2;
    box-shadow: 0 10px 25px rgba(211, 47, 47, 0.15);
}

.wn-price-card.featured:hover {
    transform: scale(1.05) translateY(-8px);
}

.wn-most-popular {
    background: #d32f2f;
    color: #fff;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 0;
    letter-spacing: 1px;
}

/* Header */
.wn-card-header {
    padding: 30px 25px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.wn-plan-title {
    margin: 0;
    font-size: 1.4rem;
    color: #333;
    font-weight: 800;
}

.wn-plan-price {
    margin: 15px 0;
    font-size: 2rem;
    color: #d32f2f;
    font-weight: 700;
}
.wn-plan-price .woocommerce-Price-currencySymbol {
    font-size: 0.6em; /* Make symbol smaller */
    vertical-align: top;
    margin-top: 5px;
    display: inline-block;
}

.wn-plan-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

/* Features List */
.wn-card-features {
    padding: 25px;
    flex-grow: 1; /* Pushes footer down */
}

.wn-card-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wn-card-features li {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #555;
    display: flex;
    align-items: flex-start;
    line-height: 1.4;
}

.wn-card-features li .dashicons {
    color: #2e7d32; /* Green checkmark */
    margin-right: 10px;
    font-size: 18px;
    margin-top: 1px;
}

/* Footer / Button */
.wn-card-footer {
    padding: 25px;
    text-align: center;
    background: #fff;
}

.button.wn-btn-plan {
    width: 100%;
    padding: 12px !important;
    background: #333;
    color: #fff !important;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
    display: block;
    box-sizing: border-box;
    text-align: center;
}

.featured .button.wn-btn-plan {
    background: #d32f2f; /* Red button for Gold */
}

.button.wn-btn-plan:hover {
    background: #000;
    transform: none; /* Override default button hover move */
}

/* --- DIY Section Styles --- */
.wn-diy-section {
    max-width: 960px; /* Match the grid width roughly */
    margin: 50px auto 20px auto;
}

.wn-diy-card {
    background: #f7f7f7; /* Light Grey Background */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #555;
}

.wn-diy-content {
    flex: 1;
    padding-right: 40px;
}

.wn-diy-content h3 {
    margin-top: 0;
    color: #444;
    font-size: 1.4rem;
}

.wn-diy-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.wn-diy-list li {
    font-size: 0.9rem;
    color: #666;
}

.wn-diy-action {
    text-align: center;
    min-width: 180px;
    border-left: 1px solid #ddd;
    padding-left: 30px;
}

.wn-diy-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 10px;
}

.button.wn-btn-diy {
    background: #777;
    color: #fff !important;
    border: none;
    padding: 10px 20px !important;
    text-transform: uppercase;
    font-size: 0.9rem !important;
    border-radius: 4px;
}
.button.wn-btn-diy:hover {
    background: #555;
}

/* Mobile responsive for DIY */
@media (max-width: 768px) {
    .wn-diy-card { flex-direction: column; text-align: center; }
    .wn-diy-content { padding-right: 0; margin-bottom: 20px; }
    .wn-diy-action { border-left: none; padding-left: 0; border-top: 1px solid #ddd; padding-top: 20px; width: 100%; }
}

/* Package Badge */
.wn-package-badge {
    display: inline-block;
    background: #673ab7; /* Deep Purple */
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 5px;
    box-shadow: 0 2px 5px rgba(103, 58, 183, 0.3);
}