/* =========================================================
   CrankBite Auth UI (Login + Account)
   ========================================================= */

/* =======================
   Base helpers
======================= */
.cb-muted {
    opacity: 0.75;
}

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

/* =======================
   Layout wrappers
======================= */
.cb-login-wrapper {
    min-height: 70vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 18px;
}

.cb-account-wrapper {
    max-width: 100%;
    padding: 0;
}

/* =======================
   Account actions
======================= */
.cb-account-actions {
    margin: 12px 0 24px;
}

.cb-account-actions .cb-link {
    font-size: 14px;
    color: #2563eb;
    text-decoration: none;
}

.cb-account-actions .cb-link:hover {
    text-decoration: underline;
}

/* =======================
   Cards
======================= */
.cb-login-card,
.cb-account-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 18px 40px rgba(0,0,0,0.08);
}

.cb-login-card {
    max-width: 420px;
    width: 100%;
    padding: 32px;
}

.cb-account-card {
    max-width: 900px;
    margin: 40px auto;
    padding: 36px 40px;
}

/* =======================
   Headlines
======================= */
.cb-login-card h1,
.cb-account-card h1 {
    margin: 0 0 28px;
    font-size: 32px;
    line-height: 1.1;
}

/* =========================================================
   ACCOUNT FORM GRID
========================================================= */
#cb-profile-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
    row-gap: 18px;
}

.cb-span-2,
.cb-field.full {
    grid-column: 1 / -1;
}

/* =======================
   Fields
======================= */
.cb-field {
    margin: 0;
}

.cb-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(0,0,0,0.78);
}

.cb-field input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #d9d9de;
    background: #fff;
    font-size: 15px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cb-field input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.cb-field input:disabled {
    background: #f4f5f7;
    color: rgba(0,0,0,0.55);
}

/* =======================
   Divider
======================= */
.cb-divider,
hr {
    grid-column: 1 / -1;
    border: 0;
    border-top: 1px solid rgba(0,0,0,0.10);
    margin: 18px 0 22px;
}

/* =======================
   Buttons
======================= */
.cb-btn-primary,
.cb-btn-secondary,
.cb-btn-danger {
    grid-column: 1 / -1;
    height: 48px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}

.cb-btn-primary {
    background: #2563eb;
    color: #fff;
    margin-top: 10px;
}

.cb-btn-primary:hover {
    background: #1e4fd6;
}

.cb-btn-primary:active {
    transform: scale(0.99);
}

.cb-btn-secondary {
    background: #f8f9fb;
    color: #111;
    margin-top: 10px;
}

.cb-btn-secondary:hover {
    background: #eef0f4;
}

.cb-btn-danger {
    background: #d32f2f;
    color: #fff;
    margin-bottom: 16px;
}

.cb-btn-danger:hover {
    background: #b71c1c;
}

.cb-warning {
    margin-top: 8px;
    font-weight: 700;
    color: #dc2626;   /* danger rød */
}

.cb-btn-cancel {
    margin-top: 8px;
    font-weight: 700;
    color: #374151;   /* danger rød */
}

.cb-btn-cancel {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 48px;
  margin-top: 12px;
  border-radius: 12px;
  background: #f5f5f7;
  color: #111;
  font-weight: 700;
  text-decoration: none;
}

.cb-btn-cancel:hover {
  background: #ececef;
}

/* =======================
   Messages
======================= */
.cb-success,
.cb-error {
    grid-column: 1 / -1;
    margin-top: 12px;
    font-size: 14px;
}

.cb-success {
    color: #16a34a;
}

.cb-error {
    color: #dc2626;
}

/* =========================================================
   LOGIN-SPECIFIC OVERRIDES
========================================================= */
.cb-login-form {
    display: flex;
    flex-direction: column;
}

.cb-login-form .cb-field {
    margin-bottom: 18px;
}

.cb-login-form .cb-btn-primary {
    margin-top: 10px;
}

/* =======================
   Auth icon (menu)
======================= */
.cb-auth-icon {
    color: #000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.9;
}

.cb-auth-icon:hover {
    opacity: 1;
}

/* =========================================================
   TOP LINKS / BUTTONS
========================================================= */

.cb-account-actions {
    display: flex;
    gap: 16px;   /* Adjust distance here */
}


/* =========================================================
   DELETE ACCOUNT MODAL
========================================================= */
.cb-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.cb-modal.hidden {
    display: none;
}

.cb-modal-content {
    background: #fff;
    width: 100%;
    max-width: 420px;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.cb-modal-content h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 22px;
}

.cb-modal-content p {
    font-size: 14px;
    margin-bottom: 18px;
}

.cb-modal-content input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    margin-top: 6px;
    border-radius: 8px;
    border: 1px solid #d9d9de;
    font-size: 15px;
}

.cb-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.cb-modal-error {
    margin-top: 10px;
    min-height: 1em;
    font-size: 14px;
    color: #dc2626;
}

/* =========================================================
   CONNECTIONS PAGE
========================================================= */
.cb-connection {
    margin-top: 16px;
}

.cb-connection-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cb-status {
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
}

.cb-disconnected {
    background: #eee;
    color: #666;
}

.cb-connected {
    background: #e6f4ea;
    color: #2e7d32;
}

/* =======================
   Mobile
======================= */
@media (max-width: 720px) {

    .cb-account-card {
        padding: 28px;
    }

    #cb-profile-form {
        grid-template-columns: 1fr;
    }

    .cb-modal-content {
        margin: 0 16px;
    }
}


