/* core layout */
.aipt-post-writer { max-width: 1100px; margin: 28px auto; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; color: #111827; }
.aipt-post-writer-card { background:#fff; border-radius:14px; padding:22px; box-shadow:0 10px 30px rgba(15,23,42,0.06); border:1px solid #f3f4f6; }
.aipt-header { margin-bottom:12px; }
.aipt-heading { font-size:1.4rem; margin:0; }
.aipt-subtext { color:#6b7280; margin-top:6px; font-size:0.95rem; }

/* form */
.aipt-form { margin-top:14px; }
.aipt-field { margin-bottom:14px; }
.aipt-field label { display:block; font-weight:600; margin-bottom:7px; color:#374151; font-size:0.9rem; }
.aipt-field input, .aipt-field select, .aipt-field textarea { width:100%; padding:10px 12px; border-radius:8px; border:1px solid #e6e7eb; font-size:0.95rem; background:#fff; box-sizing:border-box; }
.aipt-row { display:flex; gap:12px; flex-wrap:wrap; }
.aipt-row .aipt-field { flex:1 1 220px; min-width:180px; }

/* keywords */
.aipt-keywords-wrap { display:block; }
.aipt-keywords-list { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.aipt-keywords-list .aipt-chip { padding:6px 10px; border-radius:999px; background:#eef2ff; border:1px solid #e0e7ff; font-size:0.9rem; display:inline-flex; align-items:center; gap:8px; }
.aipt-keywords-list .aipt-chip button { background:none; border:none; cursor:pointer; font-weight:700; color:#374151; }

/* actions */
.aipt-actions { display:flex; gap:10px; align-items:center; margin-top:10px; }
.aipt-generate { background:linear-gradient(90deg,#2563eb,#1d4ed8); color:#fff; padding:10px 16px; border-radius:10px; border:none; cursor:pointer; font-weight:600; display:inline-flex; align-items:center; gap:10px; }
.aipt-generate .spinner { display:none; width:16px; height:16px; border:2px solid rgba(255,255,255,0.8); border-top-color: transparent; border-radius:50%; animation:spin .8s linear infinite; }
.aipt-clear { background:#f3f4f6; border-radius:10px; padding:8px 12px; border:1px solid #e5e7eb; cursor:pointer; }
.aipt-status { margin-left:8px; color:#6b7280; font-size:0.9rem; }

/* grid output */
.aipt-output-grid { display:grid; grid-template-columns: 1fr 320px; gap:18px; margin-top:20px; }
.aipt-article { background:#fcfcfd; padding:18px; border-radius:10px; border:1px solid #f1f5f9; min-height:260px; overflow:auto; }
.aipt-result { color:#111827; line-height:1.7; }
.aipt-result img { max-width:100%; height:auto; display:block; margin:12px 0; border-radius:8px; }
.aipt-result h1, .aipt-result h2, .aipt-result h3 { color:#0f172a; margin-top:16px; margin-bottom:8px; }

/* aside meta */
.aipt-meta { background:#fff; padding:14px; border-radius:10px; border:1px solid #f3f4f6; min-height:260px; }
.aipt-meta h4 { margin:0 0 8px 0; font-size:1rem; }
.aipt-meta input, .aipt-meta textarea { background:#f8fafc; }
.aipt-tags-list { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.aipt-tag { background:#eef2ff; padding:6px 10px; border-radius:999px; border:1px solid #e0e7ff; }

/* suggestions */
.aipt-suggestions { font-size:0.95rem; color:#374151; background:#f8fafc; padding:8px; border-radius:8px; min-height:60px; }

/* download */
.aipt-meta-actions { margin-top:12px; }
.aipt-download { background:#10b981; color:#fff; padding:8px 12px; border-radius:8px; border:none; cursor:pointer; }

/* === Layout adjustment: post full width, SEO below === */
@media (min-width:981px) {
    .aipt-output-grid {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    .aipt-article {
        width: 100%;
        min-height: 400px; /* optionally increase for full content */
    }

    .aipt-meta {
        width: 100%;
        margin-top: 16px; /* spacing below post */
    }
}

/* small screens */
@media (max-width:980px) {
    .aipt-output-grid { grid-template-columns: 1fr; }
}

/* spinner animation */
@keyframes spin { from { transform: rotate(0deg);} to { transform: rotate(360deg);} }

/* Hide SEO & Extras initially */
.aipt-meta {
    display: none;
}

.aipt-meta {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    max-width: 100%;
    margin-top: 20px;
    font-family: 'Inter', sans-serif;
}

.aipt-meta h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.aipt-meta-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.aipt-meta-field label {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 5px;
    color: #374151;
}

.aipt-meta-field input,
.aipt-meta-field textarea {
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    color: #111827;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.aipt-meta-field input:focus,
.aipt-meta-field textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
    outline: none;
    background: #fff;
}

.aipt-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.aipt-tags-list .aipt-tag {
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
}

.aipt-suggestions {
    background: #f3f4f6;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #111827;
    min-height: 50px;
}

.aipt-meta-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.aipt-meta-actions button {
    padding: 8px 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.aipt-download {
    background: #10b981;
    color: #fff;
}

.aipt-download:hover {
    background: #059669;
}

.aipt-save-post {
    background: #2563eb;
    color: #fff;
}

.aipt-save-post:hover {
    background: #1d4ed8;
}

.aipt-copy {
    background: #f59e0b; /* Amber */
    color: #fff;
}

.aipt-copy:hover {
    background: #d97706;
}


