/* stylelint-disable */
:root {
    --designer-blue: #2563eb;
    --designer-blue-dark: #1d4ed8;
    --designer-gray: #64748b;
    --designer-border: rgba(148, 163, 184, 0.35);
    --designer-shadow: rgba(15, 23, 42, 0.08);
    --designer-shadow-strong: rgba(15, 23, 42, 0.14);
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    background: linear-gradient(180deg, rgba(246, 247, 251, 0.95) 0%, rgba(236, 242, 255, 1) 100%);
    min-height: 100vh;
    margin: 0;
    color: #0f172a;
}

.preview-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2.75rem 1.75rem 3rem;
}

.template-preview-canvas {
    max-width: 960px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 48px -32px rgba(15, 23, 42, 0.45);
}

.template-preview-section {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    margin: 0;
    transition: box-shadow 0.2s ease;
}

.template-preview-section:last-child {
    border-bottom: none;
}

.template-preview-header {
    padding: 1.85rem 2rem 1.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    background: rgba(15, 23, 42, 0.015);
}

.template-preview-header h4 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.form-template-header {
    position: relative;
    overflow: hidden;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.form-template-header__surface {
    width: 100%;
    padding: 3.25rem clamp(2rem, 4vw, 3.75rem);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #ffffff;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.form-template-header__content {
    max-width: 720px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1;
}

.form-template-header__content--left {
    align-items: flex-start;
    text-align: left;
}

.form-template-header__content--center {
    align-items: center;
    text-align: center;
}

.form-template-header__content--right {
    align-items: flex-end;
    text-align: right;
}

.form-template-header__content h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.form-template-header__subtitle {
    margin: 0;
    font-size: clamp(1rem, 2.3vw, 1.2rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
}

.form-template-header__cta {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .75rem 1.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 16px 42px -26px rgba(15, 23, 42, 0.55);
}

.template-preview-header p {
    margin: 0;
    line-height: 1.55;
}

.template-preview-body {
    padding: 2rem;
    background: #ffffff;
    --field-border: rgba(59, 73, 223, 0.18);
    --label-color: #0f172a;
    --label-font: 0.95rem;
}

.template-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
}

.template-column {
    flex: 1 1 0;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.template-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0;
}

.template-field-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.template-field-label {
    font-weight: 600;
    color: var(--label-color, #0f172a);
    font-size: var(--label-font, 0.95rem);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0;
}

.template-field-label-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-required {
    color: #ef4444;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
}

.template-field-control {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.template-select,
.template-input,
.template-textarea,
.template-input-date,
.template-input-time {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--field-border, rgba(59, 73, 223, 0.18));
    border-radius: 12px;
    font-size: 0.94rem;
    padding: 0.75rem 1rem;
    color: #1f2937;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.template-select:focus,
.template-input:focus,
.template-textarea:focus,
.template-input-date:focus,
.template-input-time:focus {
    border-color: rgba(37, 99, 235, 0.5);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.15);
    outline: none;
}

.template-textarea {
    min-height: 120px;
    resize: vertical;
}

.template-radio-group,
.template-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.template-radio-group.template-inline,
.template-checkbox-group.template-inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.template-choice {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid var(--field-border, rgba(59, 73, 223, 0.18));
    border-radius: 0.75rem;
    padding: 0.6rem 0.85rem;
    background: rgba(59, 73, 223, 0.06);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    color: #1f2937;
    font-weight: 500;
}

.template-choice input {
    transform: scale(1.05);
    margin: 0;
}

.template-choice--empty {
    border: 1px dashed rgba(59, 73, 223, 0.2);
    background: rgba(148, 163, 184, 0.08);
    justify-content: center;
    font-style: italic;
    padding: 0.6rem 0.85rem;
}

.template-field-help {
    font-size: 0.85rem;
    color: #64748b;
    display: block;
    margin-top: 0.25rem;
}

.template-field-static {
    margin: 0;
    color: #1f2937;
}

.template-field-static--richtext {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: inherit;
    color: inherit;
}

.template-field-control--richtext {
    gap: 0;
}

.template-preview-hero {
    position: relative;
    border-bottom: none;
    padding: 3.75rem;
    color: #ffffff;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.45), rgba(59, 73, 223, 0.55));
}

.template-preview-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.15) 100%);
    z-index: 0;
}

.template-preview-hero .hero-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.template-preview-hero .hero-inner > * {
    color: inherit;
}

.template-preview-hero .hero-inner h1,
.template-preview-hero .hero-inner h2,
.template-preview-hero .hero-inner h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* stylelint-enable */
