/* Article Spinner Pro - Tooltip & Interactive Styles */

/* Hidden elements (org/sug data holders inside spin output) */
.hide,
.spin-hide {
    display: none;
}

/* Spin output container */
.spin-output-box {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #f9fafb;
    padding: 1rem;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    line-height: 1.8;
    font-size: 0.875rem;
    color: #111827;
    word-wrap: break-word;
}

/* Clickable spun words */
.tipsBox {
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px dotted #d97706;
    padding-bottom: 1px;
    transition: color 0.15s, border-color 0.15s;
}
.tipsBox:hover {
    border-bottom-color: #b45309;
    text-decoration: underline;
    text-decoration-color: #fbbf24;
}

/* Tooltip popup (positioned dynamically via JS) */
.spin-tooltip {
    position: fixed;
    z-index: 9000;
    display: none;
    max-width: 360px;
    min-width: 280px;
    background: #1e293b;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 0;
    color: #f1f5f9;
    font-size: 0.8125rem;
    line-height: 1.5;
}
.spin-tooltip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.875rem;
    background: #334155;
    border-radius: 0.75rem 0.75rem 0 0;
    font-weight: 600;
    font-size: 0.75rem;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.spin-tooltip-close {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #475569;
    border-radius: 50%;
    color: #e2e8f0;
    font-size: 0.6875rem;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1;
}
.spin-tooltip-close:hover {
    background: #ef4444;
    color: #fff;
}
.spin-tooltip-body {
    padding: 0.75rem 0.875rem;
}
.spin-tooltip-section {
    margin-bottom: 0.625rem;
}
.spin-tooltip-section:last-child {
    margin-bottom: 0;
}
.spin-tooltip-label {
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}
.spin-tooltip-words {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}
.spin-word-chip {
    display: inline-block;
    padding: 0.1875rem 0.5rem;
    background: #334155;
    border-radius: 0.375rem;
    color: #93c5fd;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.spin-word-chip:hover {
    background: #3b82f6;
    color: #fff;
}
.spin-word-chip.spin-word-original {
    color: #fbbf24;
    background: #422006;
}
.spin-word-chip.spin-word-original:hover {
    background: #d97706;
    color: #fff;
}

/* Custom word input row */
.spin-tooltip-custom {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.5rem;
}
.spin-tooltip-custom input {
    flex: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #475569;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 0.8125rem;
    outline: none;
}
.spin-tooltip-custom input:focus {
    border-color: #3b82f6;
}
.spin-tooltip-custom button {
    padding: 0.25rem 0.625rem;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.spin-tooltip-custom button:hover {
    background: #2563eb;
}

/* Step indicator */
.spin-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}
.spin-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
    position: relative;
}
.spin-step::after {
    content: '';
    width: 1.5rem;
    height: 2px;
    background: #d1d5db;
    flex-shrink: 0;
}
.spin-step:last-child::after {
    display: none;
}
.spin-step-num {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.spin-step.active {
    color: #1e40af;
}
.spin-step.active .spin-step-num {
    background: #3b82f6;
    color: #fff;
}
.spin-step.completed .spin-step-num {
    background: #10b981;
    color: #fff;
}
.spin-step.completed {
    color: #059669;
}

/* Responsive steps - stack on small screens */
@media (max-width: 640px) {
    .spin-steps {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    .spin-step::after {
        display: none;
    }
}
