/* ================================================================
   Macring Product Form Block  — Figma node 2-2540  (light theme)
   ================================================================ */

.macring-product-form {
    width: 100%;
    background: #ffffff;
    padding: 64px 0;
}

/* ── Card ─────────────────────────────────────────────────────── */

.mpf__container {
    max-width: 900px;   /* Figma: max-w-[900px] */
    margin: 0 auto;
    padding: 0 32px;
}

.mpf__card {
    background: #fafafa;                    /* Figma: bg-[#fafafa] */
    border: 1px solid rgba(0, 0, 0, 0.08); /* Figma: border rgba(0,0,0,0.08) */
    padding: 41px;                          /* Figma: p-[41px] */
}

/* ── Heading & description ───────────────────────────────────── */

.app-container .macring-product-form .mpf__heading {
    font-family: "Barlow Condensed", sans-serif;
    font-size: 40px;            /* Figma: text-[40px] */
    font-weight: 600;
    line-height: 43.2px;
    letter-spacing: 0.4px;
    color: #002856;
    margin: 0;
}

.mpf__description {
    font-family: "Inter", sans-serif;
    font-size: 15.2px;          /* Figma: text-[15.2px] */
    font-weight: 400;
    line-height: 26.6px;
    color: #6b7280;
    margin: 12px 0 0;           /* Figma: pt-[12px] */
}

/* ── Form wrapper ────────────────────────────────────────────── */

.mpf__form-wrap {
    position: relative;         /* anchor for sending overlay */
    margin-top: 32px;           /* Figma: pt-[32px] */
}

.mpf__placeholder {
    font-family: "Inter", sans-serif;
    font-size: 13.12px;
    font-style: italic;
    color: rgba(13, 27, 42, 0.4);
    margin: 0;
}

/* ── CF7 / form element styling (light theme) ────────────────── */

.macring-product-form .wpcf7-form,
.macring-product-form form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Full-width label by default */
.macring-product-form .wpcf7-form label,
.macring-product-form form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    font-family: "Inter", sans-serif;
    font-size: 10.88px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(13, 27, 42, 0.5);
    text-transform: uppercase;
}

/* Half-width pair — add class="half" on the CF7 label tag */
.macring-product-form .wpcf7-form label.half,
.macring-product-form form label.half {
    width: calc(50% - 10px); /* gap: 20px / 2 = 10px */
}

/* CF7 control wrap */
.macring-product-form .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

/* Inputs */
.macring-product-form input[type="text"],
.macring-product-form input[type="email"],
.macring-product-form input[type="tel"],
.macring-product-form textarea {
    display: block;
    width: 100%;
    padding: 13px 17px;             /* Figma: px-[17px] py-[13px] */
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);  /* Figma: border rgba(0,0,0,0.15) */
    font-family: "Inter", sans-serif;
    font-size: 14.4px;              /* Figma: text-[14.4px] */
    font-weight: 400;
    line-height: 1.5;
    color: rgba(13, 27, 42, 0.85);
    outline: none;
    transition: border-color 180ms ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    border-radius: 0;
}

.macring-product-form input[type="text"]::placeholder,
.macring-product-form input[type="email"]::placeholder,
.macring-product-form input[type="tel"]::placeholder,
.macring-product-form textarea::placeholder {
    color: rgba(13, 27, 42, 0.5);  /* Figma: rgba(13,27,42,0.5) */
}

.macring-product-form input[type="text"]:focus,
.macring-product-form input[type="email"]:focus,
.macring-product-form input[type="tel"]:focus,
.macring-product-form textarea:focus {
    border-color: rgba(0, 0, 0, 0.35);
}

.macring-product-form textarea {
    height: 134px;                  /* Figma: h-[134.047px] */
    resize: vertical;
}

/* Submit button — inline/auto width, left-aligned */
.macring-product-form input[type="submit"],
.macring-product-form .wpcf7-submit,
.macring-product-form button[type="submit"] {
    display: inline-block;
    margin-top: 8px;
    padding: 14px 28px;             /* Figma: px-[28px] py-[14px] */
    background: #e03a1a;
    border: none;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 1.2px;
    color: #ffffff;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 180ms ease;
    -webkit-appearance: none;
    border-radius: 0;
}

.macring-product-form input[type="submit"]:hover,
.macring-product-form .wpcf7-submit:hover,
.macring-product-form button[type="submit"]:hover {
    background: #c5320f;
}

/* CF7 validation error tip */
.macring-product-form .wpcf7-not-valid-tip {
    display: block;
    margin-top: 5px;
    font-family: "Inter", sans-serif;
    font-size: 10.4px;
    font-weight: 400;
    color: #e03a1a;
    text-transform: none;
}

/* Invalid input highlight */
.macring-product-form input.wpcf7-not-valid,
.macring-product-form textarea.wpcf7-not-valid {
    border-color: rgba(224, 58, 26, 0.55);
}

/* Hide response-output when empty (CF7 renders it always) */
.macring-product-form .wpcf7-response-output {
    display: none;
}

/* Show only on actual errors */
.app-container .macring-product-form .wpcf7 form .wpcf7-validation-errors,
.app-container .macring-product-form .wpcf7 form .wpcf7-spam-blocked,
.app-container .macring-product-form .wpcf7 form .wpcf7-mail-sent-ng,
.app-container .macring-product-form .wpcf7 form .wpcf7-aborted,
.macring-product-form .wpcf7-validation-errors,
.macring-product-form .wpcf7-spam-blocked,
.macring-product-form .wpcf7-mail-sent-ng,
.macring-product-form .wpcf7-aborted {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 0;
    padding: 10px 14px;
    border: none;
    border-left: 3px solid #e03a1a;
    background: rgba(224, 58, 26, 0.06);
    font-family: "Inter", sans-serif;
    font-size: 11.5px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(0, 40, 86, 0.7);
    letter-spacing: 0;
    text-align: left;
    justify-content: flex-start;
    width: auto;
}

/* Hide mail-sent response — animation handles it */
.macring-product-form .wpcf7-mail-sent-ok {
    display: none !important;
}

/* ── Sending animation overlay ───────────────────────────────── */

.mpf__sending {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    pointer-events: none;
    z-index: 10;
    animation: mpf-fade-in 0.3s ease both;
}

@keyframes mpf-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.mpf__sending-rings {
    position: relative;
    width: 80px;
    height: 80px;
}

.mpf__sending-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(224, 58, 26, 0.85);
    inset: 28px;
    opacity: 0;
    animation: mpf-ripple 1.8s ease-out infinite;
}

.mpf__sending-ring:nth-child(1) { animation-delay: 0s;   }
.mpf__sending-ring:nth-child(2) { animation-delay: 0.6s; }
.mpf__sending-ring:nth-child(3) { animation-delay: 1.2s; }

@keyframes mpf-ripple {
    0%   { inset: 24px;  opacity: 1; }
    100% { inset: -18px; opacity: 0; }
}

.mpf__sending-plane {
    position: absolute;
    inset: 22px;
    fill: #e03a1a;
    animation: mpf-plane-float 1.2s ease-in-out infinite alternate;
}

.mpf__sending-plane line {
    fill: none;
    stroke: #e03a1a;
    stroke-width: 1.5;
    stroke-linecap: round;
}

@keyframes mpf-plane-float {
    from { transform: translateY(1px)  rotate(-6deg); }
    to   { transform: translateY(-3px) rotate( 6deg); }
}

.mpf__sending-label {
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.3px;
    color: rgba(13, 27, 42, 0.55);   /* dark on light bg */
    text-transform: uppercase;
}

.mpf__dot {
    display: inline-block;
    animation: mpf-blink 1.2s ease-in-out infinite;
    opacity: 0;
}

@keyframes mpf-blink {
    0%, 80%, 100% { opacity: 0; }
    40%           { opacity: 1; }
}

/* ── Success / Error result card ─────────────────────────────── */

.mpf__success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 0 48px;
}

.mpf__success-graphic {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 32px;
}

.mpf__success-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.mpf__particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: var(--p-len, 24px);
    background: var(--p-color, #e03a1a);
    border-radius: 2px;
    margin-top: -1px;
    margin-left: -1.5px;
    transform-origin: 50% 0;
    opacity: 0;
    animation: mpf-particle 0.75s cubic-bezier(0.22, 0, 0.36, 1) forwards;
}

@keyframes mpf-particle {
    0%   { transform: rotate(var(--p-angle)) translateY(0);      opacity: 0; }
    8%   { opacity: 1; }
    100% { transform: rotate(var(--p-angle)) translateY(-88px);  opacity: 0; }
}

.mpf__success-svg {
    position: relative;
    z-index: 1;
    width: 120px;
    height: 120px;
    display: block;
    transform-origin: center;
    overflow: visible;
    animation: mpf-svg-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.05s;
}

@keyframes mpf-svg-pop {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* Ring: circumference of r=54 ≈ 339.3 */
.mpf__success-ring {
    fill: none;
    stroke: #e03a1a;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 339.3;
    stroke-dashoffset: 339.3;
    filter: drop-shadow(0 0 10px rgba(224, 58, 26, 0.45));
    animation: mpf-ring 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.05s;
}

@keyframes mpf-ring {
    to { stroke-dashoffset: 0; }
}

.mpf__success-check {
    fill: none;
    stroke: #002856;            /* navy check on light bg */
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 75;
    stroke-dashoffset: 75;
    animation: mpf-check 0.45s ease forwards 0.65s;
}

@keyframes mpf-check {
    to { stroke-dashoffset: 0; }
}

/* Title & body */
.app-container .macring-product-form .mpf__success-title {
    margin: 0 0 12px;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 40px;
    font-weight: 600;
    line-height: 44px;
    letter-spacing: 0.4px;
    color: #002856;             /* navy on light bg */
    opacity: 0;
    animation: mpf-fade-up 0.5s ease forwards 1s;
}

.mpf__success-body {
    margin: 0;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    color: #6b7280;             /* grey on light bg */
    opacity: 0;
    animation: mpf-fade-up 0.5s ease forwards 1.2s;
}

@keyframes mpf-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Error X lines */
.mpf__success-x {
    fill: none;
    stroke: #002856;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 58;
    stroke-dashoffset: 58;
    animation: mpf-check 0.4s ease forwards 0.6s;
}

.mpf__success-x--b {
    animation-delay: 0.75s;
}

.mpf__success-graphic--shake {
    animation: mpf-graphic-shake 0.55s ease forwards 1s;
}

@keyframes mpf-graphic-shake {
    0%, 100% { transform: translateX(0);    }
    15%       { transform: translateX(-7px); }
    30%       { transform: translateX(7px);  }
    45%       { transform: translateX(-5px); }
    60%       { transform: translateX(5px);  }
    75%       { transform: translateX(-2px); }
    90%       { transform: translateX(2px);  }
}

/* Retry button — light theme */
.mpf__retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 10px 24px;
    background: transparent;
    border: 1px solid rgba(0, 40, 86, 0.2);
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.1px;
    color: rgba(0, 40, 86, 0.5);
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 180ms ease, color 180ms ease;
    opacity: 0;
    animation: mpf-fade-up 0.5s ease forwards 1.5s;
}

.mpf__retry-btn:hover,
.mpf__retry-btn:focus-visible {
    border-color: rgba(0, 40, 86, 0.45);
    color: #002856;
    outline: none;
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 767px) {
    .macring-product-form {
        padding: 64px 0;
    }

    .mpf__container {
        padding: 0 24px;
    }

    .mpf__card {
        padding: 28px 24px;
    }

    .app-container .macring-product-form .mpf__heading {
        font-size: 32px;
        line-height: 36px;
    }

    .macring-product-form .wpcf7-form label.half,
    .macring-product-form form label.half {
        width: 100%;
    }
}
