/* ── Reset ───────────────────────────────────────────────────── */
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: #f9f9f9;
    font-family: "Segoe UI", sans-serif;
    font-size: 13px;
    color: #201f1e;
}

.sideload-msg {
    padding: 20px;
    color: #605e5c;
}

/* ── Add-in header with logo ─────────────────────────────────── */
.addin-header {
    display: flex;
    align-items: center;
    padding: 10px 0 4px;
    border-bottom: 1px solid #edebe9;
    margin-bottom: 4px;
}

.jira-logo {
    height: 28px;
    width: auto;
    display: block;
}

main {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Email summary card ──────────────────────────────────────── */
.email-card {
    background: #ffffff;
    border: 1px solid #edebe9;
    border-radius: 6px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.email-field {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.field-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #8a8886;
    font-weight: 600;
}

.field-value {
    font-size: 13px;
    color: #201f1e;
    word-break: break-word;
}

.preview-text {
    font-size: 12px;
    color: #3b3a39;
    max-height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    width: 100%;
    border: none;
    border-radius: 4px;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary {
    background: #0078d4;
    color: #fff;
}
.btn-primary:hover  { background: #106ebe; }
.btn-primary:disabled { background: #a5adba; cursor: not-allowed; }

.btn-jira {
    background: #0052cc;
    color: #fff;
    margin-top: 10px;
}
.btn-jira:hover   { background: #0065ff; }
.btn-jira:disabled { background: #a5adba; cursor: not-allowed; }

/* ── Spinner ─────────────────────────────────────────────────── */
.spinner-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #605e5c;
    font-size: 13px;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #c8c6c4;
    border-top-color: #0078d4;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result cards ────────────────────────────────────────────── */
.result-card {
    border-radius: 6px;
    padding: 12px 14px;
}

.result-heading {
    font-weight: 700;
    font-size: 13px;
    margin: 0 0 10px;
}

/* Reply */
.result-reply {
    background: #f0f9ff;
    border-left: 4px solid #0078d4;
}

.reply-body {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    color: #201f1e;
}

/* Ticket */
.result-ticket {
    background: #fff;
    border: 1px solid #edebe9;
}

.ticket-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
}

.ticket-body-pre {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    color: #3b3a39;
    background: #f3f2f1;
    border-radius: 4px;
    padding: 8px;
}

.ticket-created-banner {
    margin-top: 10px;
    padding: 8px 10px;
    background: #e3fcef;
    border-left: 4px solid #00875a;
    border-radius: 4px;
    font-size: 13px;
    color: #006644;
}

.ticket-created-banner a {
    color: #006644;
    font-weight: 600;
}

/* Error */
.result-error {
    background: #ffebe6;
    border-left: 4px solid #de350b;
    color: #bf2600;
    font-size: 13px;
}
