/* ============================================================
   MOBILE ARTICLE PAGE STYLES
   BEM block: article-mobile
   Full-width mobile layout (390px design, fluid)
   ============================================================ */

.article-mobile {
    font-family: 'Inter', sans-serif;
    color: rgba(0, 0, 0, 0.88);
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* Hide on desktop */
@media (min-width: 769px) {
    .article-mobile {
        display: none !important;
    }
}

/* ---------- Breadcrumbs ---------- */
.article-mobile__breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
}

.article-mobile__breadcrumbs svg { flex-shrink: 0; }

.article-mobile__breadcrumbs-text {
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    color: #8c8c8c;
    white-space: nowrap;
    text-decoration: none;
}

.article-mobile__breadcrumbs-text--active { color: #465DA6; }

/* ---------- Title ---------- */
.article-mobile__title {
    font-size: 24px;
    font-weight: 600;
    line-height: 32px;
    letter-spacing: -0.72px;
    color: rgba(0, 0, 0, 0.88);
    margin: 0;
    padding: 0 16px 12px;
}

/* ---------- Summary ---------- */
.article-mobile__summary {
    display: flex;
    gap: 8px;
    padding: 12px 16px 24px;
}

.article-mobile__summary-bar {
    width: 4px;
    flex-shrink: 0;
    background: #d9d9d9;
    border-radius: 600px;
    align-self: stretch;
}

.article-mobile__summary-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.article-mobile__summary-text {
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    color: #000;
    margin: 0;
}

/* ---------- Tags ---------- */
.article-mobile__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-mobile__tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 16px;
    background: #EBF1FF;
    color: #465DA6;
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    text-decoration: none;
}

/* ---------- Author Card ---------- */
.article-mobile__author-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #d9d9d9;
    border-bottom: 1px solid #d9d9d9;
}

.article-mobile__author-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.article-mobile__author-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.article-mobile__author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.article-mobile__author-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    color: #000;
    margin: 0;
}

.article-mobile__author-bio {
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    color: #595959;
    margin: 0;
}

.article-mobile__author-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: #5E69A8;
    text-decoration: none;
}

.article-mobile__follow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #D5D7DA;
    box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: #414651;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    align-self: flex-start;
}

.article-mobile__follow-btn--following {
    background: #465DA6;
    border-color: #465DA6;
    color: #fff;
}

/* ---------- Actions Row ---------- */
.article-mobile__actions {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 16px 24px;
}

.article-mobile__action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #595959;
}

.article-mobile__action-btn svg { width: 16px; height: 16px; }

/* ---------- Read Aloud Button (plain icon in action row per Figma) ---------- */
.article-mobile__read-aloud-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #595959;
    transition: color 0.2s ease;
}

.article-mobile__read-aloud-btn .tts-icon {
    display: inline-flex;
    align-items: center;
}

.article-mobile__read-aloud-btn .tts-icon svg {
    width: 16px;
    height: 16px;
}

.article-mobile__read-aloud-btn .tts-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.article-mobile__read-aloud-btn:hover {
    color: #465DA6;
}

.article-mobile__read-aloud-btn[data-tts-state="playing"] {
    color: #465DA6;
}

.article-mobile__read-aloud-btn[data-tts-state="loading"] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.article-mobile__read-aloud-btn[data-tts-state="failed"] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    color: #999;
}

.article-mobile__date {
    flex: 1;
    text-align: right;
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    color: #8c8c8c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Article Content ---------- */
.article-mobile__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 16px 16px 48px;
    overflow: hidden;
}

/* ---------- Unlock (non-signed-up) card ---------- */
.article-mobile__unlock-wrapper {
    position: relative;
    width: 100%;
}

.article-mobile__article-body--truncated {
    max-height: 180px;
    overflow: hidden;
}

.article-mobile__unlock-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 40%);
    pointer-events: none;
}

.article-mobile__unlock-card {
    position: relative;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px 16px;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

.article-mobile__unlock-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.article-mobile__unlock-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.article-mobile__unlock-title {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 32px;
    letter-spacing: -0.48px;
    color: #000;
    text-align: center;
}

.article-mobile__unlock-subtitle {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #8C8C8C;
    text-align: center;
}

.article-mobile__unlock-signup {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    background: #465DA6;
    border: 1px solid #465DA6;
    box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    text-decoration: none;
}

.article-mobile__unlock-signup:hover {
    background: #3c5195;
    border-color: #3c5195;
    color: #fff;
}

.article-mobile__unlock-login {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 20px;
}

.article-mobile__unlock-login span {
    color: #8C8C8C;
    font-weight: 400;
}

.article-mobile__unlock-login a {
    color: #5E69A8;
    font-weight: 600;
    text-decoration: none;
}

.article-mobile__unlock-login a:hover {
    text-decoration: underline;
}

.article-mobile__content p {
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #000;
    margin: 0;
}

.article-mobile__content h2,
.article-mobile__content h3 {
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    color: rgba(0, 0, 0, 0.88);
    margin: 0;
}

.article-mobile__content img {
    width: 100%;
    border-radius: 4px;
    object-fit: cover;
}

.article-mobile__content figure {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
}

.article-mobile__content figcaption {
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    color: #8c8c8c;
}

.article-mobile__content blockquote {
    background: #F6F9FF;
    border: 1px solid #B5BEDB;
    border-radius: 8px;
    padding: 16px;
    margin: 0;
}

.article-mobile__content blockquote p {
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    color: #1C2542;
}

/* ---------- Explore Topics ---------- */
.article-mobile__explore {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 16px;
    border-top: 1px solid #d9d9d9;
    border-bottom: 1px solid #d9d9d9;
}

.article-mobile__explore-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    color: rgba(0, 0, 0, 0.88);
    margin: 0;
}

.article-mobile__explore-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.article-mobile__chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #D5D7DA;
    box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    color: rgba(0, 0, 0, 0.88);
    text-decoration: none;
    white-space: nowrap;
}

/* ---------- Related Contents ---------- */
.article-mobile__related {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 48px 16px 24px;
}

.article-mobile__related-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    color: rgba(0, 0, 0, 0.88);
    margin: 0;
}

.article-mobile__related-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 4px;
}

.article-mobile__related-item {
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
}

.article-mobile__related-item:last-child { border-bottom: none; }

.article-mobile__related-thumb {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.article-mobile__related-thumb-wrap {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.article-mobile__related-thumb-wrap img {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    object-fit: cover;
}

.article-mobile__related-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.article-mobile__related-item-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    color: rgba(0, 0, 0, 0.88);
    margin: 0;
}

.article-mobile__related-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.article-mobile__related-author {
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    color: rgba(0, 0, 0, 0.88);
}

.article-mobile__dot {
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.88);
    flex-shrink: 0;
}

.article-mobile__related-date {
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    color: rgba(0, 0, 0, 0.45);
}

/* ---------- Comments ---------- */
.article-mobile__comments {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 16px;
}

.article-mobile__comments-tabs {
    display: flex;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
    width: 274px;
    align-self: center;
}

.article-mobile__comments-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    color: #8c8c8c;
    background: transparent;
    border: none;
    cursor: pointer;
}

.article-mobile__comments-tab--active {
    background: #fff;
    color: #262626;
    border: 1px solid #fff;
    box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
}

.article-mobile__comment-input {
    width: 100%;
    min-height: 100px;
    padding: 10px 14px;
    border: 1px solid #D5D7DA;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #000;
    resize: vertical;
}

.article-mobile__comment-input::placeholder { color: #717680; }

.article-mobile__comment-hint {
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    color: #535862;
    margin: 0;
}

.article-mobile__comment-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-mobile__comment-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.article-mobile__comment-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.article-mobile__comment-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    background: #465DA6;
    border: 1px solid #465DA6;
    box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.article-mobile__comment-submit:hover {
    background: #3e5494;
    border-color: #3e5494;
}

.article-mobile__comment-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.article-mobile__comment-spinner {
    width: 18px;
    height: 18px;
    border-width: 2px;
    color: #465DA6;
}

.article-mobile__comments-header {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-mobile__comments-label {
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    color: rgba(0, 0, 0, 0.88);
    margin: 0;
}

.article-mobile__comments-count {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 16px;
    background: #EBF1FF;
    color: #465DA6;
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
}

.article-mobile__comment {
    display: flex;
    gap: 12px;
    width: 100%;
}

.article-mobile__comment--collapsed {
    display: none;
}

/* Like button */
.article-mobile__comment-like {
    gap: 4px;
    width: auto;
    padding: 2px 4px;
    border-radius: 4px;
}

.article-mobile__comment-like--active {
    color: #465DA6;
}

.article-mobile__comment-like--active svg {
    fill: #465DA6;
}

.article-mobile__comment-like-count {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 14px;
    color: inherit;
}

/* Inline edit textarea */
.article-mobile__comment-edit-input {
    width: 100%;
    min-height: 72px;
    padding: 8px 12px;
    border: 1px solid #D5D7DA;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #262626;
    resize: vertical;
    margin: 6px 0;
}

/* Menu dropdown */
.article-mobile__comment-menu {
    position: relative;
    display: inline-flex;
}

.article-mobile__comment-menu-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 120px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(10, 13, 18, 0.1);
    padding: 4px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.article-mobile__comment-menu-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    color: #414651;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
}

.article-mobile__comment-menu-item:hover {
    background: #F5F5F5;
}

.article-mobile__comment-menu-item--danger {
    color: #B42318;
}

.article-mobile__comment-menu-item--danger:hover {
    background: #FEF3F2;
}

/* Edit / Delete action rows */
.article-mobile__comment-actions--edit,
.article-mobile__comment-actions--delete {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    flex-wrap: wrap;
}

.article-mobile__comment-delete-prompt {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #535862;
    flex: 1;
    min-width: 100%;
}

.article-mobile__comment-edit-cancel,
.article-mobile__comment-delete-cancel,
.article-mobile__comment-edit-save,
.article-mobile__comment-delete-confirm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    cursor: pointer;
}

.article-mobile__comment-edit-cancel,
.article-mobile__comment-delete-cancel {
    background: #fff;
    border: 1px solid #D5D7DA;
    color: #414651;
}

.article-mobile__comment-edit-save {
    background: #465DA6;
    border: 1px solid #465DA6;
    color: #fff;
}

.article-mobile__comment-delete-confirm {
    background: #B42318;
    border: 1px solid #B42318;
    color: #fff;
}

.article-mobile__comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.article-mobile__comment-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.article-mobile__comment-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.article-mobile__comment-author {
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    color: #000;
}

.article-mobile__comment-date {
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    color: #8c8c8c;
}

.article-mobile__comment-text {
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    color: #262626;
    margin: 0;
}

.article-mobile__comment-actions {
    display: flex;
    gap: 24px;
    padding: 8px 4px;
}

.article-mobile__more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #D5D7DA;
    box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: #414651;
    cursor: pointer;
    text-decoration: none;
}

/* ---------- More from the Commons ---------- */
.article-mobile__more-commons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 48px 16px;
}

.article-mobile__more-commons-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    color: rgba(0, 0, 0, 0.88);
    margin: 0;
}

.article-mobile__more-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 12px;
}

.article-mobile__more-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
}

.article-mobile__more-item:last-child { border-bottom: none; }

.article-mobile__more-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 16px;
    background: #EAF8F6;
    color: #269387;
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    align-self: flex-start;
}

.article-mobile__more-item-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    color: rgba(0, 0, 0, 0.88);
    margin: 0;
}

.article-mobile__more-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-mobile__more-item-author {
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    color: rgba(0, 0, 0, 0.88);
}

.article-mobile__more-item-date {
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    color: rgba(0, 0, 0, 0.45);
}

/* ---------- Share panel ---------- */
.article-mobile__share-panel {
    display: none;
}

.article-mobile__share-panel--active {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
