.pedig-card-modal,
.pedig-card-inline {
    --primary: #2b7a4b;
    --primary-foreground: #ffffff;
    --accent: #f5b041;
    --accent-foreground: #000000;
    --background: #ffffff;
    --foreground: #1a1a1a;
    --muted-foreground: #5e6b62;
    --border: #e5e7eb;
    --font-family-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html.pedig-modal-open,
body.pedig-modal-open {
    overflow: hidden !important;
    height: 100% !important;
    overscroll-behavior: none;
    touch-action: none;
}

.pedig-card-modal button,
.pedig-card-inline button {
    font-family: var(--font-family-body);
    cursor: pointer;
}

.pedig-card-modal .btn,
.pedig-card-inline .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s;
    border: none;
}

.pedig-card-modal .btn-primary,
.pedig-card-inline .btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.pedig-card-modal .btn-secondary,
.pedig-card-inline .btn-secondary {
    background-color: #e5e7eb;
    color: var(--foreground);
}

.pedig-card-modal .btn-outline,
.pedig-card-inline .btn-outline {
    border: 1px solid var(--border);
    background-color: transparent;
    color: var(--foreground);
}

.pedig-card-modal .btn-full,
.pedig-card-inline .btn-full {
    width: 100%;
}

.pedig-card-entry-point {
    display: block;
}

.pedig-card-modal {
    z-index: 1060;
    background: transparent;
}

.pedig-card-inline {
    max-width: 560px;
}

.pedig-card-modal .modal-dialog {
    width: 100%;
    max-width: 560px;
    margin: 6% auto;
}

.pedig-card-modal-inner {
    background: var(--background);
    padding: 32px;
    border-radius: 12px;
    position: relative;
    font-family: var(--font-family-body);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    color: var(--foreground);
    text-align: left;
    direction: ltr;
}

.pedig-card-modal-inner h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: left;
}

.pedig-card-modal-inner .subtitle {
    font-size: 13px;
    color: var(--muted-foreground);
    margin-bottom: 24px;
    text-align: left;
}

.pedig-card-modal-inner .form-group {
    margin-bottom: 14px;
    text-align: left;
}

.pedig-card-modal-inner label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--muted-foreground);
    text-align: left;
}

.pedig-card-modal-inner .checkbox {
    text-align: left;
    margin-bottom: 16px;
}

.pedig-card-modal-inner .checkbox label {
    display: inline;
    font-weight: 400;
}

.pedig-input-row {
    position: relative;
    display: block;
}

.pedig-input-row .form-control {
    width: 100%;
    border-radius: 6px;
    min-height: 42px;
    padding: 10px 48px 10px 12px;
    box-sizing: border-box;
}

.pedig-input-qr-btn {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    width: 44px;
    border: none;
    background: #eef6f0;
    border-radius: 0 12px 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    padding: 0;
}

.pedig-input-qr-btn:hover {
    background: #e3efe7;
}

.pedig-input-qr-icon {
    display: block;
    flex-shrink: 0;
}

.pedig-qr-reader-slot {
    margin-top: 12px;
    max-width: 100%;
}

.pedig-card-status {
    background: #f4f7f9;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: left;
}

.pedig-card-message {
    margin-top: 14px;
    font-size: 14px;
    text-align: left;
}

.pedig-input-helper {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--muted-foreground);
}

.pedig-req {
    color: #b91c1c;
    font-weight: 600;
}

.pedig-input-invalid,
.pedig-aszf-row label.pedig-input-invalid {
    outline: 2px solid #b91c1c;
    outline-offset: 1px;
}

.pedig-aszf-row label.pedig-input-invalid {
    border-radius: 4px;
    padding: 2px 4px;
}

.pedig-error-list {
    margin: 8px 0 0;
    padding-left: 1.25rem;
    color: #b91c1c;
    font-size: 14px;
    text-align: left;
}

.pedig-register-message {
    margin-top: 12px;
    font-size: 14px;
    text-align: left;
}

.pedig-message-error,
.pedig-message-success {
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 10px 12px;
}

.pedig-message-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #842029;
}

.pedig-message-success {
    background: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.pedig-aszf-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.pedig-aszf-nolink {
    font-weight: 600;
    border-bottom: 1px dashed var(--muted-foreground);
    cursor: help;
}

/* Fiók oldal (page.tpl) – ugyanaz az input + QR elrendezés, mint a popupban */
.pedig-account-page {
    max-width: 560px;
    font-family: var(--font-family-body, system-ui, sans-serif);
    text-align: left;
}

.pedig-account-page .pedig-input-row {
    position: relative;
    display: block;
}

.pedig-account-page .pedig-input-row .form-control {
    width: 100%;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    min-height: 42px;
    padding: 10px 48px 10px 12px;
    box-sizing: border-box;
}

.pedig-account-page .pedig-input-qr-btn {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    width: 44px;
    border: none;
    background: #eef6f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #2b7a4b);
    padding: 0;
    cursor: pointer;
    border-radius: 0 12px 12px 0;
}

.pedig-account-page .pedig-account-save-btn,
.pedig-account-page .pedig-account-delete-btn {
    margin-top: 12px;
}

.pedig-account-page .pedig-req {
    color: #b91c1c;
    font-weight: 600;
}

.pedig-card-summary {
    margin: 0 0 1rem;
    padding: 0;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}

.pedig-card-summary__row {
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 58%);
    gap: 0.35rem 1rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.pedig-card-summary__row:last-child {
    border-bottom: none;
}

.pedig-card-summary dt {
    margin: 0;
    font-weight: 600;
    color: var(--muted-foreground, #4b5563);
    font-size: 0.9rem;
}

.pedig-card-summary dd {
    margin: 0;
    word-break: break-word;
}

.pedig-account-hint {
    font-size: 0.9rem;
    color: var(--muted-foreground, #4b5563);
    margin: 0 0 1rem;
}

.pedig-card-status--success {
    background: #eaf7ee;
    border-color: #b9e3c5;
}

.pedig-modal-close {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 20;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.pedig-modal-close-char {
    display: block;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    color: var(--foreground);
    font-family: Arial, Helvetica, sans-serif;
    transform: none;
}

#pedig-register-form .form-control {
    border-radius: 12px;
}

#pedig-register-for #pedig-reg-tos {
    position: relative;
    top: 5px;
}