/* ═══════════════════════════════════════════
   Script Maker — In-App Pain Miner Styles
   Prefixed .asm- to avoid www collision
   ═══════════════════════════════════════════ */

/* ── Layout ── */

.asm-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 0 80px;
}

/* ── Upload Phase ── */

.asm-upload {
    padding: 0 0 24px;
}

.asm-upload h2 {
    font-size: 1.35rem;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.asm-upload-sub {
    text-align: center;
    color: var(--text-secondary, #64748b);
    font-size: 0.92rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Tab pills */
.asm-upload-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 20px;
}

.asm-tab-pill {
    padding: 7px 18px;
    font-size: 0.83rem;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid var(--border, #e2e8f0);
    background: transparent;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.15s;
    border-radius: 20px;
}
.asm-tab-pill:hover {
    border-color: var(--primary, #6366f1);
    color: var(--text, #1e293b);
}
.asm-tab-pill.active {
    background: var(--primary, #6366f1);
    color: #fff;
    border-color: var(--primary, #6366f1);
}

/* Paste area */
.asm-paste-area {
    width: 100%;
    min-height: 180px;
    max-height: 360px;
    padding: 14px 16px;
    font-size: 0.9rem;
    font-family: inherit;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    resize: vertical;
    outline: none;
    line-height: 1.5;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.asm-paste-area:focus {
    border-color: var(--primary, #6366f1);
}
.asm-paste-area::placeholder {
    color: var(--text-light, #94a3b8);
}

/* PDF dropzone */
.asm-dropzone {
    border: 2px dashed var(--border, #e2e8f0);
    border-radius: 10px;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.asm-dropzone:hover,
.asm-dropzone.asm-dragover {
    border-color: var(--primary, #6366f1);
    background: rgba(99, 102, 241, 0.04);
}

.asm-dropzone-label {
    font-size: 0.92rem;
    color: var(--text-secondary, #64748b);
    margin-bottom: 6px;
}

.asm-dropzone-hint {
    font-size: 0.76rem;
    color: var(--text-light, #94a3b8);
}

.asm-file-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.06);
    border-radius: 10px;
    font-size: 0.86rem;
    color: var(--text, #1e293b);
    font-weight: 500;
}

.asm-file-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 4px;
    font-family: inherit;
}

.asm-pdf-hidden {
    display: none;
}

/* Count pickers */
.asm-counts-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 8px;
}

.asm-count-picker {
    text-align: center;
}

.asm-count-label {
    display: block;
    font-size: 0.73rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary, #64748b);
    margin-bottom: 6px;
}

.asm-count-btns {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
}

.asm-count-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text, #1e293b);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s;
}
.asm-count-btn:hover { background: rgba(99, 102, 241, 0.08); }
.asm-count-btn:active { background: rgba(99, 102, 241, 0.15); }

.asm-count-val {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary, #6366f1);
    border-left: 1px solid var(--border, #e2e8f0);
    border-right: 1px solid var(--border, #e2e8f0);
    height: 32px;
}

.asm-upload-btn {
    margin-top: 16px;
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
}

.asm-char-count {
    font-size: 0.73rem;
    color: var(--text-light, #94a3b8);
    text-align: right;
    margin-top: 5px;
}

/* ── Analyzing Phase ── */

.asm-analyzing {
    text-align: center;
    padding: 80px 0 60px;
}

.asm-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary, #6366f1);
    border-radius: 50%;
    animation: asm-spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

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

.asm-analyzing-msg {
    font-size: 1rem;
    color: var(--text-secondary, #64748b);
    transition: opacity 0.3s;
}

/* ── Pain Reveal ── */

.asm-pain-card {
    background: #0f172a;
    border-radius: 12px;
    padding: 24px 20px;
    color: #e2e8f0;
    margin-bottom: 20px;
    animation: asm-revealUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes asm-revealUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.asm-pain-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fbbf24;
    margin-bottom: 10px;
}

.asm-pain-statement {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    color: #f1f5f9;
    margin-bottom: 14px;
}

.asm-pain-section {
    margin-bottom: 12px;
}
.asm-pain-section:last-child {
    margin-bottom: 0;
}

.asm-pain-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 3px;
}

.asm-pain-section-text {
    font-size: 0.86rem;
    line-height: 1.55;
    color: #cbd5e1;
}

.asm-pain-inner-voice {
    font-style: italic;
    color: #fbbf24;
}

/* ── Script Card ── */

.asm-script-card {
    background: #0f172a;
    border-radius: 12px;
    padding: 18px;
    color: #e2e8f0;
    margin-bottom: 14px;
    animation: asm-revealUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    animation-delay: 0.12s;
    animation-fill-mode: both;
}

.asm-script-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.asm-script-title {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--primary-light, #818cf8);
}

.asm-word-badge {
    font-size: 0.66rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.12);
    padding: 3px 8px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.asm-script-section {
    margin-bottom: 12px;
}
.asm-script-section:last-of-type {
    margin-bottom: 0;
}

.asm-script-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-light, #818cf8);
    margin-bottom: 3px;
}

.asm-script-text {
    font-size: 0.86rem;
    line-height: 1.55;
    color: #f1f5f9;
    cursor: text;
}

.asm-script-text:focus {
    outline: 1px solid var(--primary-light, #818cf8);
    outline-offset: 4px;
    border-radius: 4px;
}

.asm-script-overlay {
    font-size: 0.86rem;
    font-weight: 600;
    color: #fbbf24;
    line-height: 1.4;
}

/* Script actions */
.asm-script-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.asm-script-copy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--primary-light, #818cf8);
    background: rgba(99, 102, 241, 0.12);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.asm-script-copy:hover { background: rgba(99, 102, 241, 0.22); }

/* ── CTA Section ── */

.asm-cta-section {
    text-align: center;
    margin-top: 24px;
    padding-bottom: 60px;
}

.asm-cta-section .btn {
    max-width: 400px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
}

.asm-secondary-btn {
    background: transparent;
    color: var(--primary, #6366f1);
    border: 1px solid var(--primary, #6366f1);
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
    max-width: 400px;
    width: 100%;
}
.asm-secondary-btn:hover {
    background: rgba(99, 102, 241, 0.06);
}

/* ── Multi-Option Groups ── */

.asm-multi-group {
    margin-bottom: 16px;
}

.asm-multi-group-title {
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary, #64748b);
    margin-bottom: 8px;
    padding-left: 2px;
}

.asm-multi-group .asm-script-card {
    margin-bottom: 8px;
}

.asm-multi-group .asm-script-card:last-child {
    margin-bottom: 0;
}

.asm-overlays-card {
    margin-bottom: 16px;
}

.asm-theme-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 0.66rem;
    font-weight: 700;
    color: #0f172a;
    background: #fbbf24;
    border-radius: 4px;
    margin-right: 4px;
    flex-shrink: 0;
}

/* ── Responsive ── */

@media (max-width: 640px) {
    .asm-upload h2 { font-size: 1.15rem; }
    .asm-pain-card { padding: 18px 16px; }
    .asm-pain-statement { font-size: 1rem; }
    .asm-script-card { padding: 14px; }
    .asm-script-header { flex-direction: column; align-items: flex-start; gap: 4px; }
    .asm-dropzone { padding: 28px 14px; }
    .asm-counts-row { gap: 12px; }
    .asm-count-label { font-size: 0.66rem; }
}
