/* ModułHandlowy Outlook Add-in — taskpane styles
   Minimalny CSS w stylu Fluent UI (kolory Microsoft), bez frameworka.
   Optymalizowane pod wąski panel boczny Outlooka (300–400px). */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; font-family: "Segoe UI", -apple-system, sans-serif; font-size: 13px; color: #323130; background: #faf9f8; }
body { padding: 12px; }

#app { max-width: 480px; }

.screen { display: block; }
.screen.hidden { display: none; }

h2 { font-size: 16px; margin: 0 0 8px; color: #201f1e; }
p { margin: 8px 0; }
.muted { color: #605e5c; font-size: 12px; }
.error { color: #a4262c; font-size: 12px; min-height: 16px; }
.success { color: #107c10; font-size: 12px; min-height: 16px; }

label { display: block; margin: 12px 0 4px; font-size: 12px; font-weight: 600; color: #323130; }
input[type="text"], input[type="password"], input[type="date"], textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #8a8886;
    border-radius: 2px;
    font: inherit;
    background: white;
}
input:focus, textarea:focus { outline: 2px solid #0078d4; outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; min-height: 60px; }

button { font: inherit; cursor: pointer; }
button.primary {
    background: #0078d4;
    color: white;
    border: 1px solid #0078d4;
    padding: 6px 14px;
    border-radius: 2px;
    margin-top: 10px;
}
button.primary:hover { background: #106ebe; }
button.primary:disabled { background: #c8c6c4; border-color: #c8c6c4; cursor: not-allowed; }

button.link {
    background: transparent;
    color: #0078d4;
    border: none;
    padding: 4px 6px;
    text-decoration: underline;
    font-size: 12px;
}
button.link:hover { color: #106ebe; }

header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; border-bottom: 1px solid #edebe9; margin-bottom: 8px; }
.badge { font-size: 11px; color: #605e5c; background: #f3f2f1; padding: 2px 8px; border-radius: 10px; }

.tabs { display: flex; gap: 2px; margin-bottom: 12px; border-bottom: 1px solid #edebe9; }
.tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 4px;
    font-size: 12px;
    color: #605e5c;
    border-bottom: 2px solid transparent;
}
.tab.active { color: #0078d4; border-bottom-color: #0078d4; font-weight: 600; }
.tab:hover { background: #f3f2f1; }

.tabpanel { display: none; }
.tabpanel.active { display: block; }

.output { margin-top: 12px; padding: 8px; background: white; border: 1px solid #edebe9; border-radius: 2px; }
.output.hidden { display: none; }

.reply-preview {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
    background: #f3f2f1;
    border-radius: 2px;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.5;
}
.reply-preview p { margin: 6px 0; }
.reply-preview ul, .reply-preview ol { margin: 6px 0; padding-left: 20px; }

.search-row { display: flex; gap: 6px; align-items: stretch; }
.search-row input { flex: 1; }
.search-row button { margin-top: 0; }

#searchResults { margin-top: 12px; }
.search-result {
    padding: 8px;
    background: white;
    border: 1px solid #edebe9;
    border-radius: 2px;
    margin-bottom: 6px;
    cursor: pointer;
}
.search-result:hover { background: #f3f2f1; border-color: #0078d4; }
.search-result .subj { font-weight: 600; color: #201f1e; font-size: 13px; }
.search-result .from { color: #605e5c; font-size: 11px; margin-top: 2px; }
.search-result .preview { color: #605e5c; font-size: 11px; margin-top: 4px; max-height: 32px; overflow: hidden; }
.search-result .date { color: #8a8886; font-size: 11px; float: right; }

.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid #c8c6c4; border-top-color: #0078d4; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: middle; margin-right: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
