/* ==================================================
   Nuclear Fancy Pants Edition™ — NUCLEAR+++
   File: /home/ploi/automarketer-ai.com/public/wp-content/plugins/automarketer-ai/assets/css/manual-post.css
   Description: Styles for the manual Facebook post compose page
   Last Edited: 2026-04-08
   ================================================== */

@import url('fonts.css');

/* ── Page background ── */
#wpcontent,
#wpbody,
#wpbody-content {
    background: #F9FAFB;
}

/* ── Wrap ── */
.amai-manual-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    font-family: 'DM Sans', sans-serif;
    color: #1C1917;
}

/* ── Header ── */
.amai-manual-header {
    margin-bottom: 32px;
}

.amai-manual-title {
    font-family: 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #D97757;
    margin: 0 0 6px;
    line-height: 1.2;
}

.amai-manual-subtitle {
    font-size: 14px;
    color: #78716C;
    margin: 0 0 20px;
}

.amai-manual-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #E7DDD5;
    padding-bottom: 0;
}

.amai-manual-tab {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #78716C;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px 6px 0 0;
    transition: color 0.15s, background 0.15s;
}

.amai-manual-tab:hover {
    color: #D97757;
    background: #FDF6F3;
}

/* ── Not connected ── */
.amai-manual-not-connected {
    background: #fff;
    border: 1.5px solid #E7DDD5;
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
}

.amai-manual-not-connected-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.amai-manual-not-connected-title {
    font-family: 'Nunito', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #1C1917;
    margin-bottom: 8px;
}

.amai-manual-not-connected-body {
    font-size: 14px;
    color: #78716C;
    margin-bottom: 24px;
}

.amai-manual-not-connected-btn {
    display: inline-block;
    background: #D97757;
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s;
}

.amai-manual-not-connected-btn:hover {
    background: #C4623E;
    color: #fff;
}

/* ── Page badge ── */
.amai-manual-page-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.amai-manual-page-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #E7DDD5;
}

.amai-manual-page-name {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #1C1917;
}

/* ── Step indicator ── */
.amai-manual-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 28px;
}

.amai-manual-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.amai-manual-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #F0EAE5;
    color: #C4B5AC;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.amai-manual-step-label {
    font-size: 13px;
    font-weight: 500;
    color: #C4B5AC;
    transition: color 0.2s;
}

.amai-manual-step--active .amai-manual-step-num {
    background: #D97757;
    color: #fff;
}

.amai-manual-step--active .amai-manual-step-label {
    color: #D97757;
}

.amai-manual-step--done .amai-manual-step-num {
    background: #22c55e;
    color: #fff;
}

.amai-manual-step--done .amai-manual-step-label {
    color: #22c55e;
}

.amai-manual-step-connector {
    flex: 1;
    height: 2px;
    background: #E7DDD5;
    margin: 0 12px;
    min-width: 32px;
}

/* ── Card ── */
.amai-manual-card {
    background: #fff;
    border: 1.5px solid #E7DDD5;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

.amai-manual-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 18px;
}

.amai-manual-card-title {
    font-family: 'Nunito', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: #1C1917;
}

.amai-manual-optional {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #A8A29E;
}

.amai-manual-card-count {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: #A8A29E;
}

/* ── Textarea ── */
.amai-manual-textarea-wrap {
    position: relative;
    margin-bottom: 14px;
}

.amai-manual-textarea {
    width: 100%;
    min-height: 160px;
    border: 1.5px solid #E7DDD5;
    border-radius: 10px;
    padding: 14px 44px 14px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #1C1917;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.amai-manual-textarea:focus {
    border-color: #D97757;
}

/* ── Emoji button (reused pattern from social.css) ── */
.amai-emoji-corner-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #A8A29E;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
}

.amai-emoji-corner-btn:hover {
    color: #D97757;
    background: #FDF6F3;
}

.amai-emoji-dropdown {
    position: absolute;
    top: 38px;
    right: 8px;
    width: 260px;
    max-height: 220px;
    background: #fff;
    border: 1.5px solid #E7DDD5;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    z-index: 100;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.amai-emoji-sticky-cat {
    padding: 6px 8px 4px;
    font-size: 11px;
    font-weight: 700;
    color: #A8A29E;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fff;
    border-bottom: 1px solid #F5EDE8;
}

.amai-emoji-scroll {
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.amai-emoji-scroll button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.1s;
}

.amai-emoji-scroll button:hover {
    background: #FDF6F3;
}

/* ── Toolbar ── */
.amai-manual-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.amai-manual-toolbar-label {
    font-size: 12px;
    font-weight: 600;
    color: #A8A29E;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.amai-enrich-btn {
    background: none;
    border: 1.5px solid #E7DDD5;
    border-radius: 8px;
    padding: 6px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #78716C;
    transition: border-color 0.15s, color 0.15s;
    line-height: 1;
}

.amai-enrich-btn:hover {
    border-color: #D97757;
    color: #D97757;
}

.amai-enrich-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FDF6F3;
    border: 1.5px solid #E7DDD5;
    border-radius: 20px;
    padding: 4px 10px 4px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #D97757;
}

.amai-enrich-chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #A8A29E;
    font-size: 11px;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.amai-enrich-chip-remove:hover {
    color: #D97757;
}

/* ── Card footer ── */
.amai-manual-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #F5EDE8;
}
.amai-manual-btn-seed {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: #D97757;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 14px;
    border: 1.5px solid #D97757;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}
.amai-manual-btn-seed:hover {
    background: #FDF0EB;
}
.amai-manual-btn-seed:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.amai-manual-card-footer--split {
    justify-content: space-between;
}

/* ── Buttons ── */
.amai-manual-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #D97757;
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1;
}

.amai-manual-btn-primary:hover {
    background: #C4623E;
}

.amai-manual-btn-primary:disabled {
    background: #E7DDD5;
    color: #A8A29E;
    cursor: not-allowed;
}

.amai-manual-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    color: #D97757;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 18px;
    border: 1.5px solid #D97757;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1;
}

.amai-manual-btn-secondary:hover {
    background: #FDF6F3;
}

.amai-manual-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    color: #78716C;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
}

.amai-manual-btn-ghost:hover {
    color: #1C1917;
    background: #F5EDE8;
}

/* ── Unsplash searching ── */
.amai-manual-unsplash-searching {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #78716C;
    margin-bottom: 20px;
}

.amai-regen-spin {
    animation: amai-spin 0.8s linear infinite;
}

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

/* ── Keyword label ── */
#amai-unsplash-keyword-wrap {
    margin-bottom: 14px;
    font-size: 13px;
    color: #78716C;
}

.amai-manual-keyword {
    font-weight: 600;
    color: #D97757;
}

/* ── Unsplash grid ── */
.amai-manual-unsplash-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.amai-manual-unsplash-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s, box-shadow 0.15s;
    aspect-ratio: 4/3;
}

.amai-manual-unsplash-item:hover {
    border-color: #D97757;
    box-shadow: 0 2px 10px rgba(217,119,87,0.18);
}

.amai-manual-unsplash-item--selected {
    border-color: #D97757;
    box-shadow: 0 0 0 3px rgba(217,119,87,0.18);
}

.amai-manual-unsplash-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.amai-manual-unsplash-item-check {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #D97757;
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}

.amai-manual-unsplash-item--selected .amai-manual-unsplash-item-check {
    opacity: 1;
}

.amai-manual-unsplash-credit-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 5px 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.45));
    font-size: 10px;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.amai-manual-unsplash-error {
    font-size: 13px;
    color: #ef4444;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

/* ── Selected image preview ── */
.amai-manual-selected-img-wrap {
    margin-bottom: 20px;
    padding: 16px;
    background: #F9FAFB;
    border: 1.5px solid #E7DDD5;
    border-radius: 12px;
}

.amai-manual-selected-label {
    font-size: 13px;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 10px;
}

.amai-manual-selected-img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 8px;
}

.amai-manual-selected-credit {
    font-size: 11px;
    color: #A8A29E;
    margin-bottom: 12px;
}

/* ── Image actions ── */
.amai-manual-image-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.amai-manual-upload-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #78716C;
}

/* ── Preview (step 3) ── */
.amai-manual-preview {
    background: #F9FAFB;
    border: 1.5px solid #E7DDD5;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.amai-manual-preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.amai-manual-preview-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #E7DDD5;
}

.amai-manual-preview-name {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 14px;
    color: #1C1917;
}

.amai-manual-preview-meta {
    font-size: 12px;
    color: #A8A29E;
}

.amai-manual-preview-content {
    font-size: 14px;
    line-height: 1.7;
    color: #1C1917;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 10px;
}

.amai-manual-preview-feeling {
    display: inline-block;
    font-size: 13px;
    color: #78716C;
    background: #FDF6F3;
    border: 1px solid #E7DDD5;
    border-radius: 20px;
    padding: 3px 12px;
    margin-bottom: 12px;
}

.amai-manual-preview-img-wrap {
    margin-top: 10px;
}

.amai-manual-preview-img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.amai-manual-preview-credit {
    font-size: 11px;
    color: #A8A29E;
    margin-top: 6px;
}

/* ── Post error / success ── */
.amai-manual-post-error {
    font-size: 13px;
    color: #ef4444;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 16px;
}

.amai-manual-post-success {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #22c55e;
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    margin-bottom: 16px;
}

/* ── Feeling modal ── */
.amai-feeling-modal {
    position: fixed;
    inset: 0;
    background: rgba(28,25,23,0.45);
    backdrop-filter: blur(3px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amai-feeling-modal-wrap {
    background: #fff;
    border-radius: 16px;
    width: 420px;
    max-width: 92vw;
    padding: 24px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.16);
}

.amai-feeling-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.amai-feeling-modal-title {
    font-family: 'Nunito', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: #1C1917;
}

.amai-feeling-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #A8A29E;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.15s;
}

.amai-feeling-modal-close:hover {
    color: #D97757;
}

.amai-feeling-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.amai-feeling-option {
    background: #F9FAFB;
    border: 1.5px solid #E7DDD5;
    border-radius: 8px;
    padding: 9px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #44403C;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.amai-feeling-option:hover,
.amai-feeling-option--selected {
    border-color: #D97757;
    background: #FDF6F3;
    color: #D97757;
}
/* ── AI image generation in compose ── */
.amai-manual-ai-img-wrap {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.amai-manual-ai-hint {
    font-size: 12px;
    color: #78716C;
    margin: 0;
    line-height: 1.5;
}
.amai-manual-ai-prompt {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #E7DDD5;
    border-radius: 10px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    color: #1C1917;
    background: #FAFAF9;
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
    transition: border-color 0.15s;
    display: block;
}
.amai-manual-ai-prompt:focus {
    outline: none;
    border-color: #D97757;
    background: #fff;
}
.amai-manual-ai-prompt-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}
.amai-manual-ai-generating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #78716C;
    padding: 8px 0;
}
.amai-manual-ai-error {
    font-size: 13px;
    color: #DC2626;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 10px 14px;
}

/* ── AI image wrap width fix ── */
.amai-manual-ai-img-wrap,
#amai-ai-img-prompt-wrap {
    width: 100%;
    box-sizing: border-box;
}

