/**
 * Basehead Support - Frontend Styles
 * Dark theme matching original support form
 */

/* WooCommerce My Account Override - High Specificity */
.woocommerce-MyAccount-content .bh-support-form-wrap .bh-form-group input[type="text"],
.woocommerce-MyAccount-content .bh-support-form-wrap .bh-form-group input[type="email"],
.woocommerce-MyAccount-content .bh-support-form-wrap .bh-form-group select,
.woocommerce-MyAccount-content .bh-support-form-wrap .bh-form-group textarea,
.woocommerce-account .bh-support-form-wrap .bh-form-group input[type="text"],
.woocommerce-account .bh-support-form-wrap .bh-form-group input[type="email"],
.woocommerce-account .bh-support-form-wrap .bh-form-group select,
.woocommerce-account .bh-support-form-wrap .bh-form-group textarea {
    background: #1e2128 !important;
    border: 1px solid #3a3f4a !important;
    color: #e8eaed !important;
    padding: 12px 14px !important;
    font-size: 15px !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.woocommerce-MyAccount-content .bh-support-form-wrap .bh-form-group select,
.woocommerce-account .bh-support-form-wrap .bh-form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
}

/* WooCommerce text overrides */
.woocommerce-MyAccount-content .bh-support-form-wrap .bh-form-header h2,
.woocommerce-account .bh-support-form-wrap .bh-form-header h2 {
    color: #ffffff !important;
}

.woocommerce-MyAccount-content .bh-support-form-wrap .bh-form-header p,
.woocommerce-account .bh-support-form-wrap .bh-form-header p {
    color: #9ca3af !important;
}

.woocommerce-MyAccount-content .bh-support-form-wrap .bh-field-hint,
.woocommerce-MyAccount-content .bh-support-form-wrap .bh-char-count,
.woocommerce-account .bh-support-form-wrap .bh-field-hint,
.woocommerce-account .bh-support-form-wrap .bh-char-count {
    color: #6b7280 !important;
}

/* Variables */
:root {
    --bh-bg-dark: #1c1f26;
    --bh-bg-darker: #15171d;
    --bh-bg-input: #262a33;
    --bh-border-color: #363a45;
    --bh-text-primary: #ffffff;
    --bh-text-secondary: #9ca3af;
    --bh-text-hint: #6b7280;
    --bh-text-placeholder: #5a6270;
    --bh-accent-blue: #6b8cae;
    --bh-accent-cyan: #7ab8c4;
    --bh-accent-orange: #c9a066;
    --bh-accent-red: #c46b6b;
    --bh-success: #8ab88a;
    --bh-warning: #c9a066;
    --bh-border-radius: 6px;
}

/* Form Wrapper */
.bh-support-form-wrap,
.bh-tickets-list-wrap,
.bh-email-lookup-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Ticket view needs more width for support work */
.bh-ticket-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Form Header */
.bh-form-header {
    margin-bottom: 20px;
}

.bh-form-header h2 {
    color: var(--bh-text-primary);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
}

.bh-form-header p {
    color: var(--bh-text-secondary);
    font-size: 14px;
    margin: 0;
}

/* Notices */
.bh-notice {
    padding: 15px 20px;
    border-radius: var(--bh-border-radius);
    margin-bottom: 20px;
}

.bh-notice-success {
    background: rgba(100, 130, 100, 0.2);
    border: 1px solid rgba(100, 130, 100, 0.4);
    color: #9cb89c;
}

.bh-notice-error {
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.4);
    color: var(--bh-accent-orange);
}

.bh-notice-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--bh-accent-blue);
}

.bh-notice-warning {
    background: rgba(200, 120, 60, 0.2);
    border: 2px solid rgba(200, 120, 60, 0.5);
    color: #e8a060;
    padding: 20px 25px;
    font-size: 1.05em;
}

/* Success Banner - large centered muted green */
.bh-success-banner {
    background: rgba(120, 160, 120, 0.2);
    border: 2px solid rgba(120, 160, 120, 0.5);
    border-radius: var(--bh-border-radius);
    padding: 30px 40px;
    text-align: center;
    margin: 20px 0;
}

.bh-success-banner p {
    color: #c8e0c8;
    font-size: 1.1em;
    margin: 0 0 10px 0;
}

.bh-success-banner p:last-child {
    margin-bottom: 0;
}

.bh-notice-warning p {
    margin: 0 0 10px 0;
}

.bh-notice-warning p:last-child {
    margin-bottom: 0;
}

.bh-notice-warning strong {
    font-size: 1.1em;
}

.bh-notice ul {
    margin: 0;
    padding-left: 20px;
}

/* Ticket Success Page */
.bh-ticket-success {
    background: var(--bh-bg-dark);
    border: 1px solid var(--bh-border-color);
    border-radius: var(--bh-border-radius);
    padding: 40px;
    text-align: center;
}

.bh-success-icon {
    width: 80px;
    height: 80px;
    background: rgba(92, 184, 92, 0.15);
    border: 2px solid rgba(92, 184, 92, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 40px;
    color: var(--bh-success);
}

.bh-ticket-success h2 {
    color: var(--bh-success);
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 24px 0;
}

.bh-success-details {
    background: var(--bh-bg-darker);
    border: 1px solid var(--bh-border-color);
    border-radius: var(--bh-border-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.bh-ticket-number {
    font-size: 18px;
    color: var(--bh-text-primary);
    margin: 0 0 12px 0;
}

.bh-ticket-number strong {
    color: var(--bh-accent-cyan);
    font-size: 22px;
    letter-spacing: 0.5px;
}

.bh-success-message {
    color: var(--bh-text-secondary);
    margin: 0;
    font-size: 14px;
}

.bh-success-message strong {
    color: var(--bh-text-primary);
}

.bh-success-next-steps {
    text-align: left;
    background: var(--bh-bg-input);
    border-radius: var(--bh-border-radius);
    padding: 20px 24px;
    margin-bottom: 28px;
}

.bh-success-next-steps h3 {
    color: var(--bh-text-primary);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.bh-success-next-steps ul {
    margin: 0;
    padding-left: 20px;
}

.bh-success-next-steps li {
    color: var(--bh-text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.bh-success-next-steps li:last-child {
    margin-bottom: 0;
}

.bh-success-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.bh-success-actions .bh-btn,
.bh-success-actions a.bh-btn {
    background: #3a4252 !important;
    border: none !important;
    color: #a8b0bc !important;
    padding: 12px 24px !important;
    text-decoration: none !important;
}

.bh-success-actions .bh-btn:hover,
.bh-success-actions a.bh-btn:hover {
    background: #4a5262 !important;
    color: #ffffff !important;
}

.bh-success-actions a:not(.bh-btn) {
    background: #3a4252 !important;
    color: #a8b0bc !important;
    text-decoration: none !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
}

.bh-success-actions a:not(.bh-btn):hover {
    background: #4a5262 !important;
    color: #ffffff !important;
}

.bh-btn-secondary {
    background: transparent;
    border: 1px solid var(--bh-border-color);
    color: var(--bh-text-secondary);
}

.bh-btn-secondary:hover {
    background: var(--bh-bg-input);
    border-color: var(--bh-text-secondary);
    color: var(--bh-text-primary);
}

/* Form Styles */
.bh-support-form,
.bh-reply-form,
.bh-email-lookup-form {
    background: var(--bh-bg-dark);
    padding: 30px;
    border-radius: var(--bh-border-radius);
    border: 1px solid var(--bh-border-color);
}

.bh-required-note {
    color: var(--bh-text-secondary);
    font-size: 13px;
    margin: 0 0 20px 0;
}

.bh-form-row {
    margin-bottom: 20px;
}

.bh-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .bh-form-row-half {
        grid-template-columns: 1fr;
    }
}

.bh-form-group {
    margin-bottom: 20px;
}

.bh-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--bh-text-primary);
    font-size: 14px;
    opacity: 0.7;
}

.bh-form-group label .required {
    color: var(--bh-accent-orange);
}

.bh-form-group input[type="text"],
.bh-form-group input[type="email"],
.bh-form-group select,
.bh-form-group textarea {
    width: 100% !important;
    padding: 12px 14px !important;
    background: #1e2128 !important;
    border: 1px solid #3a3f4a !important;
    border-radius: var(--bh-border-radius) !important;
    font-size: 15px !important;
    color: #e8eaed !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: none !important;
}

/* Readonly input fields - dimmed and italic */
.bh-form-group input[readonly] {
    background: transparent;
    border-color: transparent;
    color: var(--bh-text-hint);
    font-style: italic;
    cursor: not-allowed;
}

/* Account info display - logged in user */
.bh-account-info {
    opacity: 0.8;
    font-style: italic;
    margin-bottom: 20px;
    padding: 10px 0;
}

.bh-account-info p {
    margin: 0 0 5px 0;
    color: var(--bh-text-secondary);
    font-size: 14px;
}

.bh-account-info p:last-child {
    margin-bottom: 0;
}

.bh-form-group input::placeholder,
.bh-form-group textarea::placeholder {
    color: var(--bh-text-primary);
    font-style: italic;
    opacity: 0.4;
}

.bh-form-group select option:first-child {
    color: var(--bh-text-placeholder);
    font-style: italic;
}

.bh-form-group input:focus,
.bh-form-group select:focus,
.bh-form-group textarea:focus {
    outline: none !important;
    border-color: #5a7a9a !important;
    box-shadow: 0 0 0 2px rgba(90, 122, 154, 0.2) !important;
}

.bh-form-group select {
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
}

.bh-form-group select option {
    background: #15171d !important;
    color: #e8eaed !important;
}

.bh-form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.bh-field-hint {
    margin-top: 6px;
    font-size: 13px;
    color: var(--bh-text-hint);
}

.bh-hint-highlight {
    color: var(--bh-accent-cyan);
}

.bh-char-count {
    color: var(--bh-text-hint);
}

.bh-emoji {
    font-size: 14px;
}

/* Radio Group */
.bh-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.bh-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--bh-accent-cyan);
    font-weight: normal;
    cursor: pointer;
    font-size: 14px;
}

.bh-radio-label input[type="radio"] {
    width: auto;
    accent-color: var(--bh-accent-cyan);
}

/* CAPTCHA */
.bh-captcha-group {
    padding-top: 20px;
    border-top: 1px solid var(--bh-border-color);
}

.bh-captcha-group label {
    margin-bottom: 12px;
}

/* Buttons */
.bh-btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--bh-border-radius);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.bh-btn:active {
    transform: translateY(1px);
}

.bh-btn-primary {
    background: var(--bh-accent-blue);
    color: white;
}

.bh-btn-primary:hover {
    background: #2563eb;
}

.bh-form-actions {
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Skip button for debug mode */
.bh-skip-btn {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--bh-border-color);
    color: var(--bh-text-hint);
    font-size: 13px;
    padding: 8px 16px;
}

.bh-skip-btn:hover {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
    color: #ffc107;
}

/* Form Phases */
.bh-form-phase {
    /* Phase containers */
}

.bh-phase-2-header {
    background: var(--bh-bg-input);
    border: 1px solid var(--bh-border-color);
    border-radius: var(--bh-border-radius);
    padding: 20px;
    margin-bottom: 25px;
}

.bh-phase-2-header h3 {
    color: var(--bh-text-primary);
    font-size: 16px;
    margin: 0 0 8px 0;
}

.bh-phase-2-header p {
    color: var(--bh-text-secondary);
    font-size: 14px;
    margin: 0;
}

/* Suggestions Box */
.bh-suggestions-box {
    background: var(--bh-bg-darker);
    border: 2px solid var(--bh-accent-blue);
    border-radius: var(--bh-border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.bh-suggestions-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--bh-border-color);
    color: var(--bh-text-primary);
}

.bh-bulb-icon {
    font-size: 24px;
}

.bh-suggestion {
    background: var(--bh-bg-input);
    border-radius: var(--bh-border-radius);
    padding: 15px;
    margin-bottom: 15px;
}

.bh-suggestion:last-child {
    margin-bottom: 0;
}

.bh-suggestion-resolution {
    border-left: 4px solid var(--bh-success);
}

.bh-suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.bh-suggestion-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--bh-text-primary);
}

.bh-suggestion-header h4 a {
    color: var(--bh-accent-cyan);
    text-decoration: none;
    transition: color 0.2s;
}

.bh-suggestion-header h4 a:hover {
    color: var(--bh-accent-blue);
    text-decoration: underline;
}

.bh-doc-link {
    display: inline-block;
    color: var(--bh-accent-cyan);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 0;
}

.bh-doc-link:hover {
    color: var(--bh-accent-blue);
    text-decoration: underline;
}

/* Inline links within AI response content */
.bh-inline-link {
    color: #ced69c;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted #ced69c;
}

.bh-inline-link:hover {
    color: #dce4b0;
    text-decoration: none;
    border-bottom-style: solid;
    border-bottom-color: #dce4b0;
}

/* Markdown-style headers in AI content */
.bh-suggestion-content .bh-h2 {
    display: block;
    font-size: 15px;
    margin: 12px 0 8px 0;
    color: var(--bh-text-primary);
}

.bh-suggestion-content .bh-h3 {
    display: block;
    font-size: 14px;
    margin: 10px 0 6px 0;
    color: var(--bh-text-primary);
}

/* List items in AI content */
.bh-suggestion-content .bh-bullet,
.bh-suggestion-content .bh-numbered {
    display: block;
    margin: 4px 0 4px 16px;
    padding-left: 8px;
}

.bh-suggestion-content .bh-bullet::before {
    content: "•";
    margin-left: -16px;
    margin-right: 8px;
    color: #ced69c;
}

.bh-suggestion-content .bh-num {
    color: #ced69c;
    font-weight: 600;
}

/* Code snippets in AI content */
.bh-suggestion-content code {
    background: var(--bh-bg-darker);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
    color: var(--bh-accent-orange);
}

.bh-source-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.bh-badge-resolution {
    background: rgba(34, 197, 94, 0.2);
    color: var(--bh-success);
}

.bh-badge-manual {
    background: rgba(59, 130, 246, 0.2);
    color: var(--bh-accent-blue);
}

.bh-badge-ai {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.bh-view-article-btn {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bh-accent-blue);
    color: #fff !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.bh-view-article-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    text-decoration: none;
    color: #fff !important;
}

.bh-suggestion-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--bh-text-secondary);
}

.bh-suggestion-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--bh-border-color);
}

.bh-solved-btn,
.bh-need-help-btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: var(--bh-border-radius);
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.bh-solved-btn {
    background: var(--bh-success);
    color: white;
}

.bh-solved-btn:hover {
    background: #16a34a;
}

.bh-need-help-btn {
    background: var(--bh-bg-input);
    color: var(--bh-text-secondary);
    border: 1px solid var(--bh-border-color);
}

.bh-need-help-btn:hover {
    background: var(--bh-border-color);
}

.bh-suggestions-loading {
    text-align: center;
    padding: 20px;
    color: var(--bh-text-secondary);
    position: relative;
    overflow: hidden;
}

.bh-suggestions-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Ticket View */
.bh-ticket-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--bh-border-color);
}

.bh-ticket-title h1 {
    font-size: 24px;
    margin: 0 0 10px 0;
    color: var(--bh-text-primary);
}

.bh-ticket-number {
    color: var(--bh-text-secondary);
    font-weight: normal;
    margin-right: 8px;
}

.bh-ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    font-size: 14px;
    color: var(--bh-text-secondary);
}

/* Status Badges */
.bh-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.status-open {
    background: rgba(107, 140, 174, 0.2);
    color: var(--bh-accent-blue);
}

.status-warning {
    background: rgba(201, 160, 102, 0.2);
    color: var(--bh-warning);
}

.status-info {
    background: rgba(122, 184, 196, 0.2);
    color: var(--bh-accent-cyan);
}

.status-success {
    background: rgba(92, 184, 92, 0.2);
    color: var(--bh-success);
}

.status-closed {
    background: rgba(107, 114, 128, 0.2);
    color: var(--bh-text-hint);
}

/* Conversation */
.bh-conversation {
    margin-bottom: 30px;
}

.bh-message {
    background: var(--bh-bg-input);
    border-radius: var(--bh-border-radius);
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--bh-border-color);
}

.bh-message-customer {
    border-left: 4px solid #a8b06c;
    background: #1a1d24;
}

/* Customer icon matches the vomit green border */
.bh-message-customer .bh-author-icon {
    color: #a8b06c;
}

.bh-message-support {
    border-left: 4px solid var(--bh-accent-blue);
    background: #0d0f12;
}

.bh-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bh-border-color);
}

.bh-message-author {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--bh-text-primary);
    opacity: 0.75;
}

.bh-author-avatar {
    border-radius: 50%;
    width: 28px;
    height: 28px;
}

/* Customer avatar gets a green border */
.bh-message-customer .bh-author-avatar {
    border: 2px solid #a8b06c;
}

/* Support avatar gets a blue border */
.bh-message-support .bh-author-avatar {
    border: 2px solid var(--bh-accent-blue);
}

.bh-author-icon {
    font-size: 18px;
}

.bh-message-time {
    font-size: 13px;
    color: var(--bh-text-hint);
}

.bh-message-content {
    line-height: 1.7;
    white-space: pre-wrap;
    color: var(--bh-text-secondary);
}

.bh-message-attachments {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--bh-border-color);
    color: var(--bh-text-secondary);
}

.bh-message-attachments ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.bh-message-attachments a {
    color: var(--bh-accent-blue);
}

.bh-attachment-size {
    color: var(--bh-text-hint);
    font-size: 13px;
}

/* Waiting for Support Banner */
.bh-waiting-banner {
    background: linear-gradient(135deg, #3d3520 0%, #2d2815 100%);
    border: 1px solid #8a7540;
    border-radius: var(--bh-border-radius);
    padding: 32px;
    text-align: center;
}

.bh-waiting-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.bh-waiting-banner h3 {
    color: #e8d59e;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bh-waiting-banner p {
    color: #c4b896;
    margin: 0 0 8px 0;
    line-height: 1.6;
}

.bh-waiting-banner .bh-waiting-note {
    color: #9a8f70;
    font-size: 13px;
    margin-top: 16px;
    margin-bottom: 0;
}

/* Reply Form */
.bh-reply-form-wrap {
    background: var(--bh-bg-input);
    padding: 25px;
    border-radius: var(--bh-border-radius);
    border: 1px solid var(--bh-border-color);
}

.bh-reply-form-wrap h3 {
    margin: 0 0 20px 0;
    color: var(--bh-text-primary);
}

/* Tickets Table */
.bh-tickets-table {
    width: 100%;
    border-collapse: collapse;
    background: #1a1d24;
    border-radius: var(--bh-border-radius);
    overflow: hidden;
}

.bh-tickets-table th,
.bh-tickets-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--bh-border-color);
}

.bh-tickets-table th {
    background: var(--bh-bg-darker);
    font-weight: 600;
    color: var(--bh-text-primary);
}

.bh-tickets-table td {
    color: var(--bh-text-secondary);
}

.bh-tickets-table a {
    color: var(--bh-accent-blue);
    text-decoration: none;
}

.bh-tickets-table a:hover {
    text-decoration: underline;
}

/* Email Lookup */
.bh-email-lookup-wrap {
    text-align: center;
}

.bh-email-lookup-form {
    max-width: 400px;
    margin: 0 auto;
}

/* File Upload */
.bh-file-upload-area {
    position: relative;
    border: 2px dashed var(--bh-border-color);
    border-radius: var(--bh-border-radius);
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.bh-file-upload-area:hover,
.bh-file-upload-area.dragover {
    border-color: var(--bh-accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

.bh-file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.bh-file-upload-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--bh-text-secondary);
    pointer-events: none;
}

.bh-upload-icon {
    font-size: 28px;
}

.bh-file-list {
    margin-top: 12px;
}

.bh-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bh-bg-input);
    border: 1px solid var(--bh-border-color);
    border-radius: var(--bh-border-radius);
    margin-bottom: 8px;
}

.bh-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--bh-text-primary);
    font-size: 14px;
}

.bh-file-icon {
    font-size: 18px;
}

.bh-file-name {
    word-break: break-all;
}

.bh-file-size {
    color: var(--bh-text-hint);
    font-size: 12px;
    margin-left: 8px;
}

.bh-file-remove {
    background: none;
    border: none;
    color: var(--bh-accent-red);
    font-size: 18px;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.bh-file-remove:hover {
    color: #dc2626;
}

.bh-file-error {
    color: var(--bh-accent-red);
    font-size: 13px;
    margin-top: 8px;
}

/* ========================================
   Submitting Modal
   ======================================== */
.bh-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bh-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.bh-modal-content {
    position: relative;
    background: #262a32;
    border: 1px solid #363a42;
    border-radius: 8px;
    padding: 40px 50px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.bh-modal-content h3 {
    color: #c8ccd0;
    margin: 20px 0 10px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.bh-modal-content p {
    color: #8a8e94;
    margin: 0 0 8px;
    font-size: 13px;
}

.bh-modal-content .bh-modal-hint {
    color: var(--bh-text-hint);
    font-size: 12px;
    margin-top: 15px;
}

.bh-modal-spinner {
    width: 40px;
    height: 40px;
    border: 2px solid #3a3d44;
    border-top-color: #7a8a9a;
    border-radius: 50%;
    margin: 0 auto;
    animation: bh-spin 1s linear infinite;
}

@keyframes bh-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .bh-support-form,
    .bh-reply-form {
        padding: 20px;
    }

    .bh-ticket-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .bh-message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .bh-suggestion-header {
        flex-direction: column;
        gap: 8px;
    }

    .bh-suggestion-actions {
        flex-direction: column;
    }
}
