:root {
    --tp-primary: #3f37c9;
    --tp-primary-soft: rgba(63, 55, 201, 0.08);
    --tp-accent: #ffb703;
    --tp-accent-soft: rgba(255, 183, 3, 0.14);
    --tp-bg: radial-gradient(circle at top left, #e0fbfc 0, #edf2ff 30%, #ffffff 100%);
    --tp-border-radius-lg: 22px;
}

@keyframes tpFloatBlob {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(10px, -8px, 0) scale(1.04);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes tpSoftGlow {
    0% {
        box-shadow: 0 10px 30px rgba(63, 55, 201, 0.28);
    }
    50% {
        box-shadow: 0 18px 40px rgba(63, 55, 201, 0.38);
    }
    100% {
        box-shadow: 0 10px 30px rgba(63, 55, 201, 0.28);
    }
}

body.tp-public-form-page header,
body.tp-public-form-page footer,
body.tp-public-form-page .o_header_standard,
body.tp-public-form-page .o_main_navbar,
body.tp-public-form-page .o_footer,
body.tp-public-form-page #wrapwrap > header,
body.tp-public-form-page #wrapwrap > footer {
    display: none !important;
}

/* Hide chat widget and assistance elements */
body.tp-public-form-page .o_livechat_button,
body.tp-public-form-page .o_website_livechat_button,
body.tp-public-form-page .o_livechat_widget,
body.tp-public-form-page .o_im_livechat_button,
body.tp-public-form-page [class*="livechat"],
body.tp-public-form-page [class*="chat"],
body.tp-public-form-page [id*="livechat"],
body.tp-public-form-page [id*="chat"],
body.tp-public-form-page .o_website_chat,
body.tp-public-form-page .o_website_livechat,
body.tp-public-form-page iframe[src*="livechat"],
body.tp-public-form-page iframe[src*="chat"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.tp-form-page {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tp-bg);
    padding: 3rem 0;
}

.tp-rtl-form {
    direction: rtl;
}

.tp-rtl-form input,
.tp-rtl-form select,
.tp-rtl-form textarea {
    text-align: right;
}

/* Better RTL layout for label + field rows */
.tp-rtl-form .tp-form-row {
    flex-direction: row-reverse;
}

.tp-rtl-form .tp-form-row .col-form-label {
    text-align: right;
}

/* RTL names table */
.tp-rtl-form .tp-names-table {
    direction: rtl;
}

.tp-rtl-form .tp-names-table th,
.tp-rtl-form .tp-names-table td {
    text-align: right;
}

.tp-form-card {
    width: 100%;
    max-width: 1100px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--tp-border-radius-lg);
    box-shadow: 0 20px 55px rgba(15, 35, 95, 0.22);
    overflow: hidden;
    position: relative;
}

.tp-form-card::before {
    content: "";
    position: absolute;
    inset-inline-end: -90px;
    inset-block-start: -90px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle at center, var(--tp-accent-soft) 0, transparent 65%);
    opacity: 0.9;
    pointer-events: none;
    mix-blend-mode: multiply;
    animation: tpFloatBlob 10s ease-in-out infinite alternate;
}

.tp-form-card::after {
    content: "";
    position: absolute;
    inset-inline-start: -120px;
    inset-block-end: -120px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle at center, rgba(63, 55, 201, 0.16) 0, transparent 65%);
    pointer-events: none;
    mix-blend-mode: multiply;
    animation: tpFloatBlob 14s ease-in-out infinite alternate-reverse;
}

.tp-form-header {
    padding: 2.2rem 2.5rem 1.5rem;
    border-bottom: 1px solid rgba(15, 35, 95, 0.06);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.tp-form-title {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
    color: #111827;
}

.tp-form-subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    color: #6b7c93;
}

.tp-form-badge {
    background: linear-gradient(120deg, var(--tp-primary-soft), rgba(63, 55, 201, 0.08));
    color: var(--tp-primary);
    border-radius: 999px;
    padding: 0.4rem 1.1rem;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.tp-form-badge i {
    font-size: 0.9rem;
}

.tp-form-body {
    padding: 1.75rem 2.5rem 2rem;
}

.tp-names-table {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(15, 35, 95, 0.06);
    margin-bottom: 1.75rem;
}

.tp-names-table thead tr {
    background: linear-gradient(135deg, #3f37c9, #0096c7);
    color: #ffffff;
}

.tp-names-table thead th {
    padding-block: 0.9rem;
    font-weight: 600;
    border-color: transparent;
}

.tp-names-table thead small {
    display: block;
    font-weight: 400;
    opacity: 0.8;
}

.tp-names-table tbody td {
    padding: 0.65rem 0.9rem;
    background-color: rgba(248, 250, 252, 0.9);
}

.tp-input {
    border-radius: 999px;
    border: 1px solid rgba(15, 35, 95, 0.14);
    padding: 0.55rem 1.05rem;
    font-size: 0.92rem;
    transition: all 0.18s ease-out;
    background-color: #ffffff;
}

.tp-input:focus {
    outline: none;
    border-color: var(--tp-primary);
    box-shadow: 0 0 0 0.1rem rgba(63, 55, 201, 0.22);
}

.tp-input::placeholder {
    color: #a0aec0;
}

/* Name inputs - smaller font for mobile */
.tp-names-table .tp-name-input {
    font-size: 0.85rem !important;
}

@media (max-width: 768px) {
    .tp-names-table .tp-name-input {
        font-size: 0.9rem !important;
        padding: 0.8rem 0.7rem !important;
        min-height: 48px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .tp-names-table .tp-name-input::placeholder {
        font-size: 0.8rem !important;
    }
    
    .tp-names-table thead th {
        font-size: 0.95rem !important;
        padding-block: 0.9rem !important;
    }
    
    .tp-names-table thead small {
        font-size: 0.8rem !important;
    }
    
    .tp-names-table tbody td {
        padding: 0.8rem 0.4rem !important;
        vertical-align: middle !important;
    }
    
    .tp-names-table {
        font-size: 0.9rem !important;
    }
}

.tp-label-main {
    font-weight: 600;
    color: #1a365d;
    font-size: 0.95rem;
}

.tp-label-sub {
    display: block;
    font-size: 0.8rem;
    color: #718096;
}

.tp-form-row {
    margin-bottom: 1rem;
}

.tp-form-row:last-of-type {
    margin-bottom: 0;
}

.tp-required::after {
    content: " *";
    color: #e53e3e;
}

.tp-submit-bar {
    padding: 1.25rem 2.5rem 2rem;
    border-top: 1px solid rgba(15, 35, 95, 0.06);
    display: flex;
    justify-content: center;
}

.tp-submit-btn {
    border-radius: 999px;
    padding: 0.7rem 3.4rem;
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #3f37c9, #4895ef);
    border: none;
    box-shadow: 0 10px 25px rgba(0, 89, 179, 0.45);
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, filter 0.15s;
}

.tp-submit-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 14px 32px rgba(0, 89, 179, 0.55);
}

.tp-submit-btn:active {
    transform: translateY(1px);
    box-shadow: 0 6px 18px rgba(0, 89, 179, 0.4);
}

.tp-error-message {
    font-size: 0.8rem;
    color: #e53e3e;
    margin-top: 0.25rem;
    display: none;
}

.tp-error .tp-input {
    border-color: #e53e3e;
}

.tp-error .tp-error-message {
    display: block;
}

.tp-thanks {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tp-bg);
}

.tp-thanks-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--tp-border-radius-lg);
    padding: 2.5rem 2.8rem;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 18px 45px rgba(15, 35, 95, 0.16);
}

.tp-thanks-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: var(--tp-primary-soft);
    color: var(--tp-primary);
    font-size: 1.6rem;
}

.tp-thanks-title {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #102a43;
}

.tp-thanks-text {
    color: #4a5568;
    margin-bottom: 0.3rem;
}

@media (max-width: 991.98px) {
    .tp-form-card {
        margin: 0 0.75rem;
    }

    .tp-form-header,
    .tp-form-body,
    .tp-submit-bar {
        padding-inline: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .tp-form-header {
        padding-top: 1.6rem;
        padding-bottom: 1.2rem;
    }

    .tp-form-title {
        font-size: 1.3rem;
    }

    .tp-names-table {
        font-size: 0.9rem;
    }
}


