/* ==========================================================================
   Portál brigádníků – přihlášení, registrace, profil
   ========================================================================== */

.ebk-portal {
    --ebk-accent: #c8a44d;
    --ebk-accent-dark: #b08f3d;
    --ebk-ink: #1f2a44;
    --ebk-muted: #6b7891;
    --ebk-border: #e3eaf4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ebk-ink);
    line-height: 1.5;
    box-sizing: border-box;
}
.ebk-portal *, .ebk-portal *::before, .ebk-portal *::after { box-sizing: inherit; }

/* ---------- Přihlašovací stránka ---------- */
.ebk-portal-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: linear-gradient(160deg, #f4f7fc 0%, #eef2fa 100%);
}

.ebk-portal-card {
    background: #fff;
    border: 1px solid var(--ebk-border);
    border-radius: 20px;
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 18px 50px rgba(31, 42, 68, 0.10);
}

.ebk-portal-logo {
    text-align: center;
    margin-bottom: 20px;
}
.ebk-portal-logo img {
    max-width: 180px;
    max-height: 90px;
    height: auto;
    width: auto;
}

.ebk-portal-title {
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    margin: 0 0 6px;
}
.ebk-portal-subtitle {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px;
}
.ebk-portal-intro {
    text-align: center;
    color: var(--ebk-muted);
    font-size: 14.5px;
    margin: 0 0 22px;
}

/* Záložky */
.ebk-portal-tabs {
    display: flex;
    background: #f1f4fa;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 22px;
}
.ebk-tab {
    flex: 1;
    border: none;
    background: none;
    padding: 10px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ebk-muted);
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.15s;
}
.ebk-tab.is-active {
    background: #fff;
    color: var(--ebk-accent);
    box-shadow: 0 2px 6px rgba(31, 42, 68, 0.08);
}

/* Skryté panely (záložky) – musí přebít display:flex na formuláři. */
.ebk-portal [hidden] { display: none !important; }

/* Formuláře */
.ebk-portal-form { display: flex; flex-direction: column; gap: 14px; }
.ebk-portal-form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13.5px;
    font-weight: 600;
    color: #44506b;
}
.ebk-portal-form input[type="text"],
.ebk-portal-form input[type="email"],
.ebk-portal-form input[type="password"],
.ebk-portal-form input[type="tel"],
.ebk-portal-form select,
.ebk-portal-form textarea {
    width: 100%;
    border: 1px solid #d3dae6;
    border-radius: 11px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ebk-ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ebk-portal-form input:focus,
.ebk-portal-form select:focus,
.ebk-portal-form textarea:focus {
    outline: none;
    border-color: var(--ebk-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.ebk-portal-row { display: flex; gap: 12px; }
.ebk-portal-row label { flex: 1; }

.ebk-portal-hint { font-weight: 400; font-size: 12.5px; color: var(--ebk-muted); }
.ebk-portal-remember {
    flex-direction: row !important;
    align-items: center;
    gap: 8px !important;
    font-weight: 500 !important;
}
.ebk-portal-remember input { width: 18px; height: 18px; accent-color: var(--ebk-accent); }

.ebk-portal-btn {
    background: var(--ebk-accent);
    color: #fff;
    border: none;
    border-radius: 11px;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    transition: background 0.15s;
}
.ebk-portal-btn:hover { background: var(--ebk-accent-dark); color: #fff; }
.ebk-portal-btn-sm { padding: 8px 14px; font-size: 13.5px; }
.ebk-portal-btn-ghost {
    background: #fff;
    color: var(--ebk-accent);
    border: 1px solid var(--ebk-border);
}
.ebk-portal-btn-ghost:hover { background: #f4f7fc; color: var(--ebk-accent-dark); }

.ebk-portal-link {
    background: none;
    border: none;
    color: var(--ebk-accent);
    font-size: 13.5px;
    cursor: pointer;
    text-align: center;
    padding: 4px;
}
.ebk-portal-link:hover { text-decoration: underline; }

.ebk-portal-msg { font-size: 13.5px; text-align: center; margin: 4px 0 0; min-height: 18px; }
.ebk-portal-msg.is-ok { color: #15803d; }
.ebk-portal-msg.is-error { color: #c81e1e; }

.ebk-portal-or {
    position: relative;
    text-align: center;
    margin: 20px 0 16px;
}
.ebk-portal-or::before {
    content: "";
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: var(--ebk-border);
}
.ebk-portal-or span {
    position: relative;
    background: #fff;
    padding: 0 12px;
    color: var(--ebk-muted);
    font-size: 13px;
}
.ebk-social-buttons { display: flex; flex-direction: column; gap: 10px; }

.ebk-portal-foot {
    margin: 22px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--ebk-muted);
}

/* ---------- Profil ---------- */
.ebk-portal-profile { max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; }

.ebk-portal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.ebk-portal-user { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; }
.ebk-portal-bar-actions { display: flex; gap: 8px; }

.ebk-portal-summary { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.ebk-sum-box {
    flex: 1;
    min-width: 140px;
    background: #fff;
    border: 1px solid var(--ebk-border);
    border-radius: 16px;
    padding: 18px;
    text-align: center;
}
.ebk-sum-num { display: block; font-size: 26px; font-weight: 800; color: var(--ebk-accent); }
.ebk-sum-label { font-size: 13px; color: var(--ebk-muted); }

.ebk-portal-block { max-width: none; margin-bottom: 20px; padding: 24px; }
.ebk-portal-block h2 { margin: 0 0 6px; font-size: 18px; }
.ebk-portal-gdpr {
    font-size: 12.5px;
    color: var(--ebk-muted);
    background: #f7f9fd;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0 0 16px;
}

.ebk-portal-checks { display: flex; flex-direction: column; gap: 10px; margin: 6px 0; }
.ebk-portal-check {
    flex-direction: row !important;
    align-items: center;
    gap: 9px !important;
    font-weight: 500 !important;
    font-size: 14.5px !important;
}
.ebk-portal-check input { width: 18px; height: 18px; accent-color: var(--ebk-accent); }

/* Historie */
.ebk-portal-history { display: flex; flex-direction: column; gap: 12px; }
.ebk-hist-item {
    border: 1px solid var(--ebk-border);
    border-radius: 14px;
    padding: 14px 16px;
}
.ebk-hist-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ebk-hist-meta { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0; font-size: 14px; color: #3b4a68; }
.ebk-objection-toggle { padding-left: 0; }
.ebk-objection-box { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.ebk-objection-box textarea { resize: vertical; }

.ebk-objection-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ebk-objection-list li {
    border: 1px solid var(--ebk-border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
}
.ebk-obj-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 10px;
    margin-right: 8px;
}
.ebk-obj-open { background: #fff4e5; color: #b45309; }
.ebk-obj-accepted { background: #e7f6ec; color: #15803d; }
.ebk-obj-rejected { background: #fdeaea; color: #c81e1e; }
.ebk-obj-reply { margin-top: 6px; font-size: 13px; color: var(--ebk-muted); }

.ebk-portal .ebk-muted { color: var(--ebk-muted); }

@media (max-width: 560px) {
    .ebk-portal-row { flex-direction: column; gap: 14px; }
    .ebk-portal-card { padding: 28px 22px; }
}

/* Sociální tlačítka */
.ebk-social-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 11px;
    font-weight: 700;
    font-size: 14.5px;
    border: 1px solid var(--ebk-border);
}
.ebk-social-google { background: #fff; color: #3c4043; border-color: #dadce0; }
.ebk-social-google:hover { background: #f7f8fa; color: #3c4043; }
.ebk-social-fb { background: #1877f2; color: #fff; border-color: #1877f2; }
.ebk-social-fb:hover { background: #166fe0; color: #fff; }

/* Nebezpečná zóna – smazání účtu */
.ebk-danger-zone { border-color: #f1c2c2; }
.ebk-portal-btn-danger { background: #dc2626; }
.ebk-portal-btn-danger:hover { background: #b91c1c; }

/* Fotka v profilu */
.ebk-portal-photo { display: flex; flex-direction: column; gap: 6px; }
.ebk-portal-photo-row { display: flex; align-items: center; gap: 14px; }
.ebk-portal-photo-row .ebk-avatar { width: 64px; height: 64px; flex: 0 0 auto; }

/* Hláška pro už registrované */
.ebk-portal-existing {
    background: #fff7e6;
    border: 1px solid #f3d89a;
    border-radius: 10px;
    padding: 11px 13px;
    font-size: 13px;
    color: #92600a;
    margin: 0;
}

/* Malé nenápadné smazání účtu */
.ebk-delete-small { max-width: 760px; margin: 6px auto 0; text-align: center; }
.ebk-delete-small summary {
    cursor: pointer;
    color: #9aa3b5;
    font-size: 12.5px;
    list-style: none;
}
.ebk-delete-small summary:hover { color: #6b7891; text-decoration: underline; }
.ebk-delete-small-body {
    margin: 10px auto 0;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}
.ebk-delete-small-body input {
    border: 1px solid #d3dae6;
    border-radius: 8px;
    padding: 8px 11px;
    width: 100%;
    font-family: inherit;
}
.ebk-delete-small-btn {
    background: none;
    border: none;
    color: #c0392b;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

/* Banner pro nekompletní profil */
.ebk-incomplete-banner {
    border-color: #f3d89a;
    background: #fff7e6;
    margin-bottom: 18px;
    max-width: none;
}
.ebk-incomplete-banner strong { font-size: 17px; }
.ebk-incomplete-banner p { margin: 6px 0 0; font-size: 14px; color: #7a5b12; }
.ebk-reg-as { font-size: 14px; color: #44506b; margin: -6px 0 14px; }

/* Skrytí chatbotů / plovoucích widgetů třetích stran na stránkách pluginu */
#tidio-chat, .tidio-chat, .tidio-chat-iframe,
.crisp-client,
#tawkchat-container, .tawk-min-container, .widget-visible,
.intercom-lightweight-app, #intercom-container, #intercom-frame,
#drift-widget, .drift-frame-controller, .drift-frame-chat,
#smartsupp-widget-container, .smartsupp-widget-container,
#launcher, #webWidget,
.fb_dialog, .fb-customerchat, .fb_customer_chat_bounce_in_v2,
.chat-widget, #chat-widget, .chatbot-widget, #chatbot,
[class*="chatbot"], [id*="chatbot"],
[class*="chat-bubble"], [id*="chat-bubble"],
[class*="ai-assistant"], [id*="ai-assistant"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Rozklikávací nápověda na veřejných stránkách */
.ebk-help-box {
    background: #faf6ec;
    border: 1px solid #ecdfc2;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 0 0 18px;
    text-align: left;
}
.ebk-help-box summary {
    cursor: pointer;
    font-weight: 700;
    color: #c8a44d;
    list-style: none;
}
.ebk-help-box summary::-webkit-details-marker { display: none; }
.ebk-help-box summary::before { content: "\25B8\00a0"; }
.ebk-help-box[open] summary::before { content: "\25BE\00a0"; }
.ebk-help-box-body { margin-top: 10px; }
.ebk-help-box-body p { margin: 8px 0; font-size: 14px; color: #3b4a68; line-height: 1.5; }
.ebk-help-tip { font-size: 13px !important; color: #7a5b12 !important; background: #fff7e6; border-radius: 8px; padding: 8px 10px; }
.ebk-help-calendar { max-width: 760px; margin: 0 auto 18px; }

.ebk-help-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px; height: 17px;
    border-radius: 50%;
    background: #9aa7bd;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: help;
    vertical-align: middle;
}

/* Odhlášení z akce v profilu */
.ebk-unregister-btn { color: #c0392b !important; }
.ebk-hist-cancelled {
    display: inline-block; background: #fdeaea; color: #c0392b;
    font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
}
