/* Adomo Helpdesk Theme - matches adomo.ai brand */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&family=Poppins:wght@600;700;800&display=swap');

:root {
    --adomo-primary: #d2460f;
    --adomo-primary-hover: #b83d0d;
    --adomo-bg: #f4f4f5;
    --adomo-bg-dark: #09090b;
    --adomo-card: #ffffff;
    --adomo-card-border: #e4e4e7;
    --adomo-text: #18181b;
    --adomo-text-muted: #71717a;
    --adomo-border: #e4e4e7;
    --adomo-input-bg: #f4f4f5;
    --adomo-input-focus: #d2460f;
    --adomo-font-sans: 'Outfit', system-ui, sans-serif;
    --adomo-font-display: 'Poppins', system-ui, sans-serif;
}

/* Page wrapper */
.adomo-helpdesk-page {
    font-family: var(--adomo-font-sans);
    background: var(--adomo-bg);
    color: var(--adomo-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
.adomo-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 1.5rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    position: sticky;
    top: 0;
    z-index: 50;
}

.adomo-header .adomo-logo {
    height: 32px;
    transition: transform 0.3s;
}

.adomo-header .adomo-logo:hover {
    transform: scale(1.1);
}

.adomo-header-nav a {
    font-family: var(--adomo-font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--adomo-text);
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    transition: all 0.3s;
}

.adomo-header-nav a:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Hero section */
.adomo-hero {
    text-align: center;
    padding: 4rem 1.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.adomo-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: rgba(210, 70, 15, 0.05);
    filter: blur(100px);
    border-radius: 50%;
    pointer-events: none;
}

.adomo-hero h1 {
    font-family: var(--adomo-font-display);
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: -0.025em;
    color: var(--adomo-text);
    margin-bottom: 0.75rem;
    position: relative;
}

.adomo-hero p {
    font-size: 1.125rem;
    color: var(--adomo-text-muted);
    max-width: 36rem;
    margin: 0 auto;
    position: relative;
}

/* Form card */
.adomo-form-card {
    max-width: 640px;
    margin: 0 auto 4rem;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff, #f4f4f5);
    border: 1px solid rgba(228, 228, 231, 0.6);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(210, 70, 15, 0.05);
    position: relative;
    overflow: hidden;
}

.adomo-form-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 138, 76, 0.12), transparent 40%);
    pointer-events: none;
}

.adomo-form-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.1), transparent 35%);
    pointer-events: none;
}

/* Form elements */
.adomo-form-card .s_website_form_rows {
    position: relative;
    z-index: 1;
}

.adomo-form-card .s_website_form_label_content {
    font-family: var(--adomo-font-sans);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--adomo-text);
}

.adomo-form-card .s_website_form_mark {
    color: var(--adomo-primary);
}

.adomo-form-card .form-control,
.adomo-form-card .s_website_form_input {
    font-family: var(--adomo-font-sans);
    background: var(--adomo-input-bg);
    border: 1px solid var(--adomo-border);
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--adomo-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.adomo-form-card .form-control:focus,
.adomo-form-card .s_website_form_input:focus {
    border-color: var(--adomo-primary);
    box-shadow: 0 0 0 3px rgba(210, 70, 15, 0.1);
    outline: none;
    background: #ffffff;
}

.adomo-form-card textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Submit button */
.adomo-form-card .s_website_form_send,
.adomo-form-card .btn-primary {
    font-family: var(--adomo-font-sans);
    font-weight: 500;
    font-size: 0.875rem;
    background: var(--adomo-primary);
    color: #ffffff;
    border: 1px solid var(--adomo-primary);
    border-radius: 9999px;
    padding: 0.625rem 2rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(210, 70, 15, 0.3);
    text-decoration: none;
}

.adomo-form-card .s_website_form_send:hover,
.adomo-form-card .btn-primary:hover {
    background: var(--adomo-primary-hover);
    border-color: var(--adomo-primary-hover);
    box-shadow: 0 6px 20px rgba(210, 70, 15, 0.4);
    transform: translateY(-1px);
}

.adomo-form-card .s_website_form_send:active,
.adomo-form-card .btn-primary:active {
    transform: scale(0.95);
}

/* SLA info cards */
.adomo-sla-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 640px;
    margin: 2rem auto 3rem;
}

.adomo-sla-card {
    background: var(--adomo-card);
    border: 1px solid var(--adomo-card-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
}

.adomo-sla-card .sla-priority {
    font-family: var(--adomo-font-display);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--adomo-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.adomo-sla-card .sla-time {
    font-family: var(--adomo-font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--adomo-text);
}

.adomo-sla-card .sla-label {
    font-size: 0.75rem;
    color: var(--adomo-text-muted);
    margin-top: 0.25rem;
}

/* Footer */
.adomo-footer {
    background: var(--adomo-bg);
    border-top: 1px solid rgba(228, 228, 231, 0.5);
    padding: 3rem 1.5rem 2rem;
    text-align: center;
    position: relative;
}

.adomo-footer p {
    font-size: 0.75rem;
    color: var(--adomo-text-muted);
}

.adomo-footer a {
    color: var(--adomo-text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s;
}

.adomo-footer a:hover {
    color: var(--adomo-text);
}

.adomo-footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Contact info */
.adomo-contact-info {
    max-width: 640px;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.adomo-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--adomo-text-muted);
}

.adomo-contact-item a {
    color: var(--adomo-primary);
    text-decoration: none;
    font-weight: 500;
}

.adomo-contact-item a:hover {
    text-decoration: underline;
}

/* Thank you page */
.adomo-thankyou {
    text-align: center;
    padding: 6rem 1.5rem;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.adomo-thankyou .check-icon {
    width: 64px;
    height: 64px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #10b981;
    font-size: 1.5rem;
}

.adomo-thankyou h1 {
    font-family: var(--adomo-font-display);
    font-weight: 800;
    font-size: 2rem;
    color: var(--adomo-text);
    margin-bottom: 0.5rem;
}

.adomo-thankyou p {
    font-size: 1.125rem;
    color: var(--adomo-text-muted);
}

.adomo-thankyou .ticket-ref {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--adomo-border);
    border-radius: 0.5rem;
    background: var(--adomo-card);
    font-family: var(--adomo-font-display);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--adomo-text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.adomo-thankyou .home-link {
    margin-top: 2rem;
    color: var(--adomo-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.adomo-thankyou .home-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .adomo-hero h1 {
        font-size: 1.75rem;
    }

    .adomo-form-card {
        margin: 0 1rem 3rem;
        padding: 1.5rem;
    }

    .adomo-sla-grid {
        grid-template-columns: repeat(2, 1fr);
        margin: 1.5rem 1rem 2rem;
    }

    .adomo-header-nav {
        display: none;
    }
}

/* Knowledge Base - Search bar */
.adomo-kb-search {
    max-width: 640px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
}

.adomo-kb-search .form-control {
    font-family: var(--adomo-font-sans);
    background: var(--adomo-input-bg);
    border: 1px solid var(--adomo-border);
    border-radius: 9999px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    color: var(--adomo-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.adomo-kb-search .form-control:focus {
    border-color: var(--adomo-primary);
    box-shadow: 0 0 0 3px rgba(210, 70, 15, 0.1);
    outline: none;
    background: #ffffff;
}

/* Knowledge Base - Article cards grid */
.adomo-kb-sections {
    padding: 0 1.5rem 3rem;
}

.adomo-kb-sections .card {
    border: 1px solid var(--adomo-card-border);
    border-radius: 0.75rem;
    transition: box-shadow 0.2s, transform 0.2s;
    overflow: hidden;
}

.adomo-kb-sections .card:hover {
    box-shadow: 0 10px 25px -5px rgba(210, 70, 15, 0.08);
    transform: translateY(-2px);
}

.adomo-kb-sections .card-title {
    font-family: var(--adomo-font-display);
    font-weight: 600;
    color: var(--adomo-text);
}

.adomo-kb-sections .btn-secondary {
    background: var(--adomo-primary);
    border-color: var(--adomo-primary);
    color: #ffffff;
    border-radius: 9999px;
    font-family: var(--adomo-font-sans);
    font-weight: 500;
    transition: all 0.2s;
}

.adomo-kb-sections .btn-secondary:hover {
    background: var(--adomo-primary-hover);
    border-color: var(--adomo-primary-hover);
}

.adomo-kb-sections .nav-link {
    font-family: var(--adomo-font-sans);
    color: var(--adomo-text);
    font-size: 0.875rem;
}

.adomo-kb-sections .nav-link:hover {
    color: var(--adomo-primary);
}

/* Knowledge Base - Table of contents (topic pills) */
.adomo-toc {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    padding: 0 1.5rem;
}

.adomo-toc-link {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-family: var(--adomo-font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--adomo-text);
    background: var(--adomo-card);
    border: 1px solid var(--adomo-card-border);
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s;
}

.adomo-toc-link:hover {
    border-color: var(--adomo-primary);
    color: var(--adomo-primary);
    box-shadow: 0 2px 8px rgba(210, 70, 15, 0.1);
    transform: translateY(-1px);
}

/* Knowledge Base - Inline article sections */
.adomo-article-section {
    padding: 0 1.5rem;
    margin-bottom: 1rem;
}

.adomo-article-section-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--adomo-card);
    border: 1px solid var(--adomo-card-border);
    border-radius: 1rem;
}

.adomo-article-section-inner h2 {
    font-family: var(--adomo-font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--adomo-text);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(210, 70, 15, 0.15);
}

.adomo-article-section .adomo-article-content {
    font-family: var(--adomo-font-sans);
    line-height: 1.8;
    color: var(--adomo-text);
}

.adomo-article-section .adomo-article-content h3 {
    font-family: var(--adomo-font-display);
    font-weight: 600;
    font-size: 1.125rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--adomo-text);
}

.adomo-article-section .adomo-article-content p {
    margin-bottom: 0.875rem;
    color: #3f3f46;
}

.adomo-article-section .adomo-article-content a {
    color: var(--adomo-primary);
    text-decoration: none;
}

.adomo-article-section .adomo-article-content a:hover {
    text-decoration: underline;
}

.adomo-article-section .adomo-article-content strong {
    font-weight: 600;
    color: var(--adomo-text);
}

/* Knowledge article page (direct link fallback) */
.adomo-article-breadcrumb {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 2rem 0;
    font-size: 0.8125rem;
    color: var(--adomo-text-muted);
}

.adomo-article-breadcrumb a {
    color: var(--adomo-primary);
    text-decoration: none;
}

.adomo-article-breadcrumb a:hover {
    text-decoration: underline;
}

.adomo-breadcrumb-sep {
    margin: 0 0.5rem;
    color: var(--adomo-border);
}

.adomo-article-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.adomo-article-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

.adomo-article-sidebar h4 {
    font-family: var(--adomo-font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--adomo-text);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.adomo-article-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.adomo-article-sidebar li a {
    display: block;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    color: var(--adomo-text-muted);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.15s;
}

.adomo-article-sidebar li a:hover {
    color: var(--adomo-primary);
    background: rgba(210, 70, 15, 0.05);
}

.adomo-article-sidebar li.active a {
    color: var(--adomo-primary);
    background: rgba(210, 70, 15, 0.08);
    font-weight: 500;
}

.adomo-article-body {
    flex-grow: 1;
    min-width: 0;
}

.adomo-article-body h1 {
    font-family: var(--adomo-font-display);
    font-weight: 700;
    font-size: 2rem;
    color: var(--adomo-text);
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.adomo-article-content {
    font-family: var(--adomo-font-sans);
    line-height: 1.8;
    color: var(--adomo-text);
}

.adomo-article-content h2 {
    font-family: var(--adomo-font-display);
    font-weight: 700;
    font-size: 1.375rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--adomo-text);
}

.adomo-article-content h3 {
    font-family: var(--adomo-font-display);
    font-weight: 600;
    font-size: 1.125rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--adomo-text);
}

.adomo-article-content p {
    margin-bottom: 1rem;
}

.adomo-article-content a {
    color: var(--adomo-primary);
    text-decoration: none;
}

.adomo-article-content a:hover {
    text-decoration: underline;
}

.adomo-article-content strong {
    font-weight: 600;
    color: var(--adomo-text);
}

@media (max-width: 768px) {
    .adomo-article-container {
        flex-direction: column;
        padding: 1rem;
    }
    .adomo-article-sidebar {
        width: 100%;
        position: static;
    }
}

/* Livechat widget overrides */
.o-livechat-LivechatButton {
    background-color: var(--adomo-primary) !important;
    border-color: var(--adomo-primary) !important;
}

.o-livechat-LivechatButton:hover {
    background-color: var(--adomo-primary-hover) !important;
    border-color: var(--adomo-primary-hover) !important;
}

.o-mail-ChatWindow .o-mail-ChatWindow-header {
    background-color: var(--adomo-primary) !important;
}

/* Override Odoo defaults */
.adomo-helpdesk-page .container {
    max-width: 100%;
    padding: 0;
}

.adomo-helpdesk-page #wrapwrap {
    background: var(--adomo-bg);
}

/* Hide ALL default Odoo chrome when using our custom layout.
   Our custom elements use <div> with .adomo-* classes inside #wrap,
   so hiding everything outside #wrap is safe.
   This CSS only loads on helpdesk pages via direct <link> tag. */

/* Nuclear: hide every direct child of body except #wrapwrap, resources,
   and OWL component containers (livechat button lives here). */
body.adomo-helpdesk-page > *:not(#wrapwrap):not(script):not(style):not(link):not(.o_notification_manager):not(.o-main-components-container):not(.o_livechat_button):not([id^="o-livechat"]) {
    display: none !important;
}

/* Inside #wrapwrap: hide Odoo chrome but keep knowledge article header */
.adomo-helpdesk-page #wrapwrap > header,
.adomo-helpdesk-page #wrapwrap > footer,
.adomo-helpdesk-page #wrapwrap > nav,
.adomo-helpdesk-page header:not(.o_knowledge_header):not(.o_knowledge_header_line),
.adomo-helpdesk-page footer:not(.adomo-footer),
.adomo-helpdesk-page #top,
.adomo-helpdesk-page .o_header,
.adomo-helpdesk-page .o_footer,
.adomo-helpdesk-page .o_footer_copyright,
.adomo-helpdesk-page .o_search_bar,
.adomo-helpdesk-page .o_searchbar_form {
    display: none !important;
}
