@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&display=swap');

/* ============================================================
   CNA Application — Multi-Step Wizard
   ============================================================ */

.gh-cna-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.gh-cna-header {
    text-align: center;
    margin-bottom: 28px;
}

.gh-cna-header h2 {
    color: #083882;
    font-size: 24px;
    margin: 0 0 6px;
}

.gh-cna-header p {
    color: #6b7280;
    margin: 0;
    font-size: 14px;
}

/* ---- Progress Bar ---- */
.gh-cna-progress {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.gh-cna-progress-bar {
    height: 100%;
    width: 14.28%;
    background: linear-gradient(90deg, #083882, #3b82f6);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* ---- Step Dots ---- */
.gh-cna-steps-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
    padding: 0 10px;
}

.gh-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    background: #e5e7eb;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.gh-step-dot.active {
    background: #083882;
    color: #fff;
    box-shadow: 0 2px 8px rgba(8, 56, 130, 0.3);
}

.gh-step-dot.completed {
    background: #10b981;
    color: #fff;
    cursor: pointer;
}

.gh-step-dot.active {
    cursor: pointer;
}

.gh-step-dot.clickable {
    cursor: pointer;
}

.gh-step-dot.clickable:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ---- Step Panels ---- */
.gh-cna-step {
    display: none;
    animation: gh-fade-in 0.3s ease;
}

.gh-cna-step.active {
    display: block;
}

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

.gh-cna-step h3 {
    color: #083882;
    font-size: 20px;
    margin: 0 0 6px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.gh-cna-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 20px;
}

/* ---- Form Fields ---- */
.gh-cna-field {
    margin-bottom: 18px;
}

.gh-cna-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
}

.gh-cna-label .req {
    color: #ef4444;
}

.gh-cna-field input[type="text"],
.gh-cna-field input[type="email"],
.gh-cna-field input[type="tel"],
.gh-cna-field input[type="date"],
.gh-cna-field input[type="password"],
.gh-cna-field input[type="number"],
.gh-cna-field input[type="url"],
.gh-cna-field textarea,
.gh-cna-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.gh-cna-field input:focus,
.gh-cna-field textarea:focus,
.gh-cna-field select:focus {
    outline: none;
    border-color: #083882;
    box-shadow: 0 0 0 3px rgba(8, 56, 130, 0.1);
}

.gh-cna-field input.gh-cna-error,
.gh-cna-field textarea.gh-cna-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* A clinical-area option that is full (disabled) */
.gh-cna-opt-full { opacity: 0.5; }

.gh-cna-hint {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.gh-cna-signature-input {
    font-family: "Dancing Script", cursive;
    font-size: 22px !important;
}

/* ---- Signature Tabs ---- */
.gh-sig-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid #e5e7eb;
}

.gh-sig-tab {
    flex: 1;
    padding: 10px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.2s;
}

.gh-sig-tab:hover { background: #eff6ff; color: #083882; }

.gh-sig-tab.active {
    background: #fff;
    color: #083882;
    border-color: #083882;
    border-bottom: 2px solid #fff;
    margin-bottom: -2px;
    position: relative;
    z-index: 1;
}

.gh-sig-panel {
    display: none;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 16px;
    background: #fff;
}

.gh-sig-panel.active { display: block; }

/* Canvas */
#gh-sig-canvas,
#gh-parent-sig-canvas {
    width: 100%;
    height: 160px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    cursor: crosshair;
    background: #fefefe;
    touch-action: none;
    display: block;
}

#gh-sig-canvas.has-signature,
#gh-parent-sig-canvas.has-signature { border-color: #083882; border-style: solid; }

.gh-sig-canvas-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.gh-sig-clear-btn {
    padding: 6px 16px;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.gh-sig-clear-btn:hover { background: #fecaca; }

.gh-sig-hint {
    font-size: 12px;
    color: #9ca3af;
}

/* Type preview */
.gh-sig-type-preview {
    margin-top: 12px;
    padding: 16px 20px;
    font-family: "Dancing Script", cursive;
    font-size: 32px;
    color: #1e3a5f;
    min-height: 60px;
    border-bottom: 2px solid #1e3a5f;
}

/* Upload area */
.gh-sig-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.gh-sig-upload-area:hover {
    border-color: #083882;
    background: #eff6ff;
}

.gh-sig-upload-area p { margin: 4px 0; color: #6b7280; font-size: 14px; }

.gh-sig-upload-preview {
    max-width: 300px;
    max-height: 120px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
    margin-bottom: 8px;
}

/* ---- Stripe Payment Element ---- */
.gh-stripe-card-element {
    min-height: 50px;
    background: #fff;
}

.gh-stripe-card-errors {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
    min-height: 20px;
}

.gh-cna-payment-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 16px 0;
}

/* ---- Grid Rows ---- */
.gh-cna-row {
    display: flex;
    gap: 14px;
}

.gh-cna-col-2 { flex: 1; }
.gh-cna-col-3 { flex: 1; }
.gh-cna-col-4 { flex: 0 0 100px; }

/* ---- Radio Groups ---- */
.gh-cna-radio-group label {
    display: block;
    padding: 8px 14px;
    margin-bottom: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s;
}

.gh-cna-radio-group label:hover {
    background: #f9fafb;
    border-color: #083882;
}

.gh-cna-radio-group input[type="radio"]:checked + span,
.gh-cna-radio-group label:has(input:checked) {
    background: #eff6ff;
    border-color: #083882;
    color: #083882;
}

.gh-cna-radio-inline {
    display: flex;
    gap: 10px;
}

.gh-cna-radio-inline label {
    flex: 0 0 auto;
    min-width: 80px;
    text-align: center;
}

.gh-cna-radio-group input[type="radio"] {
    margin-right: 8px;
}

/* ---- Checkboxes ---- */
.gh-cna-checkbox {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 13px;
    color: #991b1b;
    line-height: 1.5;
    cursor: pointer;
}

.gh-cna-checkbox input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

/* ---- Fieldset ---- */
.gh-cna-fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 18px;
}

.gh-cna-fieldset legend {
    font-size: 14px;
    font-weight: 600;
    color: #083882;
    padding: 0 8px;
}

.gh-cna-fieldset legend small {
    font-weight: 400;
    color: #9ca3af;
}

/* ---- Conditional Fields ---- */
.gh-cna-conditional {
    display: none;
    padding: 14px 18px;
    margin-top: -8px;
    margin-bottom: 18px;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 8px;
}

.gh-cna-conditional.visible {
    display: block;
}

/* ---- Certification Block ---- */
.gh-cna-certification {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
}

.gh-cna-certification p:first-child {
    margin-top: 0;
}

.gh-cna-certification p:last-child {
    margin-bottom: 0;
}

/* ---- Notice ---- */
.gh-cna-notice {
    background: #eff6ff;
    border-left: 4px solid #083882;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 18px;
    font-size: 14px;
    color: #083882;
}

/* ---- File Uploads ---- */
.gh-cna-upload {
    position: relative;
}

.gh-cna-file-input {
    display: none;
}

.gh-cna-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.gh-cna-upload-area:hover {
    border-color: #083882;
    background: #eff6ff;
}

.gh-cna-upload-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.gh-cna-upload-text {
    font-size: 13px;
    color: #6b7280;
}

.gh-cna-upload-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    font-size: 13px;
    color: #065f46;
}

.gh-cna-upload-preview .gh-cna-remove-file {
    margin-left: auto;
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    padding: 0 4px;
}

.gh-cna-upload.loading .gh-cna-upload-area {
    opacity: 0.5;
    pointer-events: none;
}

/* ---- Navigation Buttons ---- */
.gh-cna-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.gh-cna-btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.gh-cna-btn-prev {
    background: #f3f4f6;
    color: #374151;
}

.gh-cna-btn-prev:hover {
    background: #e5e7eb;
}

.gh-cna-btn-draft {
    background: #fff;
    color: #083882;
    border: 2px solid #083882;
}

.gh-cna-btn-draft:hover {
    background: #eff6ff;
}

.gh-cna-btn-next,
.gh-cna-btn-submit {
    background: #083882;
    color: #fff;
    margin-left: auto;
}

.gh-cna-btn-next:hover,
.gh-cna-btn-submit:hover {
    background: #062d6b;
    box-shadow: 0 2px 8px rgba(8, 56, 130, 0.3);
}

.gh-cna-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---- Messages ---- */
.gh-cna-message {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.gh-cna-message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.gh-cna-message.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

/* ---- Success Screen ---- */
.gh-cna-success {
    text-align: center;
    padding: 60px 20px;
}

.gh-cna-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #10b981;
    color: #fff;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.gh-cna-success h3 {
    color: #083882;
    font-size: 22px;
    margin: 0 0 12px;
    border: none;
}

.gh-cna-success p {
    color: #6b7280;
    font-size: 15px;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .gh-cna-wrap {
        padding: 12px;
    }

    .gh-cna-row {
        flex-direction: column;
        gap: 0;
    }

    .gh-cna-col-4 {
        flex: 1;
    }

    .gh-cna-radio-inline {
        flex-direction: column;
    }

    .gh-cna-radio-inline label {
        min-width: auto;
        text-align: left;
    }

    .gh-cna-nav {
        gap: 10px;
    }

    .gh-cna-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .gh-cna-steps-indicator {
        padding: 0;
    }

    .gh-step-dot {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}
