/* ============================================================
   Mobile Help Center Submenu
   Styles for Level 1 (overview), Level 2 (articles), Level 3 (article)
   ============================================================ */

/* ----- Level 1: Search bar --------------------------------- */

.tty-hc-search-wrapper {
    position: relative;
}

.tty-hc-search-wrapper .tty-hc-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--tty-bg-secondary);
    border-radius: 12px;
    padding: 5px 20px 5px 14px !important;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.tty-hc-search-wrapper .tty-hc-search-bar:focus-within {
    background: #fff;
    border-color: var(--tty-primary, #7b2d8b);
}

.tty-hc-search-bar > i {
    color: var(--tty-primary);
    font-size: 18px;
    flex-shrink: 0;
}

.tty-hc-search-wrapper .tty-hc-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #1c1c1e;
    outline: none;
    font-family: inherit;
    min-width: 0;
    padding: 10px !important;
    box-shadow: none !important;
}

.tty-hc-search-wrapper .tty-hc-search-input::placeholder {
    color: #8e8e93;
}

.tty-hc-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #8e8e93;
    font-size: 14px;
    flex-shrink: 0;
}

#tty-submenu-helpcenter .tty-mobile-submenu-section-title {
  margin-top: 10px;
}

/* ----- Level 1: Search results ----------------------------- */

.tty-hc-search-results {
    margin-top: 8px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-height: 360px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.tty-hc-search-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.tty-hc-search-result:last-child {
    border-bottom: none;
}

.tty-hc-search-result:active {
    background: #f5f5f7;
}

.tty-hc-search-result-content {
    flex: 1;
    min-width: 0;
}

.tty-hc-search-cat {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tty-primary, #7b2d8b);
    margin-bottom: 2px;
}

.tty-hc-search-result h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1c1c1e;
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.tty-hc-search-result p {
    font-size: 13px;
    color: #6e6e73;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.tty-hc-search-result > i {
    color: var(--tty-primary, #7b2d8b);
    font-size: 14px;
    flex-shrink: 0;
}

.tty-hc-no-results {
    padding: 24px 16px;
    text-align: center;
    color: #8e8e93;
    font-size: 14px;
}

/* ----- Level 1: Category list ------------------------------ */

.tty-hc-categories {
    padding-top: 4px;
}

.tty-hc-cat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: var(--tty-primary, #7b2d8b);
    font-size: 18px;
}

.tty-hc-cat-icon-img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 6px;
}

#tty-hc-categories-list .tty-mobile-submenu-link-content {
  gap: 24px;
}

.tty-hc-cat-count {
    display: block;
    font-size: 13px;
    color: #8e8e93;
    font-weight: 400;
    margin-top: 2px;
}

/* ----- Skeleton loading items ------------------------------ */

.tty-hc-skeleton-item {
    height: 52px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: ttyHcSkeleton 1.4s ease infinite;
    border-radius: 12px;
    margin: 6px 16px;
    list-style: none;
}

@keyframes ttyHcSkeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ----- Empty and error states ------------------------------ */

.tty-hc-empty {
    list-style: none;
    padding: 28px 16px;
    text-align: center;
    color: #8e8e93;
    font-size: 14px;
}

.tty-hc-error {
    padding: 24px 16px;
    color: #ff3b30;
    font-size: 14px;
    text-align: center;
}

/* ----- Level 3: Article content area ----------------------- */

.tty-hc-level3-content {
    padding: 0 24px 40px;
}

.tty-hc-article-body {
    padding-top: 4px;
}

.tty-hc-article-heading {
    font-size: 20px;
    font-weight: 700;
    color: #1c1c1e;
    line-height: 1.3;
    margin: 0 0 16px;
}

.tty-hc-article-content {
    font-size: 15px;
    line-height: 1.65;
    color: #3c3c43;
}

.tty-hc-article-content h1,
.tty-hc-article-content h2,
.tty-hc-article-content h3 {
    font-size: 17px;
    font-weight: 600;
    color: #1c1c1e;
    margin: 20px 0 8px;
    line-height: 1.3;
}

.tty-hc-article-content h4,
.tty-hc-article-content h5,
.tty-hc-article-content h6 {
    font-size: 15px;
    font-weight: 600;
    color: #1c1c1e;
    margin: 16px 0 6px;
}

.tty-hc-article-content p {
    margin: 0 0 12px;
}

.tty-hc-article-content ul,
.tty-hc-article-content ol {
    margin: 0 0 12px;
    padding-left: 20px;
}

.tty-hc-article-content li {
    margin-bottom: 6px;
}

.tty-hc-article-content a {
    color: var(--tty-primary, #7b2d8b);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.tty-hc-article-content strong {
    font-weight: 600;
    color: #1c1c1e;
}

.tty-hc-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
    display: block;
}

.tty-hc-article-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 12px 0;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tty-hc-article-content th,
.tty-hc-article-content td {
    padding: 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    text-align: left;
    white-space: nowrap;
}

.tty-hc-article-content th {
    background: #f5f5f7;
    font-weight: 600;
}

.tty-hc-article-content blockquote {
    margin: 12px 0;
    padding: 12px 16px;
    background: #f5f5f7;
    border-left: 3px solid var(--tty-primary, #7b2d8b);
    border-radius: 0 8px 8px 0;
}

.tty-hc-article-content pre {
    background: #f5f5f7;
    border-radius: 8px;
    padding: 12px 14px;
    overflow-x: auto;
    font-size: 13px;
    font-family: monospace;
    -webkit-overflow-scrolling: touch;
}

.tty-hc-article-content code {
    background: #f5f5f7;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 13px;
    font-family: monospace;
}

.tty-hc-article-content hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* ----- Level 3: Article footer ----------------------------- */

.tty-hc-article-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.tty-hc-article-updated {
    font-size: 12px;
    color: #8e8e93;
    margin: 0;
}