/* ============================================================
   vCard – Standalone-Kontaktseite (Aalborg HCS)
   Hinweis: Diese Datei liegt bewusst NICHT unter assets/css/components/,
   damit sie nicht automatisch in die sitetweite components.css
   eingebunden wird (siehe concat_component_styles() in inc/enqueue.php).
   Sie wird ausschließlich von single-vcard_person.php eingebunden.
   ============================================================ */

/* ── Inter (aus dem Haupttheme gespiegelt, nur benötigte Schnitte) ── */
@font-face {
    font-family: "Inter";
    src: url("../webfonts/Inter_18pt-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("../webfonts/Inter_18pt-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("../webfonts/Inter_18pt-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("../webfonts/Inter_18pt-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --vc-green:       #0b2d12;
    --vc-green-light: #C5F8B6;
    --vc-text:        #121212;
    --vc-muted:       #767a74;
    --vc-white:       #ffffff;
    --vc-icon-muted:  #515151;

    /* Hintergrund-Modus: wird von .vc-theme-dark überschrieben (siehe unten) */
    --vc-bg:                 #ffffff;
    --vc-watermark-opacity:  .035;

    --font-size-body-xl: clamp(1.25rem, 1.6vw, 1.5rem);
    --font-size-body-md: clamp(0.95rem, 1.1vw, 1.0625rem);
    --font-size-body-sm: 0.85rem;
}

/* ── Dark-Mode-Variante (grauer Hintergrund statt Weiß) ──────── */
.vc-page.vc-theme-dark {
    --vc-bg:                #e5e5e5;
    --vc-watermark-opacity: .05;
}

/* ── Reset / Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.vc-page {
    font-family: "Inter", sans-serif;
    background: #e9ece8;
    color: var(--vc-text);
    min-height: 100dvh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
}

/* ── Card-Wrapper ─────────────────────────────────────────── */
.vc-wrap {
    background: var(--vc-bg);
    width: 100%;
    max-width: 570px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(13, 42, 2, .18);
}

@media (max-width: 500px) {
    body.vc-page { padding: 0; }
    .vc-wrap { border-radius: 0; box-shadow: none; max-width: 100%; min-height: 100dvh; }
}

/* ── Top-Bar: Logo + "part of Alois Müller Group" ────────────── */
.vc-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 2rem 1.75rem 0;
}

.vc-logo {
    height: 1.75rem;
    width: auto;
    /* Logo-Datei liegt nur in Weiß vor (Marke für dunkle Flächen) –
       invert() macht sie hier auf hellem Grund sichtbar. */
    filter: invert(1);
}

.vc-parentco {
    text-align: right;
    line-height: 1.3;
}
.vc-parentco__label {
    display: block;
    font-size: var(--font-size-body-sm);
    color: var(--vc-muted);
}
.vc-parentco__name {
    display: block;
    font-size: var(--font-size-body-sm);
    font-weight: 700;
    color: var(--vc-green);
}

/* ── Avatar (überlappt Weiß/Grün-Grenze) ─────────────────────── */
.vc-avatar-row {
    display: flex;
    justify-content: center;
    padding: 1.5rem 1.5rem 0;
    margin-bottom: -5.5rem; /* zieht die Hälfte des Avatars über die grüne Fläche */
}

.vc-avatar {
    width: 11rem;
    height: 11rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.vc-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef3ec;
}
.vc-avatar--placeholder svg {
    width: 4rem;
    height: 4rem;
    fill: #a9b3a5;
}

/* ── Identity-Block (dunkelgrün): Name, Job, Quick-Actions ───── */
.vc-identity {
    background: var(--vc-green);
    padding: 6.25rem 1.75rem 2.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    text-align: center;
}

.vc-name {
    font-size: var(--font-size-body-xl);
    font-weight: 700;
    color: var(--vc-white);
    line-height: 1.25;
}

.vc-job {
    font-size: var(--font-size-body-md);
    color: rgba(255, 255, 255, .75);
    font-weight: 400;
}

/* Quick-Action-Kreise: Call | Email | Directions */
.vc-quickactions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.vc-quickaction {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vc-green-light);
    color: var(--vc-green);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s ease, background .15s ease;
}
.vc-quickaction:hover {
    background: #d8fbcd;
    transform: translateY(-2px);
}
.vc-quickaction--disabled {
    opacity: .35;
    cursor: default;
    pointer-events: none;
}
.vc-quickaction svg {
    width: 1.75rem;
    height: 1.75rem;
    fill: currentColor;
    stroke: currentColor;
}
.vc-quickaction svg[fill="none"] { fill: none; }

/* ── Content-Block: Kontaktzeilen + Wasserzeichen ────────────── */
.vc-content {
    position: relative;
    background: var(--vc-bg);
    padding-bottom: 1.5rem;
    overflow: hidden;
}

/* Spannt exakt vom Ende des dunkelgrünen Bereichs bis zur Oberkante
   des ersten Buttons auf – dynamisch, abhängig von der vorhandenen
   Anzahl an Kontaktzeilen (kein fester Höhenwert). Das Wasserzeichen
   füllt diesen Bereich vollständig aus (s. .vc-watermark height:100%). */
.vc-rows-wrap {
    position: relative;
    padding: 2.5rem 0 2rem;
}

.vc-watermark {
    position: absolute;
    top: 0;
    bottom: 0;
    right: -5.5rem;
    width: auto;
    height: 100%;
    stroke: var(--vc-green);
    opacity: var(--vc-watermark-opacity);
    pointer-events: none;
    z-index: 0;
}

.vc-rows {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    padding: 0 1.75rem 0 5.5rem;
}

.vc-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.vc-row__icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    margin-top: .1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vc-icon-muted);
}
.vc-row__icon svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
    stroke: currentColor;
}
/* Umriss-SVGs (z. B. Globus) behalten fill:none */
.vc-row__icon svg[fill="none"] {
    fill: none;
}

.vc-row__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    gap: .3rem;
}

/* Firma / Adresse / Homepage als eigene Gruppen mit größerem Abstand
   zueinander; die Adresszeilen selbst bleiben innerhalb ihrer Gruppe eng. */
.vc-row__content--address {
    gap: 1rem;
}
.vc-address-lines {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    margin-bottom: 0.5rem;
}

.vc-row__value {
    font-size: var(--font-size-body-md);
    color: var(--vc-text);
    text-decoration: none;
    word-break: break-word;
    line-height: 1.4;
}
a.vc-row__value:hover { color: var(--vc-green); }

.vc-row__value--strong {
    font-weight: 700;
    margin-bottom: 2rem;
}

/* ── Buttons: volle Breite, flächig, ohne Lücke zur Kante ────── */
.vc-buttons {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1.75rem;
}

.vc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    width: 100%;
    padding: 1.1rem 1.5rem;
    font-size: var(--font-size-body-md);
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: "Inter", sans-serif;
    transition: background .2s, color .2s;
}
.vc-btn svg {
    width: 1.125rem;
    height: 1.125rem;
    fill: currentColor;
    flex-shrink: 0;
}

.vc-btn--primary {
    background: var(--vc-green-light);
    color: var(--vc-green);
}
.vc-btn--primary:hover { background: #b8f2a6; }

.vc-btn--secondary {
    background: var(--vc-green);
    color: var(--vc-white);
}
.vc-btn--secondary:hover { background: #0a2001; }

/* ── Dialog / Modal ───────────────────────────────────────── */
.vc-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(13, 42, 2, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
.vc-dialog-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.vc-dialog {
    background: var(--vc-white);
    border-radius: 1rem;
    padding: 2rem 1.5rem 1.5rem;
    width: 100%;
    max-width: 22rem;
    text-align: center;
    box-shadow: 0 16px 60px rgba(0, 0, 0, .2);
    transform: translateY(12px);
    transition: transform .2s;
}
.vc-dialog-backdrop.is-visible .vc-dialog { transform: translateY(0); }

.vc-dialog__icon {
    width: 3.25rem;
    height: 3.25rem;
    background: var(--vc-green-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.vc-dialog__icon svg {
    width: 1.625rem;
    height: 1.625rem;
    fill: var(--vc-green);
}

.vc-dialog__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--vc-text);
    margin-bottom: .5rem;
}
.vc-dialog__text {
    font-size: .9rem;
    color: var(--vc-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.vc-dialog__actions {
    display: flex;
    gap: .75rem;
}
.vc-dialog__actions .vc-btn { flex: 1; border-radius: .75rem; }

/* ── Toast ────────────────────────────────────────────────── */
.vc-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    background: var(--vc-green);
    color: var(--vc-white);
    font-size: .875rem;
    font-weight: 600;
    padding: .625rem 1.25rem;
    border-radius: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .2);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    white-space: nowrap;
    z-index: 10000;
}
.vc-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
