
/* =========================
   POSTCARD BUILDER v0.5
   ========================= */

.pce-builder {
    --pce-purple: var(--pce-background, #22769B);
    --pce-yellow: var(--pce-accent, #e0ff00);
    --pce-white: var(--pce-text, #ffffff);
    --pce-radius: 20px;

    width: 100%;
    box-sizing: border-box;
    background: var(--pce-purple);
    padding: 42px 22px 54px;
    margin: 0;
    color: var(--pce-white);
}

.pce-builder *,
.pce-builder *::before,
.pce-builder *::after {
    box-sizing: border-box;
}

.pce-builder-inner {
    width: min(100%, 1180px);
    margin: 0 auto;
}

.pce-builder-photo {
    width: 100%;
    overflow: hidden;
    border-radius: var(--pce-radius);
    background: var(--pce-field-background, #fff);
    aspect-ratio: 16 / 10;
}

.pce-builder-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pce-builder-form {
    padding-top: 34px;
}

.pce-destination-label {
    color: var(--pce-yellow);
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(25px, 5vw, 48px);
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    margin: 0 0 28px;
}

.pce-field {
    margin-bottom: 25px;
}

.pce-field label,
.pce-choice-title {
    display: block;
    color: var(--pce-yellow);
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(19px, 3.2vw, 32px);
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.pce-field input,
.pce-field textarea {
    display: block;
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 16px;
    background: var(--pce-field-background, #fff);
    color: var(--pce-field-text, #161616);
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    font-family: inherit;
    text-align: center;
    box-shadow: none;
}

.pce-field input {
    min-height: 68px;
}

.pce-field textarea {
    min-height: 185px;
    resize: vertical;
    text-align: left;
}

.pce-field input:focus,
.pce-field textarea:focus {
    box-shadow: 0 0 0 4px rgba(224,255,0,.35);
}

.pce-counter {
    color: rgba(255,255,255,.65);
    font: 12px/1.2 inherit;
    text-align: right;
    margin-top: 6px;
}

.pce-choice-title {
    margin: 32px 0 13px;
}

.pce-plan-choices {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.pce-plan {
    appearance: none;
    width: 100%;
    border: 3px solid transparent;
    border-radius: 16px;
    background: rgba(255,255,255,.08);
    color: var(--pce-text, #fff);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    text-align: left;
    
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.pce-plan:hover {
    transform: translateY(-1px);
}

.pce-plan.is-selected {
    border-color: var(--pce-yellow);
    background: rgba(255,255,255,.14);
}

.pce-plan-radio {
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    border: 3px solid #fff;
    border-radius: 50%;
    position: relative;
}

.pce-plan.is-selected .pce-plan-radio {
    border-color: var(--pce-yellow);
}

.pce-plan.is-selected .pce-plan-radio::after {
    content: "";
    position: absolute;
    width: 11px;
    height: 11px;
    top: 4px;
    left: 4px;
    border-radius: 50%;
    background: var(--pce-yellow);
}

.pce-plan-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pce-plan-copy strong {
    font-size: 18px;
    line-height: 1.1;
}

.pce-plan-copy small {
    font-size: 13px;
    opacity: .78;
}

.pce-send-button {
    display: block;
    width: min(100%, 360px);
    margin: 30px auto 0;
    border: 0;
    border-radius: 12px;
    background: var(--pce-yellow);
    color: var(--pce-button-text, var(--pce-purple));
    padding: 17px 28px;
    cursor: pointer;
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
    font-family: inherit;
    text-transform: uppercase;
    transition: transform .15s ease, box-shadow .15s ease;
}

.pce-send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

/* =========================
   PUBLIC CARD
   ========================= */

.pce-public {
    max-width: 850px;
    margin: 60px auto;
    padding: 0 20px;
}

.pce-public-card {
    background: var(--pce-field-background, #fff);
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,.08);
}

.pce-public-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
}

.pce-public-body {
    padding: 28px;
}

.pce-public-place {
    font-size: 12px;
    letter-spacing: .14em;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.pce-public-to {
    font-size: 14px;
    opacity: .65;
    margin-bottom: 18px;
}

.pce-public-message {
    font-size: clamp(24px, 4vw, 38px);
    line-height: 1.2;
    margin-bottom: 18px;
}

.pce-public-from {
    font-size: 14px;
    opacity: .7;
}

.pce-public-sponsor {
    margin-top: 28px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
}

.pce-public-sponsor img {
    max-height: 32px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.pce-public-sponsor strong {
    font-size: 15px;
    letter-spacing: 0;
    display: inline-block;
}

.pce-public-sponsor a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.pce-public-sponsor a:hover {
    text-decoration: underline;
}

.pce-public-sponsor.is-premium,
.pce-public-sponsor.is-unsponsored {
    opacity: .5;
}

.pce-share {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 24px;
}

.pce-share-btn {
    border: 0;
    border-radius: 9px;
    background: #111;
    color: var(--pce-text, #fff);
    padding: 15px 18px;
    font-weight: 800;
    letter-spacing: .04em;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.pce-copy-status {
    min-height: 18px;
    margin-top: 10px;
    font-size: 12px;
    opacity: .7;
}

.pce-code {
    margin-top: 20px;
    font-size: 10px;
    opacity: .4;
    letter-spacing: .08em;
}

/* =========================
   DESKTOP / HORIZONTAL
   ========================= */

@media (min-width: 900px) {
    .pce-builder {
        min-height: 100vh;
        display: flex;
        align-items: center;
        padding: 55px 40px;
    }

    .pce-builder-inner {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
        gap: 55px;
        align-items: center;
    }

    .pce-builder-photo {
        aspect-ratio: 4 / 3;
        border-radius: 22px;
    }

    .pce-builder-form {
        padding-top: 0;
    }

    .pce-destination-label {
        font-size: clamp(30px, 3vw, 52px);
        margin-bottom: 30px;
    }

    .pce-field label,
    .pce-choice-title {
        font-size: clamp(20px, 2.1vw, 32px);
    }

    .pce-field input {
        min-height: 58px;
    }

    .pce-field textarea {
        min-height: 140px;
    }

    .pce-plan-choices {
        grid-template-columns: 1fr 1fr;
    }

    .pce-plan {
        min-height: 92px;
    }

    .pce-send-button {
        width: 100%;
        margin-top: 24px;
    }
}

@media (max-width: 899px) {
    .pce-builder {
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        width: 100vw;
    }
}

@media (max-width: 767px) {
    .pce-builder {
        padding: 22px 15px 38px;
    }

    .pce-builder-photo {
        aspect-ratio: 4 / 3;
        border-radius: 16px;
    }

    .pce-builder-form {
        padding-top: 26px;
    }

    .pce-field {
        margin-bottom: 21px;
    }

    .pce-field input {
        min-height: 58px;
    }

    .pce-field textarea {
        min-height: 160px;
    }

    .pce-plan {
        padding: 14px;
    }

    .pce-send-button {
        font-size: 24px;
    }

    .pce-share {
        grid-template-columns: 1fr;
    }

    .pce-public {
        margin: 35px auto;
        padding: 0 15px;
    }
}

.pce-wrap { font-family: inherit; }

.pce-form { font-family: inherit; }

.pce-form label { font-family: inherit; }

.pce-form input { font-family: inherit; }

.pce-form textarea { font-family: inherit; }

.pce-choice { font-family: inherit; }

.pce-choice-name { font-family: inherit; }

.pce-choice-desc { font-family: inherit; }

.pce-choice-title { font-family: inherit; }

.pce-submit { font-family: inherit; }

.pce-public { font-family: inherit; }

.pce-public-body { font-family: inherit; }

.pce-share-btn { font-family: inherit; }

/* v0.5.4 - Elementor typography for all form text */
.pce-wrap .pce-form,
.pce-wrap .pce-form *,
.pce-wrap .pce-form label,
.pce-wrap .pce-form input,
.pce-wrap .pce-form textarea,
.pce-wrap .pce-choice,
.pce-wrap .pce-choice *,
.pce-wrap .pce-choice-name,
.pce-wrap .pce-choice-desc,
.pce-wrap .pce-choice-title,
.pce-wrap .pce-submit {
    font-family: inherit !important;
}

/* v0.5.5 - Elementor font override for every form element */
.pce-builder .pce-builder-form,
.pce-builder .pce-builder-form *,
.pce-builder .pce-field,
.pce-builder .pce-field *,
.pce-builder .pce-field label,
.pce-builder .pce-field input,
.pce-builder .pce-field textarea,
.pce-builder .pce-choice,
.pce-builder .pce-choice *,
.pce-builder .pce-choice-title,
.pce-builder .pce-choice-name,
.pce-builder .pce-choice-desc,
.pce-builder .pce-submit {
    font-family: inherit !important;
}

/* v0.6.1 - typography controls */
.pce-builder,
.pce-builder .pce-builder-form,
.pce-builder .pce-builder-form *,
.pce-builder .pce-builder-form label,
.pce-builder .pce-builder-form input,
.pce-builder .pce-builder-form textarea,
.pce-builder .pce-choice,
.pce-builder .pce-choice *,
.pce-builder .pce-submit {
    font-family: var(--pce-font-family, inherit) !important;
}
.pce-builder .pce-builder-title,
.pce-builder h1,
.pce-builder h2 {
    font-size: var(--pce-title-size, 32px) !important;
}
.pce-builder .pce-field label,
.pce-builder .pce-choice-title {
    font-size: var(--pce-label-size, 28px) !important;
}
.pce-builder .pce-field input,
.pce-builder .pce-field textarea {
    font-size: var(--pce-field-size, 17px) !important;
}
.pce-builder .pce-choice-name,
.pce-builder .pce-choice-desc {
    font-size: var(--pce-choice-size, 18px) !important;
}
.pce-builder .pce-submit,
.pce-builder button[type="submit"] {
    font-size: var(--pce-button-size, 24px) !important;
}

/* v0.6.3 - desktop: destination title aligns with the form's first label */
@media (min-width: 900px) {
    .pce-builder .pce-builder-inner {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
        grid-template-areas:
            "title form";
        align-items: start;
        column-gap: 60px;
    }

    .pce-builder .pce-builder-title {
        grid-area: title;
        align-self: start;
        text-align: left;
        margin: 0 0 18px 0;
    }

    .pce-builder .pce-builder-image,
    .pce-builder .pce-photo {
        grid-area: title;
        align-self: start;
        margin-top: 58px;
    }

    .pce-builder .pce-builder-form {
        grid-area: form;
        align-self: start;
    }
}
