/**
 * Support Hub & Guide Styles
 */

/* ==========================================================================
   Support Hub (Listing Page)
   ========================================================================== */

.support-hub {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Breadcrumbs */
.support-hub .breadcrumbs {
    margin-bottom: 1.5rem;
}

.support-hub .breadcrumbs ol {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: var(--warm-500);
}

.support-hub .breadcrumbs li {
    display: flex;
    align-items: center;
}

.support-hub .breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: var(--warm-300);
}

.support-hub .breadcrumbs a {
    color: var(--green);
    text-decoration: none;
}

.support-hub .breadcrumbs a:hover {
    text-decoration: underline;
}

/* Hub Hero */
.hub-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hub-hero h1 {
    font-size: 2.5rem;
    color: var(--navy);
    margin-bottom: 1.25rem;
}

.hub-message {
    max-width: 640px;
    margin: 0 auto;
}

.hub-message textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--warm-200);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background: white;
    resize: none;
    overflow: hidden;
    min-height: 100px;
}

.hub-message textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(17, 185, 129, 0.15);
}

/* Dual CTA Section */
.hub-next-steps {
    text-align: center;
    max-width: 640px;
    margin: 2.5rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, var(--warm-50) 0%, var(--primary-50) 100%);
    border-radius: var(--radius);
}

.hub-next-steps__heading {
    font-size: 1.25rem;
    color: var(--navy);
    margin: 0 0 1rem 0;
}

.hub-next-steps__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 479px) {
    .hub-next-steps__actions {
        flex-direction: column;
    }

    .hub-next-steps__actions .btn {
        width: 100%;
    }
}

/* Search Results Panel */
.search-results {
    max-width: 640px;
    margin: 0 auto 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--warm-50);
    border: 1px solid var(--warm-200);
    border-radius: var(--radius);
}

.search-results__heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 0.75rem 0;
}

.search-results__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-results__list li {
    padding: 0.375rem 0;
}

.search-results__list a {
    color: var(--green);
    text-decoration: none;
    font-weight: 500;
}

.search-results__list a:hover {
    text-decoration: underline;
}

.search-results__empty {
    color: var(--warm-500);
    font-size: 0.9375rem;
    margin: 0;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Hub Sections */
.hub-section {
    margin-bottom: 2.5rem;
}

.hub-section h2 {
    font-size: 1.25rem;
    color: var(--navy);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--warm-200);
}

/* Hub Grid */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Hub Cards */
.hub-card {
    display: block;
    background: white;
    border: 1px solid var(--warm-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hub-card:hover {
    border-color: var(--green);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.hub-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 0.5rem 0;
}

.hub-card:hover .hub-card__title {
    color: var(--green);
}

.hub-card__description {
    font-size: 0.875rem;
    color: var(--warm-600);
    margin: 0;
    line-height: 1.5;
}

/* Hub Contact Section (additional fields revealed after escalation) */
.hub-contact {
    scroll-margin-top: 2rem;
    margin-top: 1.5rem;
}

.hub-contact__heading {
    font-size: 1.25rem;
    color: var(--navy);
    margin: 0 0 1.25rem 0;
    text-align: center;
}

.hub-contact__inner {
    max-width: 640px;
    margin: 0 auto;
}

/* ==========================================================================
   Support Guide (Individual Article)
   ========================================================================== */

/* Support Guide Layout */
.support-guide {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

@media (min-width: 640px) {
    .support-guide {
        padding: 2rem 1.5rem;
    }
}

@media (min-width: 900px) {
    .support-guide {
        padding: 2.5rem 2rem;
    }
}

.support-guide-container {
    background: white;
    border: 1px solid var(--warm-200);
    border-radius: 12px;
    padding: 1.5rem;
}

@media (min-width: 640px) {
    .support-guide-container {
        padding: 2rem;
    }
}

@media (min-width: 900px) {
    .support-guide-container {
        padding: 2.5rem;
    }
}

/* Support Breadcrumbs (not in dark hero) */
.support-breadcrumbs {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    color: var(--warm-500);
}

.support-breadcrumbs a {
    color: var(--green);
    text-decoration: none;
}

.support-breadcrumbs a:hover {
    text-decoration: underline;
}

.support-breadcrumbs .breadcrumb-sep {
    margin: 0 0.5rem;
    color: var(--warm-300);
}

.support-breadcrumbs .breadcrumb-current {
    color: var(--warm-600);
}

/* Support Guide Header */
.support-guide-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--warm-200);
}

.support-guide-header h1 {
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.support-guide-description {
    font-size: 1.125rem;
    color: var(--warm-600);
    margin: 0;
}

/* Support Guide Content */
.support-guide-content {
    line-height: 1.7;
    color: var(--warm-700);
}

.support-guide-content h2 {
    font-size: 1.5rem;
    color: var(--navy);
    margin: 2.5rem 0 1rem;
    padding-top: 1rem;
}

.support-guide-content h3 {
    font-size: 1.25rem;
    color: var(--navy);
    margin: 2rem 0 0.75rem;
}

.support-guide-content p {
    margin-bottom: 1rem;
}

.support-guide-content ul,
.support-guide-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.support-guide-content li {
    margin-bottom: 0.5rem;
}

.support-guide-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.support-guide-content th,
.support-guide-content td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--warm-200);
}

.support-guide-content th {
    background: var(--warm-50);
    font-weight: 600;
    color: var(--navy);
}

.support-guide-content hr {
    border: none;
    border-top: 1px solid var(--warm-200);
    margin: 2rem 0;
}

.support-guide-content strong {
    color: var(--navy);
}

.support-guide-content a {
    color: var(--green);
}

/* Fix horizontal rules rendered as <p>---</p> */
.support-guide-content p:has(+ h2) {
    display: none;
}

/* Table of Contents */
.guide-toc {
    background: var(--warm-50);
    border: 1px solid var(--warm-200);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.guide-toc .toc-title {
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.guide-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.guide-toc li {
    margin: 0.5rem 0;
    padding-left: 1rem;
    border-left: 2px solid var(--warm-200);
}

.guide-toc a {
    color: var(--green);
    text-decoration: none;
    font-size: 0.9375rem;
}

.guide-toc a:hover {
    text-decoration: underline;
}

/* Legacy support-search (unused, kept for reference) */

/* Guide Feedback */
.guide-feedback {
    margin: 3rem 0;
    padding: 1.5rem;
    background: var(--warm-50);
    border-radius: var(--radius);
    text-align: center;
}

.guide-feedback__buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.guide-feedback__thanks {
    color: var(--green);
    margin-top: 1rem;
}

/* Related Guides */
.related-guides {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--warm-50);
    border-radius: var(--radius);
}

.related-guides h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.related-guides__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-guides__list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--warm-200);
}

.related-guides__list li:last-child {
    border-bottom: none;
}

.related-guides__list a {
    color: var(--green);
    text-decoration: none;
}

.related-guides__list a:hover {
    text-decoration: underline;
}

/* Guide Help CTA */
.guide-help {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, var(--warm-50) 0%, var(--primary-50) 100%);
    border-radius: var(--radius);
    text-align: center;
}

.guide-help h2 {
    margin-bottom: 0.5rem;
}

.guide-help p {
    color: var(--warm-600);
    margin-bottom: 1.5rem;
}

.guide-help__buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Empty State */
.hub-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--warm-600);
}

.hub-empty a {
    color: var(--green);
}

/* 404 Page */
.content-404 {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.content-404__content {
    text-align: center;
    padding: 3rem 0;
}

.content-404__content h1 {
    color: var(--navy);
    margin-bottom: 1rem;
}

.content-404__content p {
    color: var(--warm-600);
    margin-bottom: 2rem;
}

.content-404__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================================================
   Attachment Drop Zone
   ========================================================================= */

.attachment-dropzone {
    position: relative;
    border: 2px dashed var(--warm-300);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
    background: var(--warm-50, #fafaf9);
}

.attachment-dropzone:hover,
.attachment-dropzone:focus-visible {
    border-color: var(--green);
    background: rgba(17, 185, 129, 0.04);
}

.attachment-dropzone.is-dragover {
    border-color: var(--green);
    background: rgba(17, 185, 129, 0.08);
    border-style: solid;
}

.attachment-dropzone__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.attachment-dropzone__prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    color: var(--warm-500);
    pointer-events: none;
}

.attachment-dropzone__prompt svg {
    color: var(--warm-400);
    margin-bottom: 0.25rem;
}

.attachment-dropzone__prompt span {
    font-size: 0.9375rem;
}

.attachment-dropzone__prompt strong {
    color: var(--green);
}

.attachment-dropzone__prompt small {
    font-size: 0.8125rem;
    color: var(--warm-400);
}

/* Attachment List */
.attachment-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.attachment-list:empty {
    display: none;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    background: white;
    border: 1px solid var(--warm-200);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.attachment-item__icon {
    flex-shrink: 0;
    color: var(--warm-400);
}

.attachment-item__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--warm-700);
}

.attachment-item__size {
    flex-shrink: 0;
    color: var(--warm-400);
    font-size: 0.8125rem;
}

.attachment-item__remove {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.125rem;
    color: var(--warm-400);
    border-radius: 3px;
    line-height: 1;
    transition: color 0.1s, background-color 0.1s;
}

.attachment-item__remove:hover {
    color: var(--red, #ef4444);
    background: rgba(239, 68, 68, 0.08);
}

.attachment-item.is-uploading {
    opacity: 0.6;
}

.attachment-item.is-error {
    border-color: var(--red, #ef4444);
    background: rgba(239, 68, 68, 0.04);
}

.attachment-item__status {
    flex-shrink: 0;
    font-size: 0.8125rem;
}

.attachment-item__status--uploading {
    color: var(--warm-400);
}

.attachment-item__status--error {
    color: var(--red, #ef4444);
}

.label .optional {
    font-weight: normal;
    color: var(--warm-400);
    font-size: 0.875rem;
}

label .optional {
    font-weight: normal;
    color: var(--warm-400);
    font-size: 0.875rem;
}
