/* ==========================================================
   Cognition Answer — blue / black / white theme
   Change the CSS variables below to retheme everything at once.
   ========================================================== */
.cog-answer-wrap {
    --cog-blue: #002b7a;
    --cog-blue-dark: #002b7a;
    --cog-blue-light: #002b7a;
    --cog-black: #14161a;
    --cog-white: #ffffff;
    --cog-gray: #6b7280;
    --cog-gray-light: #9aa3af;
    --cog-border: #e2e6ec;
    --cog-bg: #f6f8fb;
    --cog-error: #c0392b;

    /*font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;*/
    /*max-width: 780px;*/
    /*margin: 48px auto;*/
    /*color: var(--cog-black);*/
    /*position: relative;*/
    /*padding: 2px;*/
    /*border-radius: 22px;*/
    /*background: linear-gradient(135deg, rgba(11, 61, 145, 0.18), rgba(47, 111, 237, 0.06) 40%, rgba(11, 61, 145, 0.14));*/
}

/*.cog-answer-card {*/
/*    background: var(--cog-white);*/
/*    border-radius: 20px;*/
/*    padding: 44px 48px;*/
/*    text-align: center;*/
/*    box-shadow: 0 12px 40px rgba(11, 61, 145, 0.10), 0 2px 8px rgba(11, 61, 145, 0.06);*/
/*}*/

.cog-answer-title {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cog-blue);
    margin: 0 0 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cog-answer-title img {
    height: 70px;
    object-fit: contain;
}
.cog-question-input {
    display: block;
    width: 100%;
    background: var(--cog-bg);
    border: 1.5px solid var(--cog-border);
    border-radius: 22px;
    padding: 17px 24px;
    font-size: 17px;
    font-family: inherit;
    color: var(--cog-black);
    text-align: left;
    resize: none;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 20px;
    box-sizing: border-box;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.cog-question-input::placeholder {
    color: var(--cog-gray-light);
}
.cog-question-input:hover {
    border-color: var(--cog-blue-light);
    background: var(--cog-white);
}
/* Logged-in state: becomes a real, typable field */
.cog-question-input.is-active {
    background: var(--cog-white);
    border: 2px solid var(--cog-blue);
    cursor: text;
    min-height: 96px;
    resize: vertical;
    box-shadow: 0 0 0 4px rgba(11, 61, 145, 0.07);
}
.cog-question-input.is-active:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(11, 61, 145, 0.12);
}

.cog-example-questions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

.cog-example-question {
    background: var(--cog-white);
    border: 1.5px solid var(--cog-border);
    border-radius: 999px;
    padding: 14px 22px;
    font-size: 15px;
    text-align: left;
    color: var(--cog-black);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}
.cog-example-question:hover {
    border-color: var(--cog-blue-light);
    background: var(--cog-bg);
    transform: translateY(-1px);
    color: black;
}

.cog-answer-subtext {
    color: var(--cog-gray);
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 26px;
    max-width: 900px;
}
.cog-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 999px;
    padding: 20px 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.1s ease, opacity 0.15s ease;
}
.cog-btn:active {
    transform: scale(0.98);
}

.cog-btn-primary {
    background: linear-gradient(135deg, var(--cog-blue-light), var(--cog-blue));
    color: var(--cog-white);
    /box-shadow: 0 6px 16px rgba(11, 61, 145, 0.22);/
}
.cog-btn-primary:hover {
    background: linear-gradient(135deg, var(--cog-blue), var(--cog-blue-dark));
    /box-shadow: 0 8px 20px rgba(11, 61, 145, 0.28);/
}
.cog-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

/* Small inline loading spinner shown on a button while an AJAX
   request is in flight — text is hidden (not removed) so the button
   keeps its width, and a spinner fades in centered on top. */
.cog-btn.is-loading {
    color: transparent !important;
    pointer-events: none;
    position: relative;
}
.cog-btn.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2.5px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: cog-spin 0.7s linear infinite;
}
.cog-btn-secondary.is-loading::after {
    border: 2.5px solid rgba(11, 61, 145, 0.25);
    border-top-color: var(--cog-blue);
}
@keyframes cog-spin {
    to { transform: rotate(360deg); }
}

.cog-btn-block {
    display: block;
    width: 100%;
}

.cog-btn-secondary {
    background: var(--cog-white);
    border: 1.5px solid var(--cog-blue);
    color: var(--cog-blue);
    text-decoration: none;
}
.cog-btn-secondary:hover {
    background: var(--cog-bg);
}

.cog-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.is-hidden {
    display: none !important;
}

.cog-thankyou {
    display: none;
    margin-top: 16px;
    padding: 15px 20px;
    background: #eaf6ea;
    border: 1px solid #b7ddb7;
    color: #256029;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
}
.cog-thankyou.is-visible {
    display: block;
    animation: cog-fade-in 0.25s ease;
}

@keyframes cog-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================== MODAL ===================== */
.cog-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(14, 16, 22, 0.6);
    backdrop-filter: blur(2px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.cog-modal-overlay.is-open {
    display: flex;
    animation: cog-fade-in 0.18s ease;
}

.cog-modal {
    position: relative;
    background: var(--cog-white);
    border-radius: 20px;
    max-width: 430px;
    width: 100%;
    padding: 38px 34px;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    box-shadow: 0 24px 60px rgba(11, 61, 145, 0.25);
}

.cog-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: var(--cog-gray-light);
    transition: color 0.15s ease;
    padding: 0px;
    background: transparent !important;
}
.cog-modal-close:hover {
    color: var(--cog-black);
}

.cog-modal-title {
    font-size: 21px;
    font-weight: 700;
    margin: 0 0 24px;
    color: var(--cog-black);
    text-align: center;
}

.cog-field {
    margin-bottom: 17px;
}
.cog-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--cog-black);
    line-height: 1;
}
.cog-field input[type="text"],
.cog-field input[type="email"],
.cog-field input[type="password"] {
    width: 100%;
    border: 1.5px solid var(--cog-border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cog-field input:focus {
    outline: none;
    border-color: var(--cog-blue-light);
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.cog-password-wrap {
    position: relative;
}
.cog-password-wrap input {
    padding-right: 44px !important;
}
/* Scoped + !important throughout: WordPress themes commonly apply a
   global "button { ... }" style (full width, solid background, etc.)
   that would otherwise override this small icon-only toggle button. */
.cog-answer-wrap .cog-eye-toggle {
    all: unset !important;
    position: absolute !important;
    top: 50% !important;
    right: 10px !important;
    transform: translateY(-50%) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    color: var(--cog-gray) !important;
    opacity: 0.7 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 6px !important;
    transition: opacity 0.15s ease, color 0.15s ease !important;
}
.cog-answer-wrap .cog-eye-toggle:hover {
    opacity: 1 !important;
}
.cog-answer-wrap .cog-eye-toggle.is-showing {
    opacity: 1 !important;
    color: var(--cog-blue) !important;
}
.cog-eye-icon {
    pointer-events: none;
    display: block;
}
.cog-answer-wrap .cog-eye-toggle.is-showing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 2px;
    background: currentColor;
    transform: translate(-50%, -50%) rotate(-45deg);
}

.cog-selected-question {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(11, 61, 145, 0.06);
    border: 1.5px solid var(--cog-blue-light);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
    text-align: left;
    font-size: 14px;
}
.cog-selected-label {
    font-weight: 700;
    color: var(--cog-blue);
    white-space: nowrap;
}
.cog-selected-text {
    flex: 1;
    color: var(--cog-black);
}
.cog-selected-remove {
    background: none;
    border: none;
    color: var(--cog-gray);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
}
.cog-selected-remove:hover {
    color: var(--cog-error);
}

.cog-example-question.is-selected {
    border-color: var(--cog-blue);
    background: rgba(11, 61, 145, 0.08);
    font-weight: 600;
    color: var(--cog-black);
}

.cog-field-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    font-size: 13px;
    color: var(--cog-gray);
    margin: 0px;
    line-height: 1;
}
.cog-field-checkbox input {
    margin-top: 2px;
}

.cog-hint {
    display: block;
    color: var(--cog-gray);
    font-size: 12px;
    margin-top: 6px;
}

.cog-form-error {
    display: none;
    background: #fdecea;
    border: 1px solid #f5c2bb;
    color: var(--cog-error);
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
}
.cog-form-error.is-visible {
    display: block;
    animation: cog-fade-in 0.2s ease;
}

.cog-modal-switch,
.cog-modal-links {
    text-align: center;
    font-size: 13px;
    color: var(--cog-gray);
    margin-top: 18px;
}
.cog-modal-switch a,
.cog-modal-links a,
.cog-otp-subtext {
    color: var(--cog-blue);
    text-decoration: none;
    font-weight: 600;
}
.cog-modal-switch a:hover,
.cog-modal-links a:hover {
    text-decoration: underline;
}

.cog-otp-subtext {
    text-align: center;
    display: block;
    color: var(--cog-gray);
    font-weight: 400;
    font-size: 13px;
    margin: -10px 0 22px;
}
a#cogLogoutBtn {
    position: absolute;
    top: -25%;
    right: 0;
    line-height: 1;
    padding: 14px 30px;
}
small.cog-hint ul {
    margin: 0px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-top: 5px;
}
small.cog-hint ul li {
    line-height: 1.3;
}
@media (max-width: 600px) {
    /*.cog-answer-card {*/
    /*    padding: 28px 24px;*/
    /*}*/
    .cog-modal {
        padding: 30px 22px;
    }
}