.document-payment-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.55);
}

.document-payment-modal {
    width: min(32rem, 100%);
    max-height: min(90vh, 40rem);
    overflow: auto;
    border-radius: 0.75rem;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    padding: 1.5rem;
}

.document-payment-modal--wide {
    width: min(44rem, 100%);
    max-height: min(92vh, 52rem);
}

.document-contract-body {
    margin: 0 0 1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    max-height: 16rem;
    overflow: auto;
    background: #f8fafc;
    font-size: 0.925rem;
    line-height: 1.5;
}

.document-signature-wrap {
    margin-bottom: 0.5rem;
}

.document-signature-pad {
    display: block;
    width: 100%;
    height: 180px;
    border: 1px dashed #94a3b8;
    border-radius: 0.5rem;
    background: #fff;
    touch-action: none;
    cursor: crosshair;
}

.document-payment-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.document-payment-hint,
.document-payment-alert {
    margin: 0 0 1rem;
    font-size: 0.925rem;
    line-height: 1.45;
    color: #475569;
}

.document-payment-alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #fff7ed;
    color: #9a3412;
}

.document-payment-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.document-payment-select {
    width: 100%;
    margin-bottom: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: #fff;
}

.document-payment-services {
    margin-bottom: 1rem;
}

.document-payment-service-list {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.document-payment-service-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.925rem;
}

.document-payment-service-list li:last-child {
    border-bottom: 0;
}

.document-payment-total {
    margin: 0;
    text-align: right;
    font-size: 1rem;
}

.document-payment-element {
    margin-bottom: 1rem;
    min-height: 1.5rem;
}

.document-payment-error {
    margin: 0 0 1rem;
    color: #b91c1c;
    font-size: 0.875rem;
}

.document-payment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.document-payment-btn {
    border: 0;
    border-radius: 0.5rem;
    padding: 0.65rem 1rem;
    font-weight: 600;
    cursor: pointer;
}

.document-payment-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.document-payment-btn-secondary {
    background: #e2e8f0;
    color: #0f172a;
}

.document-payment-btn-primary {
    background: #2563eb;
    color: #fff;
}

.dark .document-payment-modal {
    background: #0f172a;
    color: #e2e8f0;
}

.dark .document-payment-hint {
    color: #94a3b8;
}

.dark .document-payment-select {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

.dark .document-payment-btn-secondary {
    background: #334155;
    color: #e2e8f0;
}

.dark .document-contract-body {
    background: #1e293b;
    border-color: #334155;
}

.dark .document-signature-pad {
    background: #fff;
    border-color: #64748b;
}
