/*
 * Peggy's Kursusbestilling: frontend styling.
 *
 * ------------------------------------------------------------------
 * TIL DIG DER SKAL MATCHE DESIGNET: alle farver/mål samlet her øverst.
 * Ret dem ét sted i stedet for at søge og erstatte i hele filen.
 * ------------------------------------------------------------------
 */
.pgy-booking-wrap {
    --pgy-primary: #1b3a6b;       /* Hovedfarve, knapper, overskrifter, kant på kursusvalg */
    --pgy-primary-dark: #122a4d;  /* Hover-farve på knapper */
    --pgy-accent: #d4af37;        /* Valgfri accentfarve, bruges ikke aktivt endnu */
    --pgy-text: #2b2b2b;
    --pgy-muted: #6b7280;
    --pgy-border: #e2e5ea;
    --pgy-bg-soft: #f7f8fa;
    --pgy-radius: 12px;
    --pgy-radius-sm: 8px;
    --pgy-font: inherit;          /* Sæt til sitets font-family hvis den ikke arves automatisk */

    width: 100%;
    color: var(--pgy-text);
    font-family: var(--pgy-font);
    font-size: 15px;
}

.pgy-booking-form {
    background: #fff;
    border: 1px solid var(--pgy-border);
    border-radius: var(--pgy-radius);
    box-shadow: 0 4px 24px rgba(20, 30, 60, 0.06);
    padding: 40px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 700px) {
    .pgy-booking-form {
        padding: 22px;
        border-radius: var(--pgy-radius-sm);
    }
}

/* To-kolonne layout: venstre = kursus + fakturering, højre = deltagere + andet */
.pgy-form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
@media (max-width: 860px) {
    .pgy-form-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.pgy-col {
    min-width: 0; /* forhindrer grid-kolonner i at skubbe layoutet ved lange ord */
}

.pgy-section {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--pgy-border);
}
.pgy-col:last-child .pgy-section:last-child,
.pgy-col .pgy-section:last-child {
    border-bottom: none;
}

.pgy-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pgy-primary);
    margin: 0 0 16px;
}

.pgy-course-name {
    font-size: 1.15em;
    font-weight: 600;
    margin: -4px 0 16px;
    color: var(--pgy-text);
}

/* Dato-valg som klikbare kort i stedet for en dropdown */
.pgy-date-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pgy-date-card {
    display: block;
    position: relative;
    border: 1.5px solid var(--pgy-border);
    border-radius: var(--pgy-radius-sm);
    padding: 16px 18px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.pgy-date-card:hover {
    background: var(--pgy-bg-soft);
}
.pgy-date-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.pgy-date-card:has(input:checked) {
    border-color: var(--pgy-primary);
    box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.1);
}
.pgy-date-card:has(input:focus-visible) {
    outline: 2px solid var(--pgy-primary);
    outline-offset: 2px;
}
.pgy-date-card-body {
    display: block;
}
.pgy-date-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.pgy-date-card-date {
    font-weight: 700;
    color: var(--pgy-text);
    font-size: 1.02em;
}
.pgy-date-card-price {
    display: inline-block;
    flex-shrink: 0;
    background: var(--pgy-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.9em;
    padding: 5px 12px;
    border-radius: 999px;
    white-space: nowrap;
}
.pgy-date-card-location {
    display: block;
    font-size: 0.88em;
    color: var(--pgy-muted);
    margin-top: 4px;
}
.pgy-date-card-extra {
    display: block;
    font-size: 0.85em;
    color: var(--pgy-muted);
    font-style: italic;
    margin-top: 4px;
}

.pgy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 460px) {
    .pgy-grid {
        grid-template-columns: 1fr;
    }
}
.pgy-span-2 {
    grid-column: 1 / -1;
}

.pgy-field {
    margin-bottom: 16px;
}
.pgy-grid .pgy-field {
    margin-bottom: 0;
}

.pgy-field label {
    display: block;
    font-weight: 600;
    font-size: 0.92em;
    margin-bottom: 6px;
    color: var(--pgy-text);
}

.pgy-booking-form input[type="text"],
.pgy-booking-form input[type="email"],
.pgy-booking-form input[type="tel"],
.pgy-booking-form input[type="number"],
.pgy-booking-form select,
.pgy-booking-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pgy-border);
    border-radius: var(--pgy-radius-sm);
    background: #fff;
    color: var(--pgy-text);
    font-size: 1em;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pgy-booking-form input:focus,
.pgy-booking-form select:focus,
.pgy-booking-form textarea:focus {
    outline: none;
    border-color: var(--pgy-primary);
    box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.12);
}
.pgy-booking-form textarea {
    resize: vertical;
}

/* Deltager-kort */
.pgy-participant {
    background: var(--pgy-bg-soft);
    border: 1px solid var(--pgy-border);
    border-radius: var(--pgy-radius-sm);
    padding: 16px;
    margin-bottom: 12px;
}
.pgy-participant-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.pgy-participant-label {
    font-weight: 700;
    font-size: 0.85em;
    color: var(--pgy-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pgy-remove-participant {
    background: none;
    border: none;
    color: var(--pgy-muted);
    font-size: 1.3em;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
}
.pgy-remove-participant:hover {
    color: #b32d2e;
    background: #fdecea;
}

.pgy-add-participant {
    background: #fff;
    border: 1.5px dashed var(--pgy-primary);
    color: var(--pgy-primary);
    border-radius: var(--pgy-radius-sm);
    padding: 10px 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s ease;
}
.pgy-add-participant:hover {
    background: var(--pgy-bg-soft);
}

/* Samtykke */
.pgy-consent {
    margin-top: 8px;
}
.pgy-consent label {
    font-weight: normal;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.92em;
    color: var(--pgy-muted);
}
.pgy-consent input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.pgy-hp {
    position: absolute;
    left: -9999px;
}

/* Submit */
.pgy-submit-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    text-align: center;
}
.pgy-submit {
    background: var(--pgy-primary);
    color: #fff;
    border: none;
    border-radius: var(--pgy-radius-sm);
    padding: 14px 36px;
    font-size: 1.05em;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.pgy-submit:hover {
    background: var(--pgy-primary-dark);
}
.pgy-submit:active {
    transform: translateY(1px);
}
.pgy-note {
    font-size: 0.85em;
    color: var(--pgy-muted);
}

/* Fejl */
.pgy-errors {
    background: #fdecea;
    border: 1px solid #f1b0ab;
    border-radius: var(--pgy-radius-sm);
    padding: 14px 18px;
    margin-bottom: 20px;
    color: #7a1f1a;
}
.pgy-errors p {
    margin: 0 0 6px;
}
.pgy-errors ul {
    margin: 0;
    padding-left: 20px;
}

/* Kvittering */
.pgy-success {
    background: #fff;
    border: 1px solid var(--pgy-border);
    border-radius: var(--pgy-radius);
    box-shadow: 0 4px 24px rgba(20, 30, 60, 0.06);
    padding: 48px 32px;
    text-align: center;
}
.pgy-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #e6f4ea;
    color: #2e7d32;
    font-size: 1.6em;
    margin-bottom: 14px;
}
.pgy-success h3 {
    margin: 0 0 8px;
    color: var(--pgy-text);
}
.pgy-success p {
    margin: 0;
    color: var(--pgy-muted);
}

.pgy-closed {
    background: var(--pgy-bg-soft);
    border-radius: var(--pgy-radius-sm);
    padding: 18px;
    color: var(--pgy-muted);
}
