/* ========================================
   HELP CENTER - Complete styling
   Uses base variables from theme.css
   ======================================== */

/* Base wrapper */
.tty-help-wrapper {
    position: relative;
    overflow: hidden;
    font-family: inherit;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Decorative pattern background */
.tty-help-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 9%;
    width: 40%;
    height: 100%;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5v10m0 30v10m-20-25h10m30 0h10' stroke='%23005F5F' stroke-width='1'/%3E%3Ccircle cx='30' cy='30' r='5' fill='%23005F5F'/%3E%3Ccircle cx='30' cy='15' r='2' fill='%23005F5F'/%3E%3Ccircle cx='30' cy='45' r='2' fill='%23005F5F'/%3E%3Ccircle cx='20' cy='30' r='2' fill='%23005F5F'/%3E%3Ccircle cx='40' cy='30' r='2' fill='%23005F5F'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Direct children above pattern */
.tty-help-wrapper > * {
    position: relative;
    z-index: 1;
}

/* Banner section */
.tty-help-banner {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    overflow: hidden;
    background-color: var(--tty-bg-secondary);
    border-radius: 30px;
    margin-bottom: 60px;
    margin-top: 40px;
}

.tty-help-content {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, var(--tty-bg-primary) 0%, var(--tty-bg-accent) 100%);
    overflow: hidden;
    padding: 60px 30px;
}

.tty-help-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 95, 95, 0.05) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.tty-hero-title {
    margin: 0px 0px 10px 0px;
}

.tty-help-subtitle {
    font-size: 24px;
    color: var(--tty-primary);
    margin: 0 0 20px;
}

.tty-help-header .heartbeat polyline {
    stroke: #e5924c;
}

.tty-help-search-button img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
  min-width: 20px;
  min-height: 20px;
}

/* Main help search container */
.tty-help-search-container {
    max-width: 600px;
    margin: -30px auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Layout adjustments when banner is hidden */
.tty-help-wrapper.no-banner .tty-help-search-container {
    margin: 40px auto 40px;
}

.tty-help-wrapper.no-banner {
    padding-top: 20px;
}

.tty-help-search-container .tty-help-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.tty-help-search-container .tty-help-search-input {
    width: 100%;
    padding: 18px 60px 18px 24px !important;
    font-size: 16px;
    border: 2px solid rgba(0, 95, 95, 0.1);
    border-radius: var(--tty-radius-lg);
    background: var(--tty-bg-primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: var(--tty-transition-normal);
    font-family: 'Figtree', sans-serif;
}

.tty-help-search-container .tty-help-search-input:focus {
  outline: none;
  border-color: var(--tty-search-accent);
  box-shadow: 0 0 0 4px rgba(0, 95, 95, 0.1), 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.tty-help-search-container .tty-help-search-button {
    position: absolute;
    right: 8px;
    background: var(--tty-bg-linear-graniet);
    color: var(--tty-text-light);
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--tty-transition-normal);
    box-shadow: 0 4px 15px rgba(0, 95, 95, 0.2);
}

.tty-help-search-container .tty-help-search-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 95, 95, 0.3);
}

/* Main container */
.tty-help-container {
    display: flex;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0px 100px;
}

.tty-help-content-area {
    flex: 1;
    min-height: 400px;
    order: 2;
}

/* Sidebar - Now on the right */
.tty-help-sidebar {
    flex: 0 0 320px;
    position: sticky;
    top: 100px;
    height: fit-content;
    order: 1;
}

.tty-help-widget {
    background: var(--tty-bg-secondary);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(0, 95, 95, 0.05);
}

.tty-help-widget h3 {
    color: var(--tty-primary);
    font-size: 20px;
    margin: 0 0 20px 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tty-help-widget h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, var(--tty-primary) 0%, var(--tty-primary-light) 100%);
    border-radius: 2px;
}

.tty-help-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tty-help-categories-list li {
    margin-bottom: 2px;
}

.tty-help-categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    color: var(--tty-text-primary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.tty-help-categories-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--tty-primary);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.tty-help-categories-list a:hover,
.tty-help-categories-list a.active {
    background: var(--tty-bg-primary);
    padding-left: 24px;
    color: var(--tty-primary);
}

.tty-help-categories-list a:hover::before,
.tty-help-categories-list a.active::before {
    transform: scaleY(1);
}

.tty-help-categories-list span {
    background: rgba(0, 95, 95, 0.1);
    color: var(--tty-primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* AJAX Search Dropdown */
.tty-help-search-results-dropdown {
 position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--tty-bg-primary);
  border-radius: 30px;
  box-shadow: 0 10px 40px rgba(0, 95, 95, 0.15);
  margin-top: 2px;
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 100;
  border: 1px solid rgba(0, 95, 95, 0.1);
}

/* Skeleton loader */
.tty-search-skeleton {
    padding: 20px;
}

#help-search-results .tty-skeleton-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 14px;
  margin: 0px 0px 16px 0px;
  background: var(--tty-search-bg);
  border-radius: var(--tty-search-radius-md);
  border: 1px solid var(--tty-bg-secondary);
  position: relative;
  overflow: hidden;
  flex-direction: column;
}

.tty-skeleton-line {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 6px;
    margin-bottom: 8px;
}

.tty-skeleton-line.tty-skeleton-text-sm {
  height: 14px;
  margin-top: -2px;
  width: 80%;
}

.tty-skeleton-title {
    width: 50%;
    height: 22px;
}

.tty-skeleton-text {
    width: 100%;
    opacity: 0.7;
}

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

.tty-search-results-content {
    padding: 8px;
}

.tty-search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--tty-text-primary);
    transition: all 0.2s ease;
    margin-bottom: 4px;
    margin: 12px;
    background: var(--tty-search-bg);
    border-radius: var(--tty-search-radius-md);
    border: 1px solid var(--tty-bg-secondary);
}

.tty-search-result-item:hover {
    background: var(--tty-bg-secondary);
    transform: translateX(5px);
}

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

.tty-search-result-category {
    display: inline-block;
    font-size: 12px;
    color: var(--tty-primary);
    background: rgba(0, 95, 95, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-weight: 600;
}

.tty-search-result-item h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 4px 0;
    color: var(--tty-text-primary);
}

.tty-search-result-item p {
    font-size: 13px;
    color: var(--tty-text-secondary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tty-search-result-item i {
    color: var(--tty-primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tty-search-result-item:hover i {
    opacity: 1;
}

.tty-search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--tty-text-secondary);
    font-size: 14px;
}

/* Categories Grid */
.tty-help-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    animation: fadeInUp 0.6s ease;
}

.tty-help-category-card {
    background: var(--tty-bg-primary);
    border-radius: 20px;
    padding: 30px;
    text-decoration: none;
    color: var(--tty-text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.tty-help-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--tty-primary) 0%, var(--tty-primary-light) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.tty-help-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 95, 95, 0.12);
    border-color: var(--tty-primary);
}

.tty-help-category-card:hover::before {
    transform: scaleX(1);
}

.tty-help-category-icon {
    width: 74px;
    height: 74px;
    background: linear-gradient(135deg, rgba(0, 95, 95, 0.1) 0%, rgba(0, 95, 95, 0.05) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--tty-transition-normal);
}

.tty-help-category-card:hover .tty-help-category-icon {
    background: linear-gradient(135deg, var(--tty-primary) 0%, var(--tty-primary-light) 100%);
    transform: rotate(-5deg) scale(1.1);
}

.tty-help-category-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(29%) sepia(20%) saturate(1885%) hue-rotate(146deg) brightness(94%) contrast(86%);
    transition: var(--tty-transition-normal);
}

.tty-help-category-card:hover .tty-help-category-icon img {
    filter: brightness(0) saturate(100%) invert(100%);
}

.tty-help-category-icon i {
    font-size: 28px;
    color: var(--tty-primary);
    transition: var(--tty-transition-normal);
}

.tty-help-category-card:hover .tty-help-category-icon i {
    color: var(--tty-text-light);
}

.tty-help-category-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--tty-primary);
    transition: var(--tty-transition-normal);
}

.tty-help-category-card p {
    color: var(--tty-text-secondary);
    line-height: 1.6;
    margin: 0 0 20px 0;
    flex-grow: 1;
    font-size: 15px;
}

.tty-help-category-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 95, 95, 0.08);
    color: var(--tty-primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    align-self: flex-start;
    transition: var(--tty-transition-normal);
}

.tty-help-category-card:hover .tty-help-category-count {
    background: rgba(255, 255, 255, 0.15);
    color: var(--tty-text-light);
    background: var(--tty-primary);
}

/* Breadcrumb Navigation */
.tty-help-breadcrumb {
  font-size: 14px;
  color: var(--tty-text-secondary);
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tty-help-breadcrumb a:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-top: 2px solid var(--tty-text-secondary);
  border-right: 2px solid var(--tty-text-secondary);
  transform: translateY(-50%) rotate(45deg);
  opacity: 0.5;
}

.tty-help-breadcrumb a {
    color: var(--tty-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
    font-size: 14px;
    display: flex;
}

.tty-help-breadcrumb a:hover {
    color: var(--tty-secondary-dark);
}

.tty-help-breadcrumb span {
  color: var(--tty-text-secondary);
  opacity: .4;
  font-weight: 600;
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

/* Category View Header */
.tty-help-category-header {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 30px;
    background: var(--tty-bg-secondary);
    border-radius: 20px;
    margin-bottom: 40px;
}

.tty-help-category-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(29%) sepia(20%) saturate(1885%) hue-rotate(146deg) brightness(94%) contrast(86%);
}

.tty-help-category-header h2 {
    font-size: 32px;
    color: var(--tty-primary);
    margin: 0 0 10px 0;
    font-weight: 700;
}

.tty-help-category-title-description-wrapper h2 {
    margin: 0px;
}

.tty-help-category-header p {
    color: var(--tty-text-secondary);
    font-size: 16px;
    margin: 0;
}

/* Articles Grid */
.tty-help-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.tty-help-article-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--tty-bg-primary);
    border-radius: 16px;
    text-decoration: none;
    color: var(--tty-text-primary);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tty-help-article-card:hover {
    border-color: var(--tty-primary);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 95, 95, 0.1);
}

.tty-help-article-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 95, 95, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.tty-help-article-card:hover .tty-help-article-icon {
    background: var(--tty-primary);
    transform: rotate(-5deg);
}

.tty-help-article-icon i {
    font-size: 22px;
    color: var(--tty-primary);
}

.tty-help-article-card:hover .tty-help-article-icon i {
    color: white;
}

.tty-help-article-info {
    flex: 1;
    min-width: 0;
}

.tty-help-article-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--tty-text-primary);
}

.tty-help-article-info p {
    font-size: 14px;
    color: var(--tty-text-secondary);
    margin: 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tty-help-article-card > i {
    font-size: 16px;
    color: var(--tty-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tty-help-article-card:hover > i {
    opacity: 1;
}

/* Article card with category label */
.tty-help-article-category {
    display: inline-block;
    font-size: 12px;
    color: var(--tty-primary);
    background: rgba(0, 95, 95, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-weight: 600;
}

/* Search Results View */
.tty-help-search-results h2 {
    font-size: 28px;
    color: var(--tty-primary);
    margin: 0 0 10px 0;
}

.tty-help-results-count {
    color: var(--tty-text-secondary);
    font-size: 16px;
    margin-bottom: 30px;
}

/* Single Article View */
.tty-help-article-view {
    max-width: 900px;
}

.tty-help-article-content h1 {
    font-size: 36px;
    color: var(--tty-primary);
    margin: 0 0 30px 0;
    font-weight: 700;
    line-height: 1.2;
}

.tty-help-article-body {
    background: var(--tty-bg-primary);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.tty-help-article-body p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--tty-text-primary);
    margin-bottom: 20px;
}

.tty-help-article-body h2 {
    font-size: 24px;
    color: var(--tty-primary);
    margin: 30px 0 20px 0;
    font-weight: 600;
}

.tty-help-article-body h3 {
    font-size: 20px;
    color: var(--tty-text-primary);
    margin: 25px 0 15px 0;
    font-weight: 600;
}

.tty-help-article-body ul,
.tty-help-article-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.tty-help-article-body li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.tty-help-article-footer {
    padding: 20px 30px;
    background: var(--tty-bg-secondary);
    border-radius: 16px;
    border-left: 4px solid var(--tty-primary);
}

.tty-help-article-updated {
    color: var(--tty-text-secondary);
    font-size: 14px;
    margin: 0;
}

/* No Results */
.tty-help-no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--tty-bg-secondary);
    border-radius: 20px;
}

.tty-help-no-results i {
    font-size: 48px;
    color: var(--tty-primary);
    opacity: 0.3;
    margin-bottom: 20px;
}

.tty-help-no-results p {
    font-size: 18px;
    color: var(--tty-text-secondary);
    margin: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tty-animated {
    animation: fadeInUp 0.6s ease forwards;
}

/* Dark theme support */
[data-theme="dark"] .tty-help-wrapper::before {
    opacity: 0.03;
}

[data-theme="dark"] .tty-help-category-card {
    background: var(--tty-bg-tertiary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .tty-help-widget {
    background: var(--tty-bg-tertiary);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .tty-help-categories-list a:hover {
    background: var(--tty-bg-secondary);
}

[data-theme="dark"] .tty-search-skeleton .tty-skeleton-line {
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
}

/* Responsive */
@media (max-width: 992px) {
    .tty-help-container {
        flex-direction: column;
    }
    
    .tty-help-sidebar {
        position: relative;
        top: 0;
        flex: 1;
        max-width: 100%;
        order: 0;
    }
    
    .tty-help-categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .tty-help-wrapper::before {
        display: none;
    }
    
    .tty-help-sidebar {
        display: none !important;
    }
    
    .tty-help-wrapper.no-banner .tty-help-search-container {
        margin: 20px auto 26px;
    }
    
    .tty-help-search-container {
        margin: -34px auto 26px;
        padding: 0px;
    }
    
    .tty-help-categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tty-help-category-card {
        padding: 20px;
    }
    
    .tty-help-articles-grid {
        grid-template-columns: 1fr;
    }
}