:root {
    --tcn-button-bg: #1f2937;
    --tcn-button-text: #ffffff;
    --tcn-popup-accent: #1f2937;
    --tcn-popup-bg: #ffffff;
}

.tcn-modal-open {
    overflow: hidden;
}

body.tcn-modal-open {
    overflow: hidden;
    width: 100%;
    touch-action: none;
}

.tcn-wrapper {
    position: relative;
    z-index: 999999;
}

.tcn-floating-button {
    position: fixed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--tcn-button-bg);
    color: var(--tcn-button-text);
    border: 0;
    border-radius: 999px;
    padding: 11px 15px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.15;
    max-width: min(calc(100vw - 24px), 320px);
    min-height: 42px;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.tcn-floating-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.tcn-floating-button__text {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tcn-floating-button__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.28);
}

.tcn-pos-bottom-right .tcn-floating-button { right: 20px; bottom: 20px; }
.tcn-pos-bottom-left .tcn-floating-button { left: 20px; bottom: 20px; }
.tcn-pos-top-right .tcn-floating-button { right: 20px; top: 20px; }
.tcn-pos-top-left .tcn-floating-button { left: 20px; top: 20px; }

.tcn-wrapper--header-cart,
.tcn-wrapper--social-bar {
    position: relative;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    vertical-align: middle;
    flex: 0 0 auto;
}

.tcn-wrapper--header-cart .tcn-floating-button,
.tcn-wrapper--social-bar .tcn-floating-button {
    position: static;
    padding: 7px 12px;
    min-height: 32px;
    font-size: 11px;
    border-radius: 999px;
    box-shadow: none;
    border: 1px solid rgba(15, 23, 42, 0.14);
    max-width: none;
    width: auto;
    white-space: nowrap;
}

.tcn-wrapper--social-bar .tcn-floating-button {
    background: rgba(31, 41, 55, 0.96);
}

.tcn-wrapper--header-cart .tcn-floating-button:hover,
.tcn-wrapper--social-bar .tcn-floating-button:hover {
    transform: translateY(-1px);
    box-shadow: none;
}

.tcn-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 1000001;
    max-width: min(calc(100vw - 32px), 560px);
    border-radius: 14px;
    padding: 14px 16px;
    font-weight: 700;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    background: #dcfce7;
    color: #166534;
}

.tcn-toast--error {
    background: #fee2e2;
    color: #991b1b;
}

.tcn-toast[hidden] {
    display: none !important;
}

.tcn-modal[hidden] {
    display: none !important;
}

.tcn-modal {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding: min(24px, 4vh) 0;
}

.tcn-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
}

.tcn-modal__dialog {
    position: relative;
    width: min(760px, calc(100vw - 24px));
    max-height: min(calc(100dvh - 48px), 860px);
    height: auto;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--tcn-popup-bg);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
}

.tcn-modal__header {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 22px 72px 14px 22px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, rgba(248,250,252,.98), rgba(255,255,255,.99));
}

.tcn-modal__header-copy {
    min-width: 0;
}

.tcn-modal__header h2 {
    margin: 0 0 6px;
    color: var(--tcn-popup-accent);
    font-size: clamp(22px, 2.5vw, 28px);
    line-height: 1.1;
}

.tcn-modal__header p {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}

.tcn-modal__pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--tcn-popup-accent);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.tcn-modal__close {
    position: absolute;
    right: 14px;
    top: 12px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    font-size: 26px;
    line-height: 1;
    color: #0f172a;
    background: rgba(255,255,255,.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.tcn-modal__close:hover,
.tcn-modal__close:focus-visible {
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
    transform: scale(1.03);
    outline: none;
}

.tcn-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tcn-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 22px 18px;
    display: grid;
    gap: 14px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.tcn-modal__body::-webkit-scrollbar {
    width: 10px;
}

.tcn-modal__body::-webkit-scrollbar-thumb {
    background: rgba(100,116,139,.45);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.tcn-modal__body::-webkit-scrollbar-track {
    background: transparent;
}

.tcn-section-card {
    display: grid;
    gap: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.tcn-section-card__header {
    display: grid;
    gap: 4px;
}

.tcn-section-card__header h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
    color: #0f172a;
}

.tcn-section-card__header p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.tcn-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.tcn-grid > label:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.tcn-form label,
.tcn-fieldset {
    display: grid;
    gap: 8px;
}

.tcn-form label > span,
.tcn-fieldset legend {
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
}

.tcn-form input[type="text"],
.tcn-form input[type="tel"],
.tcn-form input[type="date"],
.tcn-form select,
.tcn-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    box-sizing: border-box;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.tcn-form input[type="text"]:focus,
.tcn-form input[type="tel"]:focus,
.tcn-form input[type="date"]:focus,
.tcn-form select:focus,
.tcn-form textarea:focus {
    outline: none;
    border-color: rgba(30, 41, 59, .55);
    box-shadow: 0 0 0 4px rgba(15, 23, 42, .08);
}

.tcn-open-positions-list {
    display: grid;
    gap: 10px;
}

.tcn-open-position-item {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.tcn-open-position-item strong {
    font-size: 14px;
    color: #0f172a;
}

.tcn-open-position-item span {
    font-size: 12px;
    color: #64748b;
}

.tcn-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 14px;
    margin-bottom: 8px;
}

.tcn-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tcn-chip {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #dbe4ee;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
}

.tcn-chip input {
    margin: 0;
}

.tcn-fieldset {
    border: 1px solid #e2e8f0;
    padding: 12px 14px;
    border-radius: 14px;
    margin: 0;
}

.tcn-choice-group {
    background: #f8fafc;
}

.tcn-license-types small {
    color: #64748b;
    font-size: 12px;
}

.tcn-upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 16px;
    background: #f8fafc;
    transition: all .2s ease;
}

.tcn-upload-zone.is-dragover {
    border-color: var(--tcn-popup-accent);
    background: rgba(15, 23, 42, 0.03);
}

.tcn-upload-zone__label {
    cursor: pointer;
    display: grid;
    gap: 6px;
}

.tcn-upload-zone__label strong {
    font-size: 15px;
}

.tcn-upload-zone__label span,
.tcn-upload-zone__label small {
    color: #64748b;
    line-height: 1.45;
}

.tcn-upload-zone__filename {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.tcn-upload-zone__preview {
    margin-top: 12px;
}

.tcn-upload-zone__preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 14px;
    display: block;
}

.tcn-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.tcn-alert {
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 700;
}

.tcn-alert--error {
    background: #fee2e2;
    color: #991b1b;
}

.tcn-alert--success {
    background: #dcfce7;
    color: #166534;
}

.tcn-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px 22px;
    border-top: 1px solid #e2e8f0;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.98));
}

.tcn-actions--sticky {
    position: sticky;
    bottom: 0;
    z-index: 3;
}

.tcn-actions__meta {
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.tcn-submit-button {
    border: 0;
    border-radius: 12px;
    padding: 14px 18px;
    background: var(--tcn-popup-accent);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: opacity .18s ease, transform .18s ease;
}

.tcn-submit-button:hover {
    transform: translateY(-1px);
}

.tcn-submit-button[disabled] {
    cursor: wait;
    opacity: .72;
}

@media (max-width: 768px) {
    .tcn-grid {
        grid-template-columns: 1fr;
    }

    .tcn-modal__header {
        padding: 18px 58px 14px 18px;
    }

    .tcn-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tcn-submit-button {
        width: 100%;
    }
}
