
/* ----------------------------------------------------
   OVERLAY
---------------------------------------------------- */
.cip-modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.55);
    z-index: 99999;
}

.cip-modal-overlay.is-active {
    display: flex;
}

/* ----------------------------------------------------
   BASE MODAL STYLING
---------------------------------------------------- */
.cip-modal {
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);

    /* Default is medium */
    width: 550px;
    max-width: 95%;
    max-height: 90vh;
}

/* ====================================================
   MODAL ALERTS (BASE) — scoped + hard hidden by default
==================================================== */
.cip-modal-header .modal-alert {
  display: none !important;
  box-sizing: border-box;
  max-width: 400px;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 10px;
  align-items: center;
  gap: 10px;

  border-radius: 10px;
  padding: 14px 18px;

  font-size: 0.95rem;
  line-height: 1.35;
}

.cip-modal-header .modal-alert.is-active {
  display: flex !important;
  animation: modalAlertIn 0.2s ease-out;
}

.cip-modal-header .modal-alert::before {
  font-size: 1.15rem;
}

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



/* ====================================================
   MODAL ERROR
==================================================== */
.modal-error {
  background: #ffeaea;
  border: 1px solid #ffb6b6;
  color: #c62828;
}

.modal-error::before {content: "";}
.modal-error.is-active::before {content: "⚠️";}

/* ====================================================
   MODAL SUCCESS
==================================================== */
.modal-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #2e7d32;
}

.modal-success::before { content: ""; }
.modal-success.is-active::before { content: "✅"; }

/* ====================================================
   MODAL WARNING
==================================================== */
.modal-warning {
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #8d6e63;
}

.modal-warning::before { content: ""; }
.modal-warning.is-active::before { content: "⚠️"; }


/* ----------------------------------------------------
   SIZE VARIANTS
---------------------------------------------------- */

/* Small — dialogs, confirmation messages */
.cip-modal.modal-sm {
    width: 460px;
    max-width: 100%;
}

/* Medium — default (normal modals) */
.cip-modal.modal-md {
    width: 550px;
    max-width: 100%;
}

/* Large — settings screens, long forms, QR views */
.cip-modal.modal-lg {
    width: 800px;
    max-width: 100%;
}

/* Full — near-fullscreen workspace modal */
.cip-modal.modal-full {
    width: 95vw;
    height: 95vh;
    max-width: none;
    max-height: none;
}

/* Full-screen modal interior layout */
.cip-modal.modal-full .cip-modal-body {
    flex: 1;
    overflow-y: auto;
}

/* ----------------------------------------------------
   HEADER
---------------------------------------------------- */
.cip-modal-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 20px 14px;
  gap: 12px;
  background: linear-gradient(
    180deg,
    rgba(42,108,244,0.06),
    rgba(42,108,244,0.02)
  );
  border-bottom: 1px solid rgba(42,108,244,0.12);
}

.cip-modal-x {
  position: absolute;
  top: 12px;
  right: 12px;

  border: 0;
  background: transparent;
  cursor: pointer;

  font-size: 24px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 8px;
}

.cip-modal-x:hover {
  background: rgba(0,0,0,0.06);
}

.cip-modal-header h2 {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  margin: 0;
  line-height: 1.3;
  color: #0f172a;
}

.cip-modal-close-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.cip-modal-close-btn:hover {
    color: #1f4fb3;
}

/* ----------------------------------------------------
   BODY
---------------------------------------------------- */
.cip-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* ----------------------------------------------------
   FOOTER
---------------------------------------------------- */
.cip-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #e5e5e5;
    background: #fafafa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ----------------------------------------------------
   BUTTONS
---------------------------------------------------- */
.cip-modal-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.cip-modal-btn-close {
    background: #ccc;
}

.cip-modal-btn-close:hover {
    background: #b5b5b5;
}

.cip-modal-btn-primary {
    background: #2a6cf4;
    color: #fff;
}

.cip-modal-btn-primary:hover {
    background: #1f4fb3;
}

.cip-modal-btn-danger {
    background: #d9534f;
    color: #fff;
}

.cip-modal-btn-danger:hover {
    background: #c9302c;
}
/* ====================================================
   MODAL FOOTER LAYOUT
==================================================== */

.cip-modal-footer {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Default: close + action buttons */
.cip-modal-footer #cip-modal-buttons {
    display: flex;
    gap: 10px;
}

/* ====================================================
   FULL-WIDTH ACTION MODE (NO CLOSE BUTTON)
==================================================== */

.cip-modal.modal-no-close .cip-modal-footer {
    justify-content: center;
}

.cip-modal.modal-no-close #cip-modal-buttons {
    width: 100%;
}

.cip-modal.modal-no-close .cip-modal-btn {
    width: 100%;
    font-size: 15px;
    padding: 12px 16px;
}
/* ====================================================
   LOCKED MODAL STATE (LOGIN IN PROGRESS)
==================================================== */

.cip-modal.modal-locked {
    animation: modalFadeIn 0.25s ease;
}

.cip-modal.modal-locked .cip-modal-close-btn {
    display: none !important;
}
.modal-logo-login {
  width: 185px;
  height: auto;
  display: block;
}
.modal-logo {
  height: 30px;
  width: auto;
  display: block;
  opacity: 0.85;
}

/* ----------------------------------------------------
   MOBILE BEHAVIOR
---------------------------------------------------- */
@media (max-width: 600px) {

    .cip-modal-overlay {
        align-items: stretch;
        justify-content: stretch;
    }

    .cip-modal {
        width: 100%;
        height: 100dvh;
        max-width: none;     /* 🔥 THIS IS THE KEY */
        max-height: none;
        border-radius: 0;
        box-shadow: none;    /* optional, but recommended */
    }
}


/* ----------------------------------------------------
   OTHER MODAL CSS
---------------------------------------------------- */


.code-note {
    margin: 12px 0 10px;
    font-size: 0.92rem;
    color: #5f6b81;
}


.resend-container {
    margin: 6px 0 16px;
    font-size: 0.92rem;
    color: #6d7a92;
}

.resend-link {
    background: none;
    border: none;
    color: #2a6cf4;
    font-weight: 600;
    margin-left: 4px;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s ease;
}

.resend-link:hover {
    color: #1f4fb3;
    text-decoration: underline;
}
.resend-status {
  background: #1e2531;
  color: #fff;
  padding: 8px;
  border-radius: 8px;
}

.verify-wrapper {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.verify-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #1f4fb3;
}

.code-inputs {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.code-box {
    width: 50px;
    height: 55px;
    font-size: 28px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: 0.2s;
}

.code-box:focus {
    border-color: #1f4fb3;
    box-shadow: 0 0 4px rgba(31, 79, 179, 0.4);
}
.code-box-error {
    border: 2px solid #d9534f !important; /* red */
    box-shadow: 0 0 4px rgba(217, 83, 79, 0.6);
}

.verify-btn {
    width: 100%;
    padding: 12px;
    background: #1f4fb3;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

.verify-btn:hover {
    background: #2a6cf4;
}

/* ------------ VERIFY TYPE ------------ */


.verify-method-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1f4fb3;
    margin-bottom: 10px;
}

.verify-method-subtext {
    font-size: 0.95rem;
    color: #5f6b81;
    margin-bottom: 25px;
    line-height: 1.5;
}

.verify-method-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.verification-message {
    margin-top: 8px;
    font-size: 0.9rem;
    text-align:center;
}

.verification-message.error {
    color: #d9534f;
}

.verification-message.warning {
    color: #e6a100;
}

.verification-message.success {
    color: #2a6cf4;
}

.shake {
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0% { transform: translateX(0px); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0px); }
}


/* Buttons */

.method-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 15px 18px;
    background: #f5f7ff;
    border: 1px solid #dce6ff;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
}

.method-btn:hover {
    background: #e9f0ff;
    border-color: #c4d7ff;
    transform: translateY(-2px);
}

.method-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.method-icon {
    font-size: 1.8rem;
}

.method-text {
    display: flex;
    flex-direction: column;
}

.method-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a1a;
}

.method-desc {
    font-size: 0.85rem;
    color: #5f6b81;
}

/* Mobile Optimization */
@media (max-width: 480px) {
    .verify-method-wrapper {
        padding: 25px 20px;
    }
}
.start-over-btn {
    width: 100%;
    padding: 10px 14px;
    margin-top: 18px;
    background: #f7f9ff;
    border: 1px solid #e0e7ff;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #3b4a6b;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.start-over-btn:hover {
    background: #eef2ff;
    border-color: #c9d4ff;
}
.method-btn.google-btn .google-icon {
  width: 35px;
  height: 25px;
}
.verify-email-indicator {
    text-align: center;
    font-size: 14px;
    color: #5f6b81;
    margin-bottom: 12px;
}
.verify-email-indicator strong {
    color: #1f4fb3;
}

.verify-method-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1f4fb3;
    margin-bottom: 10px;
}

.verify-method-subtext {
    font-size: 1.05rem;
    color: #5f6b81;
    margin-bottom: 25px;
    line-height: 1.5;
}

.verify-method-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Buttons */

.method-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 15px 18px;
    background: #f5f7ff;
    border: 1px solid #dce6ff;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
}

.method-btn:hover {
    background: #e9f0ff;
    border-color: #c4d7ff;
    transform: translateY(-2px);
}

.method-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.method-icon {
    font-size: 1.8rem;
}

.method-text {
    display: flex;
    flex-direction: column;
}

.method-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a1a;
}

.method-desc {
    font-size: 0.85rem;
    color: #5f6b81;
}
.verify-contain {
  max-width:350px;
  margin-right: auto;
  margin-left: auto;
}

/* Mobile Optimization */
@media (max-width: 480px) {
    .verify-method-wrapper {
        padding: 25px 20px;
    }
}
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading-spinner {
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    animation: spin 0.6s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}
/* Authenticator status text */
.auth-status {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
}

.enabled-text {
    color: #1f9d47; /* green */
}

.disabled-text {
    color: #b00020; /* red */
}

.auth-qr-actions {
    margin: 12px 0 0 4px;
}

#view-auth-qr-btn {
    background: #1f4fb3;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

#view-auth-qr-btn:hover {
    background: #2a6cf4;
}

.qr-warning {
    display: block;
    margin-top: 6px;
    color: #666;
    font-size: 12px;
}


.verify-circle {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f4fb3, #2a6cf4);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1px;
    position: relative;
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.18),
        inset 0 0 12px rgba(255, 255, 255, 0.15);
    animation: fadeInZoom 0.4s ease-out;
}

.verify-circle.glow::before {
    content: "";
    position: absolute;
    width: 58px;
    height: 58px;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 50%;
    z-index: 1;
    filter: blur(3px);
}

.verify-circle img {
    width: 42px;
    height: 42px;
    position: relative;
    z-index: 2;
}

.verify-circle-auth {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f4fb3, #2a6cf4);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1px;
    position: relative;
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.18),
        inset 0 0 12px rgba(255, 255, 255, 0.15);
    animation: fadeInZoom 0.4s ease-out;
}

.verify-circle-auth.glow::before {
    content: "";
    position: absolute;
    width: 58px;
    height: 58px;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 50%;
    z-index: 1;
    filter: blur(3px);
}

.verify-circle-auth img {
    width: 36px;
    height: 42px;
    position: relative;
    z-index: 2;
}


@keyframes fadeInZoom {
    0% { transform: scale(0.75); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.ccs-countdown{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(31,79,179,0.12);
  background: linear-gradient(180deg, rgba(42,108,244,0.10), rgba(31,79,179,0.06));
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
  user-select: none;
}

.ccs-countdown-label{
  font-weight: 600;
  color: #1f4fb3;
  letter-spacing: 0.2px;
}

.ccs-countdown-time{
  min-width: 92px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1.05rem;
  color: #0f2f74;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(15,47,116,0.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}

.ccs-countdown.is-ticking .ccs-countdown-time{
  animation: ccsPulse 1s ease-in-out infinite;
}

@keyframes ccsPulse{
  0%   { transform: translateY(0);    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35); }
  50%  { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(42,108,244,0.18); }
  100% { transform: translateY(0);    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35); }
}
.session-expired {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    background: #fff8e1;
    border: 1px solid #ffe0a3;
    border-radius: 10px;
    padding: 16px 18px;
}

.session-expired-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.session-expired-text p {
    margin: 0 0 6px;
    font-size: 0.95rem;
    color: #6b5200;
}

.session-expired-text p:last-child {
    margin-bottom: 0;
}
.btn-disabled,
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
a:not([href]) {
    cursor: pointer;
}
/* ==========================================
   CONTACT FORM — HIGHER CONTRAST / LESS WHITE
========================================== */

.ccs-contact-form{
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-top:12px;
}

/* Field group */
.ccs-contact-form .form-group{
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* Labels: stronger + clearer */
.ccs-contact-form label{
  font-size:0.9rem;
  font-weight:700;
  color:#1f2a44;          /* darker */
  letter-spacing:0.2px;
}

/* Inputs: not-white background + stronger border */
.ccs-contact-form input,
.ccs-contact-form textarea{
  width:100%;
  padding:14px 14px;
  font-size:0.98rem;
  border-radius:12px;

  border:1px solid #cfd8ea;     /* clearer border */
  background:#eef3fb;           /* darker surface */
  color:#0f172a;                /* strong text */

  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

/* Placeholder: readable but not competing */
.ccs-contact-form input::placeholder,
.ccs-contact-form textarea::placeholder{
  color:#6b7a99;
}

/* Focus: stronger blue ring + slightly brighter background */
.ccs-contact-form input:focus,
.ccs-contact-form textarea:focus{
  outline:none;
  background:#f7faff;
  border-color:#2a6cf4;
  box-shadow:0 0 0 3px rgba(42,108,244,0.22);
}

/* Textarea */
.ccs-contact-form textarea{
  resize:vertical;
  min-height:150px;
  line-height:1.45;
}

/* Actions */
.ccs-contact-form .form-actions{
  margin-top:6px;
}

/* Button polish (keeps your existing btn-primary look) */
.ccs-contact-form .btn-primary{
  width:100%;
  height:48px;
  border-radius:12px;
  font-size:1rem;
  font-weight:700;
}
.ccs-contact-panel{
  background:#f2f6ff;
  border:1px solid #d7e2ff;
  border-radius:14px;
  padding:14px;
}
.contact-nav {
    margin-bottom: 12px;
    text-align: left;
}

.contact-nav .btn-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    color: #256bff;
    cursor: pointer;
}

.contact-nav .btn-link:hover {
    text-decoration: underline;
}
/* Field error state — HIGH VISIBILITY */
.field-error {
  border-color: #d32f2f !important;
  background-color: #fff2f2 !important;

  /* Strong outer ring (doesn't fight existing borders) */
  box-shadow:
    0 0 0 2px rgba(211, 47, 47, 0.35),
    0 0 0 4px rgba(211, 47, 47, 0.15);

  transition:
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

/* While focused but still errored (before user edits) */
.field-error:focus {
  border-color: #c62828 !important;
  background-color: #ffffff !important;

  box-shadow:
    0 0 0 2px rgba(198, 40, 40, 0.45),
    0 0 0 5px rgba(198, 40, 40, 0.2);
}


/* Optional: shake animation for errors */
@keyframes field-shake {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-3px); }
  50%  { transform: translateX(3px); }
  75%  { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

.field-error.shake {
  animation: field-shake 0.3s ease;
}
.cip-qr-section .code-inputs {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 15px;
}

.cip-qr-section .code-box {
    flex: 0 0 auto !important;  /* prevents auto-stretching */
    width: 50px !important;
}

.cip-qr-label {
    margin: 10px 0 6px;
    font-weight: 500;
    text-align: center;
}

/* QR Image */
.cip-qr-image-wrapper {
    text-align: center;
    margin: 15px 0;
}

.cip-qr-image {
    width: 180px;
    height: 180px;
    border-radius: 10px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.12);
    margin-left: auto;
    margin-right: auto;
}

.cip-qr-secret {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 10px 14px;
    background: #f4f8ff;
    border: 1px solid #dbe6ff;
    border-radius: 8px;
    margin: 8px 0 14px;
    user-select: all;

    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
    display: block;
}
@media (max-width: 480px) {
    .cip-qr-secret {
        font-size: 14px;
        letter-spacing: 1px;   /* Slightly tighter spacing improves fit */
        padding: 8px 10px;
    }
}
.security-setup {
    max-width: 520px;
    margin: auto;
}

.security-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 12px;
    margin-bottom: 16px;
}

.recovery-phrase-box {
    font-family: monospace;
    font-size: 1.1rem;
    padding: 16px;
    border: 2px dashed #c00;
    background: #fafafa;
    margin-bottom: 16px;
    user-select: none;
}

.security-rules {
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.acknowledge {
    display: block;
    margin-bottom: 16px;
}

.security-actions {
    text-align: right;
}


