<!DOCTYPE html>
<html lang="%%=v(@param_language)=%%">

<head>
    <meta charset="utf-8">
    <meta name="robots" content="noindex, nofollow">
    <meta name="googlebot" content="noindex, nofollow">
    <meta name="format-detection" content="telephone=no">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <!-- Page Metadata -->
    <title>%%=v(@ui_thankYouTitle)=%% | Zoetis</title>
    <meta name="title" content="%%=v(@ui_thankYouTitle)=%% | Zoetis">
    <meta name="description" content="%%=v(@ui_thankYouDescription)=%%">

    <!-- Favicon -->
    <link rel="shortcut icon" href="https://www.zoetis.com/global-assets/favicons/favicon.ico">

    <!-- Preload Critical Resources -->
    <link rel="preconnect" href="https://www.zoetis.com">
    <link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin>

    <!-- Preload Fonts -->
    <link rel="preload" href="https://www.zoetis.com/_assets/fonts/gothamnarrowbook_normal_condensed.woff2" as="font" type="font/woff2" crossorigin>
    <link rel="preload" href="https://www.zoetis.com/_assets/fonts/arboria-bold.woff2" as="font" type="font/woff2" crossorigin>

    <!-- External Resources -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/imask@7.1.3/dist/imask.min.css">

    <style>
        /* Base Styles & Design Tokens */
        :root {
            /* Color Palette */
            --color-brand-primary: #f65c00;
            --color-brand-secondary: #f87d33;
            --color-brand-dark: #d44700;
            --color-success: #6ba43a;
            --color-error: #c31c4a;
            --color-warning: #f5a623;

            /* Neutral Colors */
            --color-white: #ffffff;
            --color-black: #000000;
            --color-gray-50: #f6f5f4;
            --color-gray-100: #ededed;
            --color-gray-200: #dedede;
            --color-gray-300: #cccccc;
            --color-gray-400: #999999;
            --color-gray-500: #666666;
            --color-gray-600: #444444;
            --color-gray-700: #333333;

            /* Text Colors */
            --color-text-primary: var(--color-gray-700);
            --color-text-secondary: var(--color-gray-600);
            --color-text-muted: var(--color-gray-400);

            /* Background Colors */
            --color-background: var(--color-gray-50);
            --color-surface: var(--color-white);

            /* Border Colors */
            --color-border: var(--color-gray-200);
            --color-border-hover: var(--color-gray-300);
            --color-border-focus: var(--color-brand-primary);

            /* Spacing Scale */
            --space-1: 0.25rem;
            /* 4px  */
            --space-2: 0.5rem;
            /* 8px  */
            --space-3: 0.75rem;
            /* 12px */
            --space-4: 1rem;
            /* 16px */
            --space-5: 1.5rem;
            /* 24px */
            --space-6: 2rem;
            /* 32px */
            --space-8: 3rem;
            /* 48px */
            --space-10: 4rem;
            /* 64px */

            /* Typography */
            --font-family-heading: 'arboria', Arial, Helvetica, sans-serif;
            --font-family-base: 'gotham-narrow-book', Arial, Helvetica, sans-serif;

            /* Font Sizes */
            --font-size-xs: 0.75rem;
            /* 12px */
            --font-size-sm: 0.875rem;
            /* 14px */
            --font-size-base: 1rem;
            /* 16px */
            --font-size-lg: 1.125rem;
            /* 18px */
            --font-size-xl: 1.25rem;
            /* 20px */
            --font-size-2xl: 1.5rem;
            /* 24px */

            /* Line Heights */
            --line-height-tight: 1.2;
            --line-height-base: 1.5;
            --line-height-relaxed: 1.75;

            /* Border Radius */
            --radius-sm: 0.25rem;
            --radius-base: 0.375rem;
            --radius-lg: 0.5rem;
            --radius-xl: 1rem;

            /* Shadows */
            --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

            /* Transitions */
            --transition-base: 0.2s ease-in-out;
            --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

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

        html {
            font-size: 16px;
            -webkit-text-size-adjust: 100%;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        body {
            font-family: var(--font-family-base);
            font-size: var(--font-size-base);
            line-height: var(--line-height-tight);
            color: var(--color-text-primary);
            background-color: var(--color-background);
            min-height: 100vh;
        }

        /* Font Face Declarations */
        @font-face {
            font-family: 'gotham-narrow-book';
            src: url('https://www.zoetis.com/_assets/fonts/gothamnarrowbook_normal_condensed.woff2') format('woff2'),
                url('https://www.zoetis.com/_assets/fonts/gothamnarrowbook_normal_condensed.woff') format('woff');
            font-weight: 400;
        }

        @font-face {
            font-family: 'arboria';
            src: url('https://www.zoetis.com/_assets/fonts/arboria-bold.woff2') format('woff2'),
                url('https://www.zoetis.com/_assets/fonts/arboria-bold.woff') format('woff');
            font-weight: 400;
        }

        /* Layout */
        .layout {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            padding: var(--space-8) var(--space-4);
        }

        .main {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Loading State */
        .loading-state {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: var(--color-surface);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 100;
            opacity: 1;
            transition: opacity 0.3s ease-out;
        }

        .loading-state.hide {
            opacity: 0;
            pointer-events: none;
        }

        .loading-spinner {
            width: 50px;
            height: 50px;
        }

        /* Card Styles */
        .card {
            background-color: var(--color-surface);
            border-radius: var(--radius-xl);
            box-shadow: var(--shadow-lg);
            width: 100%;
            max-width: 500px;
            margin: 0 auto;
            overflow: hidden;
            opacity: 0;
            transform: translateY(20px);
            animation: slideUp 0.6s ease-out forwards;
            animation-delay: 0.3s;
        }

        .card__brand {
            padding: var(--space-5) var(--space-6);
            text-align: center;
            border-bottom: 1px solid var(--color-border);
            opacity: 0;
            animation: fadeIn 0.6s ease-out forwards;
            animation-delay: 0.6s;
        }

        .brand-logo {
            height: 32px;
            width: auto;
            fill: var(--color-brand-primary);
            transition: fill var(--transition-base);
        }

        .brand-logo:hover {
            fill: var(--color-brand-secondary);
        }

        .card__header {
            padding: var(--space-6);
            text-align: center;
        }

        .card__title {
            font-family: var(--font-family-heading);
            color: var(--color-brand-primary);
            font-size: var(--font-size-2xl);
            margin-bottom: var(--space-2);
            line-height: var(--line-height-tight);
            opacity: 0;
            animation: fadeIn 0.6s ease-out forwards;
            animation-delay: 1.2s;
        }

        .card__description {
            color: var(--color-text-secondary);
            font-size: var(--font-size-base);
            line-height: var(--line-height-base);
            opacity: 0;
            animation: fadeIn 0.6s ease-out forwards;
            animation-delay: 1.4s;
        }

        .card__body {
            padding: 0 var(--space-6) var(--space-6);
        }

        /* Form Styles */
        .form__group {
            position: relative;
            margin-bottom: var(--space-4);
        }

        .form__label {
            display: block;
            margin-bottom: var(--space-2);
            color: var(--color-text-secondary);
            font-size: var(--font-size-sm);
            font-weight: 500;
        }

        .required-indicator {
            color: var(--color-error);
            margin-left: var(--space-1);
        }

        .form__input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .form__input-prefix {
            position: absolute;
            left: var(--space-4);
            color: var(--color-text-muted);
            font-size: var(--font-size-base);
            pointer-events: none;
        }

        .form__input {
            width: 100%;
            min-height: 48px;
            padding: var(--space-3) var(--space-4);
            padding-left: calc(var(--space-4) + 2.5em);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-base);
            font-size: var(--font-size-base);
            color: var(--color-text-primary);
            background-color: var(--color-surface);
            transition: all var(--transition-base);
        }

        .form__input:hover {
            border-color: var(--color-border-hover);
        }

        .form__input:focus {
            outline: none;
            border-color: var(--color-border-focus);
            box-shadow: 0 0 0 3px rgba(246, 92, 0, 0.1);
        }

        .form__input.error {
            border-color: var(--color-error);
            box-shadow: 0 0 0 1px var(--color-error);
        }

        /* Checkbox Styles */
        .checkbox-container {
            margin-bottom: var(--space-5);
        }

        .checkbox {
            display: flex;
            align-items: flex-start;
            gap: var(--space-3);
        }

        .checkbox__input {
            margin-top: 0.3em;
            width: 1.25em;
            height: 1.25em;
        }

        .checkbox__label {
            font-size: var(--font-size-sm);
            color: var(--color-text-secondary);
            line-height: var(--line-height-relaxed);
        }

        /* Error Message Styles */
        .form__error {
            display: none;
            color: var(--color-error);
            font-size: var(--font-size-sm);
            margin-top: var(--space-2);
            opacity: 0;
            transform: translateY(-2px);
            transition: opacity 0.2s ease, transform 0.2s ease;
        }

        .form__error.visible {
            display: block;
            opacity: 1;
            transform: translateY(0);
        }

        /* Button Styles */
        .button {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            min-height: 48px;
            padding: var(--space-3) var(--space-4);
            background-color: var(--color-brand-primary);
            color: var(--color-white);
            border: none;
            border-radius: var(--radius-base);
            font-family: var(--font-family-brand);
            font-size: var(--font-size-base);
            cursor: pointer;
            transition: all var(--transition-base);
        }

        .button:hover {
            background-color: var(--color-brand-secondary);
        }

        .button:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(246, 92, 0, 0.3);
        }

        .button:disabled {
            opacity: 0.7;
            cursor: not-allowed;
        }

        /* Loading State */
        .button__loading {
            display: none;
        }

        .button.loading .button__text {
            display: none;
        }

        .button.loading .button__loading {
            display: inline-block;
        }

        /* Status Icon Styles */
        .status-icon {
            display: flex;
            justify-content: center;
            margin-bottom: var(--space-4);
            opacity: 0;
            animation: fadeIn 0.6s ease-out forwards;
            animation-delay: 0.9s;
        }

        .icon {
            width: 64px;
            height: 64px;
            stroke-width: 2;
        }

        .icon--success {
            stroke: var(--color-success);
            stroke-dasharray: 100;
            stroke-dashoffset: 100;
            animation: checkmark 0.8s cubic-bezier(0.65, 0, 0.45, 1) forwards;
            animation-delay: 1s;
        }

        .icon--error {
            stroke: var(--color-error);
            transform: scale(0.8) rotate(-45deg);
            opacity: 0;
            animation: errormark 0.8s cubic-bezier(0.65, 0, 0.45, 1) forwards;
            animation-delay: 1s;
        }

        /* State-specific styles */
        .success-state .card__title {
            color: var(--color-success);
        }

        .error-state .card__title {
            color: var(--color-error);
        }

        /* Info Box Styles */
        .info-box {
            background-color: var(--color-gray-50);
            border-radius: var(--radius-lg);
            padding: var(--space-5);
            margin-top: var(--space-4);
            opacity: 0;
            animation: fadeIn 0.6s ease-out forwards;
            animation-delay: 1.6s;
        }

        .info-box__title {
            font-family: var(--font-family-heading);
            font-size: var(--font-size-lg);
            color: var(--color-text-primary);
            margin-bottom: var(--space-3);
        }

        .info-box__list {
            list-style-position: inside;
            color: var(--color-text-secondary);
        }

        .info-box__list li {
            margin-bottom: var(--space-2);
            line-height: var(--line-height-relaxed);
        }

        .info-box__list li:last-child {
            margin-bottom: 0;
        }

        /* Image Gallery */
        .image-gallery {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: var(--space-5);
            padding: var(--space-4);
            background-color: var(--color-gray-50);
            border-top: 1px solid var(--color-border);
        }

        .card__footer {
            opacity: 0;
            animation: fadeIn 0.6s ease-out forwards;
            animation-delay: 1.8s;
        }

        .image-gallery__item {
            flex: 1;
            max-width: 160px;
        }

        .image-gallery__image {
            width: 100%;
            height: auto;
            border-radius: var(--radius-base);
            transition: transform var(--transition-base);
        }

        .image-gallery__image:hover {
            transform: translateY(-2px);
        }

        /* Footer Styles */
        .footer {
            text-align: center;
            padding: var(--space-6) 0 var(--space-4);
            color: var(--color-text-muted);
            font-size: var(--font-size-sm);
            opacity: 0;
            animation: fadeIn 0.6s ease-out forwards;
            animation-delay: 2s;
        }

        /* Animations */
        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes checkmark {
            0% {
                stroke-dashoffset: 100;
            }

            100% {
                stroke-dashoffset: 0;
            }
        }

        @keyframes errormark {
            0% {
                opacity: 0;
                transform: scale(0.8) rotate(-45deg);
            }

            50% {
                transform: scale(1.2) rotate(-45deg);
            }

            100% {
                opacity: 1;
                transform: scale(1) rotate(0deg);
            }
        }

        @keyframes shake {

            0%,
            100% {
                transform: translateX(0);
            }

            25% {
                transform: translateX(-5px);
            }

            75% {
                transform: translateX(5px);
            }
        }

        @keyframes rotate {
            100% {
                transform: rotate(360deg);
            }
        }

        @keyframes dash {
            0% {
                stroke-dasharray: 1, 150;
                stroke-dashoffset: 0;
            }

            50% {
                stroke-dasharray: 90, 150;
                stroke-dashoffset: -35;
            }

            100% {
                stroke-dasharray: 90, 150;
                stroke-dashoffset: -124;
            }
        }

        /* Accessibility */
        .visually-hidden {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        /* Debug Mode Styles */
        .debug .debug-info {
            font-family: monospace;
            font-size: var(--font-size-xs);
            color: var(--color-text-muted);
            background-color: var(--color-gray-50);
            padding: var(--space-2);
            border-radius: var(--radius-sm);
            margin-top: var(--space-2);
        }

        /* Responsive Styles */
        @media (max-width: 640px) {
            .layout {
                padding: var(--space-4);
            }

            .card {
                margin: var(--space-4) 0;
            }

            .card__brand {
                padding: var(--space-4);
            }

            .card__header {
                padding: var(--space-4);
            }

            .card__body {
                padding: 0 var(--space-4) var(--space-4);
            }

            .info-box {
                padding: var(--space-4);
            }

            .image-gallery {
                flex-direction: column;
                gap: var(--space-4);
            }

            .image-gallery__item {
                max-width: 120px;
            }

            .icon {
                width: 48px;
                height: 48px;
            }
        }

        /* Print Styles */
        @media print {
            .card {
                box-shadow: none;
            }

            .button {
                display: none;
            }

            .loading-state {
                display: none;
            }
        }
    </style>
</head>

<body class="%%=IIF(@cfg_debugMode == 'true', 'debug', '')=%%">
    <!-- Page Container -->
    <div class="layout">
        <!-- Main Content -->
        <main class="main" role="main">
            <!-- Loading State -->
            <div class="loading-state">
                <div class="loading-spinner">
                    <svg viewBox="0 0 50 50" class="spinner">
                        <circle class="spinner__path" cx="25" cy="25" r="20" fill="none" stroke-width="5"></circle>
                    </svg>
                </div>
            </div>
            <!-- Thank You Card -->
            <div class="card">
                <!-- Card Brand -->
                <header class="card__brand" role="banner">
                    <svg xmlns="http://www.w3.org/2000/svg" fill="#f65c00" viewBox="0 0 85 33" class="brand-logo" role="img" aria-label="Zoetis Logo">
                        <path d="m34.218 23.702 1.98 2.815c-1.308 1.326-5.921 5.485-12.823 5.485-9.735 0-10.353-7.192-20.033-7.192H.509L0 21.886l10.952-11.152h-8.5l.654-3.433h13.912l-.6 3.142L5.795 21.286c8.155 0 10.153 7.356 18.144 7.356 4.886-.018 8.881-3.414 10.28-4.94" />
                        <path d="M26.935 6.902c-5.976 0-10.098 5.14-10.098 11.079 0 4.177 2.724 7.228 7.156 7.228 5.975 0 10.134-5.103 10.134-11.042 0-3.887-2.47-7.265-7.192-7.265m-2.361 15.074c-2.125 0-3.415-1.689-3.415-4.104 0-3.27 1.944-7.737 5.285-7.737 2.561 0 3.342 2.234 3.342 4.032 0 3.487-2.088 7.81-5.212 7.81m27.189-10.153c0-2.906-2.198-4.922-5.649-4.922-6.048 0-9.916 5.757-9.916 11.042 0 4.287 2.343 7.265 7.192 7.265 2.125 0 4.468-.508 6.193-1.398l-.4-3.051c-1.252.653-2.833 1.144-4.812 1.144-1.653 0-2.906-.618-3.596-1.798-.4-.69-.545-1.871-.473-2.488 6.757.145 11.46-1.29 11.46-5.794m-6.175-1.798c1.325 0 2.234.69 2.234 1.798v.036c0 2.089-2.761 2.688-7.084 2.634.49-2.125 2.216-4.468 4.85-4.468m35.054 0c1.435 0 2.634.436 3.27.799L85 7.81c-.8-.472-2.307-.908-4.141-.908-4.141 0-7.083 2.379-7.083 5.757 0 2.016 1.434 3.487 3.45 4.559 1.726.89 2.307 1.58 2.307 2.688 0 1.144-.999 2.125-2.688 2.161-1.58 0-3.305-.69-4.214-1.18l-1.071 3.015c.926.69 2.833 1.253 4.886 1.29 4.213 0 7.446-2.162 7.446-6.013 0-2.233-1.725-3.668-3.632-4.704-1.472-.762-2.27-1.434-2.27-2.415 0-1.163 1.07-2.034 2.651-2.034M68.363 2.56c0-1.506 1.144-2.56 2.525-2.56 1.29 0 2.234.944 2.234 2.27-.037 1.544-1.18 2.525-2.597 2.525h-.055c-1.253-.018-2.107-.945-2.107-2.235m-3.941 22.25h4.177L71.942 7.3h-4.16zm-4.45-2.96c-1.235 0-1.87-.763-1.562-2.325l1.78-8.99h3.923l.654-3.234h-3.96l.872-4.486-4.322 1.253-.654 3.233h-2.452l-.636 3.233h2.452l-1.816 9.245c-.636 3.324 1.035 5.412 4.868 5.412.871 0 1.834-.2 2.742-.436l.145-3.25c-.69.2-1.362.344-2.034.344" />
                    </svg>
                </header>

                <!-- Card Content -->
                <div class="card__content">
                    <!-- Card Header -->
                    <div class="card__header %%=IIF(@cfg_debugMode == "0" AND (@param_error == "1" OR Empty(@param_subscriberKey)), 'error-state', 'success-state')=%%">
                        <div class="status-icon">
                            %%[IF @cfg_debugMode == "0" AND (@param_error == "1" OR Empty(@param_subscriberKey)) THEN]%%
                            <!-- Error Icon -->
                            <svg class="icon icon--error" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
                                <circle cx="12" cy="12" r="10" />
                                <line x1="15" y1="9" x2="9" y2="15" />
                                <line x1="9" y1="9" x2="15" y2="15" />
                            </svg>
                            %%[ELSE]%%
                            <!-- Success Icon -->
                            <svg class="icon icon--success" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
                                <path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" />
                                <polyline points="22 4 12 14.01 9 11.01" />
                            </svg>
                            %%[ENDIF]%%
                        </div>
                        <h1 id="page-title" class="card__title">%%=v(@ui_thankYouTitle)=%%</h1>
                        <p class="card__description">%%=v(@ui_thankYouDescription)=%%</p>
                    </div>
                </div>

                <!-- Card Footer with Images -->
                %%[IF @ui_thankYouLeftImg != '' OR @ui_thankYouSocialImg != '' THEN]%%
                <footer class="card__footer">
                    <div class="image-gallery" role="presentation">
                        %%[IF @ui_thankYouLeftImg != '' THEN]%%
                        <div class="image-gallery__item">
                            <img src="%%=v(@ui_thankYouLeftImg)=%%" alt="" class="image-gallery__image" loading="lazy">
                        </div>
                        %%[ENDIF]%%
                        %%[IF @ui_thankYouSocialImg != '' THEN]%%
                        <div class="image-gallery__item">
                            <img src="%%=v(@ui_thankYouSocialImg)=%%" alt="" class="image-gallery__image" loading="lazy">
                        </div>
                        %%[ENDIF]%%
                    </div>
                </footer>
                %%[ENDIF]%%
            </div>
        </main>

        <!-- Page Footer -->
        <footer class="footer" role="contentinfo">
            <p class="footer__copyright">
                Copyright &copy; Zoetis Services LLC 2013-%%=FormatDate(@cfg_timestamp,"YYYY")=%% All rights reserved.
            </p>
        </footer>
    </div>

    <script>
        (function () {
            // Show loading state initially
            const loadingState = document.querySelector('.loading-state');

            // Hide loading state after content is ready
            window.addEventListener('load', function () {
                // Small delay to ensure animations are ready
                setTimeout(function () {
                    loadingState.classList.add('hide');
                }, 300);
            });

            // Fallback: Hide loading state after 3 seconds even if load event doesn't fire
            setTimeout(function () {
                loadingState.classList.add('hide');
            }, 3000);
        })();
    </script>
</body>

</html>