/* ═══════════════════════════════════════════════════════════════
   KD Tech Experts — Website Audit Tool  |  Frontend Styles
═══════════════════════════════════════════════════════════════ */

/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ─────────────────────────────────────────────
   TRIGGER BUTTON
───────────────────────────────────────────── */

.kdtech-trigger-wrap {
    display: inline-block;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.kdtech-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1d555b 0%, #2a7a82 100%);
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 28px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    letter-spacing: .2px;
    box-shadow: 0 6px 22px rgba(29, 85, 91, 0.38);
    transition: transform .18s ease, box-shadow .18s ease, background .2s;
    line-height: 1;
    white-space: nowrap;
}

.kdtech-trigger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(29, 85, 91, 0.48);
    background: linear-gradient(135deg, #155060 0%, #1d555b 100%);
    color: #ffffff;
}

.kdtech-trigger-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 12px rgba(29, 85, 91, 0.30);
}

.kdtech-trigger-btn svg {
    flex-shrink: 0;
    opacity: .9;
}

/* Paid variant */
.kdtech-trigger-btn--paid {
    background: linear-gradient(135deg, #0f172a 0%, #1d555b 100%);
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.38);
}
.kdtech-trigger-btn--paid:hover {
    background: linear-gradient(135deg, #0a0f1e 0%, #155060 100%);
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.46);
}

/* ─────────────────────────────────────────────
   MODAL OVERLAY  (fixed, centred, z-top)
───────────────────────────────────────────── */

.kdtech-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 15, 28, 0.70);
    z-index: 999999;
    display: none;               /* toggled to flex by JS */
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─────────────────────────────────────────────
   MODAL CARD
───────────────────────────────────────────── */

.kdtech-modal {
    background: #ffffff;
    border-radius: 18px;
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.30), 0 0 0 1px rgba(255,255,255,.06);
    animation: kdtech-pop .22s cubic-bezier(.34, 1.56, .64, 1);
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

.kdtech-modal::-webkit-scrollbar       { width: 5px; }
.kdtech-modal::-webkit-scrollbar-track { background: transparent; }
.kdtech-modal::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }

@keyframes kdtech-pop {
    from { transform: scale(.88) translateY(24px); opacity: 0; }
    to   { transform: scale(1)   translateY(0);    opacity: 1; }
}

/* ─────────────────────────────────────────────
   MODAL HEADER
───────────────────────────────────────────── */

.kdtech-modal-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: linear-gradient(135deg, #1d555b 0%, #0f172a 100%);
    border-radius: 18px 18px 0 0;
    position: sticky;
    top: 0;
    z-index: 2;
}

.kdtech-modal-hdr--paid {
    background: linear-gradient(135deg, #0f172a 0%, #1d555b 100%);
}

.kdtech-modal-hdr-text {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.1px;
}

.kdtech-modal-hdr-text svg { color: #7dd3d8; flex-shrink: 0; }

.kdtech-modal-x {
    background: rgba(255,255,255,.1);
    border: none;
    color: #94a3b8;
    font-size: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}
.kdtech-modal-x:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ─────────────────────────────────────────────
   MODAL BODY
───────────────────────────────────────────── */

.kdtech-modal-body {
    padding: 24px 24px 26px;
}

.kdtech-modal-sub {
    font-size: 14px;
    color: #64748b;
    line-height: 1.65;
    margin: 0 0 20px;
}

/* ─────────────────────────────────────────────
   URL PILL (step 2 top preview)
───────────────────────────────────────────── */

.kdtech-url-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 50px;
    padding: 8px 14px;
    font-size: 12px;
    color: #166534;
    margin-bottom: 16px;
    overflow: hidden;
}

.kdtech-url-pill svg { flex-shrink: 0; color: #16a34a; }

.kdtech-url-display {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    font-size: 12px;
}

.kdtech-pill-change {
    background: none;
    border: none;
    color: #1d555b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    text-decoration: underline;
    font-family: inherit;
}
.kdtech-pill-change:hover { color: #155060; }

/* ─────────────────────────────────────────────
   FORM GRID
───────────────────────────────────────────── */

.kdtech-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

/* ─────────────────────────────────────────────
   FIELDS
───────────────────────────────────────────── */

.kdtech-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 0;
}

.kdtech-field--full { grid-column: 1 / -1; }

.kdtech-field label {
    font-size: 11px !important;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .065em;
    display: block;
}

.kdtech-field label .req  { color: #ef4444; }

.kdtech-field input {
    padding: 10px 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 14px;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color .15s, box-shadow .15s, background .15s;
    outline: none;
    box-sizing: border-box;
    width: 100%;
    font-family: inherit;
}

.kdtech-field input::placeholder { color: #94a3b8; font-size: 13px; }

.kdtech-field input:focus {
    border-color: #1d555b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(29, 85, 91, .13);
}

.kdtech-field-err {
    font-size: 11px;
    color: #dc2626;
    font-weight: 600;
    min-height: 14px;
    line-height: 1.4;
}

.kdtech-optional {
    font-size: 10px;
    font-weight: 400;
    color: #94a3b8;
    text-transform: none;
    letter-spacing: 0;
}

/* ─────────────────────────────────────────────
   SUBMIT / ACTION BUTTONS
───────────────────────────────────────────── */

.kdtech-submit-btn {
    width: 100%;
    padding: 13px 20px;
    margin-top: 14px;
    background: linear-gradient(135deg, #1d555b 0%, #2a7a82 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: background .2s, transform .12s, box-shadow .2s;
    box-shadow: 0 4px 16px rgba(29, 85, 91, .28);
    font-family: inherit;
    letter-spacing: .1px;
    line-height: 1;
}

.kdtech-submit-btn:hover {
    background: linear-gradient(135deg, #155060 0%, #1d555b 100%);
    box-shadow: 0 6px 22px rgba(29, 85, 91, .38);
    transform: translateY(-1px);
    color: #fff;
}

.kdtech-submit-btn:active  { transform: scale(.98); }

.kdtech-submit-btn:disabled {
    background: #94c5c8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: .8;
}

/* Step-1 analyze button — slightly smaller top margin */
.kdtech-analyze-btn { margin-top: 16px; }

.btn-text, .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ─────────────────────────────────────────────
   SPINNER
───────────────────────────────────────────── */

.kdtech-spinner {
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: kdtech-spin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes kdtech-spin { to { transform: rotate(360deg); } }

/* ─────────────────────────────────────────────
   ERROR / SUCCESS INLINE
───────────────────────────────────────────── */

.kdtech-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* ─────────────────────────────────────────────
   SUCCESS STEP (step 3)
───────────────────────────────────────────── */

.kdtech-success-body {
    text-align: center;
    padding: 36px 24px 32px;
}

.kdtech-success-icon {
    font-size: 50px;
    line-height: 1;
    margin-bottom: 14px;
}

.kdtech-success-title {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 10px;
    letter-spacing: -.2px;
}

.kdtech-success-msg {
    font-size: 15px;
    color: #334155;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.5;
}

/* ─────────────────────────────────────────────
   CHECKLIST PREVIEW BLOCK
───────────────────────────────────────────── */

.kdtech-checklist-preview {
    background: #f8fafc;
    border: 1.5px dashed #a8d5d8;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 14px 0 0;
}

.kdtech-checklist-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 8px;
}

.kdtech-checklist-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.kdtech-checklist-icon  { font-size: 22px; flex-shrink: 0; }

.kdtech-checklist-text  { flex: 1; min-width: 0; }

.kdtech-checklist-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.kdtech-checklist-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.kdtech-checklist-lock {
    flex-shrink: 0;
    color: #f59e0b;
    background: #fef3c7;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kdtech-checklist-locked-note {
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Clickable locked note - hover effect */
.kdtech-locked-note--clickable {
    cursor: pointer;
    transition: background .2s, border-color .2s, box-shadow .2s;
}
.kdtech-locked-note--clickable:hover {
    background: #fef08a;
    border-color: #facc15;
    box-shadow: 0 2px 8px rgba(234,179,8,.25);
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */

@media (max-width: 520px) {
    .kdtech-form-grid          { grid-template-columns: 1fr; }
    .kdtech-field--full        { grid-column: 1; }
    .kdtech-modal-body         { padding: 18px 16px 20px; }
    .kdtech-modal              { border-radius: 14px; }
    .kdtech-modal-hdr          { border-radius: 14px 14px 0 0; padding: 15px 16px; }
    .kdtech-trigger-btn        { font-size: 14px; padding: 13px 22px; }
}

/* ═══════════════════════════════════════════════
   PAID MODAL — Header step indicators
═══════════════════════════════════════════════ */

.kdtech-hdr-steps {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    margin-right: 12px;
}
.kdtech-hdr-step {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: rgba(255,255,255,.5);
    font-size: 11px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s;
}
.kdtech-hdr-step.active { background: #fff; color: #1d555b; }
.kdtech-hdr-step.done   { background: rgba(255,255,255,.35); color: #fff; }
.kdtech-hdr-sep         { color: rgba(255,255,255,.3); font-size: 13px; }

/* ═══════════════════════════════════════════════
   PAYMENT SUMMARY BOX
═══════════════════════════════════════════════ */

.kdtech-pay-summary {
    background: #f0fdfe;
    border: 1.5px solid #a8d5d8;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
}
.kdtech-pay-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #334155;
    padding: 5px 0;
    border-bottom: 1px solid #e2e8f0;
}
.kdtech-pay-summary-row:last-of-type { border-bottom: none; }
.kdtech-pay-price { font-weight: 700; color: #1d555b; font-size: 15px; }
.kdtech-pay-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
    padding-top: 10px;
    margin-top: 6px;
    border-top: 2px solid #1d555b;
}

/* ═══════════════════════════════════════════════
   QR CODE SECTION
═══════════════════════════════════════════════ */

.kdtech-qr-wrap {
    text-align: center;
    margin-bottom: 18px;
}
.kdtech-qr-label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 10px;
}
.kdtech-qr-box {
    display: inline-block;
    padding: 10px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    margin-bottom: 10px;
}
.kdtech-qr-img {
    width: 180px;
    height: 180px;
    display: block;
    object-fit: contain;
}
.kdtech-upi-id-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 7px 12px;
    margin-bottom: 4px;
}
.kdtech-upi-id-label { font-size: 11px; color: #94a3b8; font-weight: 600; }
.kdtech-upi-id-val   { font-size: 13px; font-weight: 700; color: #1d555b; font-family: 'Courier New', monospace; }
.kdtech-upi-copy {
    background: #1d555b;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.kdtech-upi-copy:hover { background: #155060; }
.kdtech-pay-to { font-size: 12px; color: #64748b; margin: 4px 0 0; }

/* ═══════════════════════════════════════════════
   UTR INPUT
═══════════════════════════════════════════════ */

.kdtech-utr-wrap { margin-bottom: 14px; }
.kdtech-utr-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}
.kdtech-utr-hint {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #94a3b8;
    margin-top: 2px;
}
.kdtech-utr-input {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 14px;
    color: #1e293b;
    background: #f8fafc;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.kdtech-utr-input:focus {
    border-color: #1d555b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(29,85,91,.12);
}
/* Highlighted UTR input */
.kdtech-utr-input--highlight {
    border: 2px solid #f59e0b !important;
    background: #fffbeb !important;
    box-shadow: 0 0 0 3px rgba(245,158,11,.15) !important;
}
.kdtech-utr-input--highlight:focus {
    border-color: #d97706 !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(245,158,11,.25) !important;
}
/* Transaction ID heading */
.kdtech-utr-heading {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

/* ─────────────────────────────────────────────
   UPI DEEP LINK BUTTON
───────────────────────────────────────────── */
.kdtech-upi-deeplink-btn {
    display: block;
    margin: 12px auto 0;
    padding: 11px 20px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(22,163,74,.3);
    transition: transform .15s, box-shadow .15s;
    letter-spacing: -0.01em;
}
.kdtech-upi-deeplink-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(22,163,74,.4);
}
.kdtech-upi-deeplink-note {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    margin: 6px 0 0;
}


/* ─────────────────────────────────────────────
   QR CODE (JS-rendered)
───────────────────────────────────────────── */
.kdtech-qr-canvas-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 230px;
}
.kdtech-qr-canvas-wrap img,
.kdtech-qr-canvas-wrap canvas {
    border-radius: 8px;
    border: 3px solid #e2e8f0;
    display: block;
}
.kdtech-qr-amount-label {
    font-size: 13px;
    font-weight: 700;
    color: #1d555b;
    text-align: center;
    margin: 8px 0 0;
}
.kdtech-upi-tap-btn {
    display: block;
    margin: 10px auto 0;
    padding: 10px 18px;
    background: linear-gradient(135deg, #1d555b, #2a7a82);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    border-radius: 9px;
    box-shadow: 0 3px 10px rgba(29,85,91,.3);
    transition: opacity .15s;
}
.kdtech-upi-tap-btn:hover { opacity: .88; }

/* QR loading state */
.kdtech-qr-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    min-height: 220px;
    justify-content: center;
}
