/* ──────────────────────────────────────────────────────────
   Detam Lead Chatbot — Public Widget Styles
   All classes prefixed with .dlc- to avoid theme conflicts
   ────────────────────────────────────────────────────────── */

/* ── CSS Variables (overridden by inline style from PHP) ─── */
:root {
    --dlc-primary:     #e63946;
    --dlc-btn:         #e63946;
    --dlc-header:      #e63946;
    --dlc-text:        #1d1d1f;
    --dlc-text-light:  #6e6e73;
    --dlc-bg:          #ffffff;
    --dlc-msg-bot-bg:  #f1f1f6;
    --dlc-msg-user-bg: #e63946;
    --dlc-radius:      16px;
    --dlc-shadow:      0 8px 32px rgba(0,0,0,.18);
}

/* ── Widget container ────────────────────────────────────── */
.dlc-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    box-sizing: border-box;
}

.dlc-chat-widget *,
.dlc-chat-widget *::before,
.dlc-chat-widget *::after {
    box-sizing: border-box;
}

/* ── Toggle button ───────────────────────────────────────── */
.dlc-chat-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--dlc-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--dlc-shadow);
    transition: transform .2s, background .2s;
    outline: none;
    position: relative;
    z-index: 1;
}

.dlc-chat-toggle:hover {
    transform: scale(1.08);
}

/* ── AI Sparkle icon — modern "AI is here" indicator ──────────────── */
.dlc-chat-toggle-sparkle {
    overflow: visible;
    background: linear-gradient(135deg, var(--dlc-primary, #1f3a8a) 0%, #2563eb 50%, #6366f1 100%);
}

/* Soft animated halo behind the button */
.dlc-chat-toggle-sparkle::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, .55) 0%, rgba(99, 102, 241, 0) 70%);
    z-index: -1;
    animation: dlc-sparkle-halo 2.6s ease-in-out infinite;
    pointer-events: none;
}

.dlc-toggle-icon-sparkle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.dlc-toggle-icon-sparkle svg {
    position: absolute;
    display: block;
    fill: #fff;
    stroke: none;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, .35));
}

.dlc-sparkle-main {
    width: 30px;
    height: 30px;
    top: 50%;
    left: 50%;
    transform-origin: center;
    animation: dlc-sparkle-pulse 3.2s ease-in-out infinite;
}

.dlc-sparkle-mini {
    width: 14px;
    height: 14px;
    top: 8px;
    right: 6px;
    transform-origin: center;
    opacity: .9;
    animation: dlc-sparkle-mini-twinkle 2.4s ease-in-out infinite;
    animation-delay: .4s;
}

@keyframes dlc-sparkle-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) rotate(180deg) scale(1.12);
        opacity: .95;
    }
}

@keyframes dlc-sparkle-mini-twinkle {
    0%, 100% {
        transform: scale(.85) rotate(0deg);
        opacity: .55;
    }
    50% {
        transform: scale(1.25) rotate(90deg);
        opacity: 1;
    }
}

@keyframes dlc-sparkle-halo {
    0%, 100% {
        transform: scale(1);
        opacity: .55;
    }
    50% {
        transform: scale(1.18);
        opacity: .85;
    }
}

/* When chat panel is open, calm the sparkle (still visible, no animation) */
.dlc-chat-widget.dlc-chat-open .dlc-chat-toggle-sparkle::before { display: none; }
.dlc-chat-widget.dlc-chat-open .dlc-sparkle-main,
.dlc-chat-widget.dlc-chat-open .dlc-sparkle-mini { animation: none; }

@media (prefers-reduced-motion: reduce) {
    .dlc-sparkle-main,
    .dlc-sparkle-mini,
    .dlc-chat-toggle-sparkle::before { animation: none; }
}

.dlc-smart-form-card {
    align-self: stretch;
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
    scroll-margin: 16px;
    transition: box-shadow .4s ease, border-color .4s ease;
}

/* Brief highlight pulse when the user is directed to this card again */
.dlc-smart-form-card.dlc-card-pulse {
    animation: dlc-card-pulse 1.6s ease-out 1;
    border-color: var(--dlc-primary, #1f3a8a);
}

@keyframes dlc-card-pulse {
    0%   { box-shadow: 0 8px 22px rgba(15, 23, 42, .08), 0 0 0 0 rgba(31, 58, 138, .6); }
    25%  { box-shadow: 0 8px 22px rgba(15, 23, 42, .08), 0 0 0 8px rgba(31, 58, 138, .25); }
    100% { box-shadow: 0 8px 22px rgba(15, 23, 42, .08), 0 0 0 14px rgba(31, 58, 138, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .dlc-smart-form-card.dlc-card-pulse { animation: none; }
}

.dlc-smart-form-card.dlc-card-submitted {
    opacity: .65;
    background: #f8fafc;
    border-color: #cbd5e1;
}

.dlc-smart-form-card.dlc-card-submitted .dlc-accordion-title-text {
    color: #065f46;
    font-weight: 700;
}

.dlc-scroll-bottom {
    position: absolute;
    right: 12px;
    bottom: 86px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity .18s, transform .18s;
    padding: 0;
    z-index: 5;
}

.dlc-scroll-bottom svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dlc-scroll-bottom:hover {
    background: #f8fafc;
    color: #0f172a;
}

.dlc-scroll-bottom-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dlc-smart-form-error:not(:empty) {
    display: block;
    margin-bottom: 10px;
    padding: 9px 10px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff1f2;
    color: #991b1b;
    font-size: 13px;
}

.dlc-smart-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.dlc-smart-form-grid label,
.dlc-smart-kvkk {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
}

.dlc-smart-form-grid input,
.dlc-smart-form-grid select {
    width: 100%;
    min-height: 40px;
    border: 1.5px solid #94a3b8;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    caret-color: #000;
    font-size: 14px;
    font-weight: 600;
    transition: border-color .15s, box-shadow .15s;
}

.dlc-smart-form-grid input:hover,
.dlc-smart-form-grid select:hover {
    border-color: #64748b;
}

.dlc-smart-form-grid input:focus,
.dlc-smart-form-grid select:focus {
    outline: none;
    border-color: var(--dlc-primary, #1f3a8a);
    box-shadow: 0 0 0 3px rgba(31, 58, 138, 0.12);
}

.dlc-smart-form-grid input::placeholder {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    opacity: 1 !important;
    font-weight: 500;
}

.dlc-smart-form-grid input:not(:placeholder-shown),
.dlc-smart-form-grid select:valid {
    border-color: #64748b;
}

/* Force black text + white background on Chrome/Edge autofill so prefilled values
   don't show up as light-grey on the yellow autofill tint. */
.dlc-smart-form-grid input:-webkit-autofill,
.dlc-smart-form-grid input:-webkit-autofill:hover,
.dlc-smart-form-grid input:-webkit-autofill:focus,
.dlc-smart-form-grid input:-webkit-autofill:active,
.dlc-smart-form-grid select:-webkit-autofill,
.dlc-smart-form-grid input:autofill,
.dlc-smart-form-grid select:autofill {
    -webkit-text-fill-color: #000 !important;
    color: #000 !important;
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    background-color: #fff !important;
    background-image: none !important;
    caret-color: #000 !important;
    font-weight: 600 !important;
    transition: background-color 99999s ease-out 0s !important;
    -webkit-transition: background-color 99999s ease-out 0s !important;
}

.dlc-employee-wheel,
.dlc-service-wheel {
    display: grid;
    grid-template-columns: 1fr 34px 86px 34px;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.dlc-apply-all-services {
    display: block;
    width: 100%;
    margin-top: 8px;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.dlc-apply-all-services:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.dlc-apply-all-services:active {
    background: #e2e8f0;
}

.dlc-wheel-label,
.dlc-service-wheel > span {
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.dlc-employee-wheel button,
.dlc-service-wheel button {
    width: 34px;
    height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
}

.dlc-wheel-values {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    align-items: center;
    text-align: center;
    min-height: 38px;
}

.dlc-wheel-values span {
    color: #94a3b8;
    font-size: 13px;
}

.dlc-wheel-values strong,
.dlc-wheel-values input[type="number"] {
    color: #000;
    -webkit-text-fill-color: #000;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    background: transparent;
    border: 0;
    padding: 0;
    width: 100%;
    min-width: 0;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.dlc-wheel-values input[type="number"]::-webkit-outer-spin-button,
.dlc-wheel-values input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dlc-wheel-values input[type="number"]:focus {
    outline: 2px solid var(--dlc-primary, #1f3a8a);
    outline-offset: 2px;
    border-radius: 4px;
}

.dlc-service-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.dlc-accordion-item {
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.dlc-accordion-title {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 40px;
    padding: 9px 10px;
    border: 0;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    text-align: left;
}

.dlc-accordion-title-text {
    flex: 1;
    min-width: 0;
}

.dlc-accordion-icon {
    flex: 0 0 auto;
}

.dlc-service-badge {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.dlc-service-badge-required {
    background: #dcfce7;
    color: #166534;
}

.dlc-service-badge-optional {
    background: #fff7ed;
    color: #9a3412;
}

.dlc-nace-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #fff;
}

.dlc-nace-card label {
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.dlc-nace-result:not(:empty) {
    display: grid;
    gap: 3px;
    padding: 9px 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
    animation: dlc-appear-up .32s ease both;
}

.dlc-nace-result span,
.dlc-nace-result small {
    color: #475569;
    font-size: 12px;
}

.dlc-nace-result strong {
    color: #0f172a;
    font-size: 15px;
}

.dlc-danger-az_tehlikeli { color: #15803d !important; }
.dlc-danger-tehlikeli { color: #b45309 !important; }
.dlc-danger-cok_tehlikeli { color: #b91c1c !important; }

.dlc-accordion-panel {
    display: none;
    padding: 10px;
}

.dlc-accordion-open .dlc-accordion-panel {
    display: block;
}

.dlc-service-step,
.dlc-quote-summary,
.dlc-summary-card,
.dlc-success-screen,
.dlc-smart-actions {
    animation: dlc-appear-up .38s ease both;
}

.dlc-service-step > *,
.dlc-quote-summary > section,
.dlc-summary-card > *,
.dlc-success-screen > *,
.dlc-smart-actions > * {
    animation: dlc-appear-up .34s ease both;
}

.dlc-service-step > *:nth-child(2),
.dlc-quote-summary > section:nth-child(2),
.dlc-summary-card > *:nth-child(2),
.dlc-success-screen > *:nth-child(2),
.dlc-smart-actions > *:nth-child(2) { animation-delay: .06s; }

.dlc-service-step > *:nth-child(3),
.dlc-quote-summary > section:nth-child(3),
.dlc-summary-card > *:nth-child(3),
.dlc-success-screen > *:nth-child(3),
.dlc-smart-actions > *:nth-child(3) { animation-delay: .12s; }

.dlc-service-step > *:nth-child(4),
.dlc-quote-summary > section:nth-child(4),
.dlc-summary-card > *:nth-child(4),
.dlc-success-screen > *:nth-child(4),
.dlc-smart-actions > *:nth-child(4) { animation-delay: .18s; }

.dlc-accordion-panel ul {
    margin: 0 0 8px 18px;
    padding: 0;
    color: #334155;
    font-size: 13px;
}

.dlc-service-wheel {
    grid-template-columns: 1fr 32px 82px 32px;
    margin-top: 8px;
}

.dlc-service-wheel-fixed {
    grid-template-columns: 1fr auto;
}

.dlc-smart-kvkk {
    flex-direction: row;
    align-items: flex-start;
    margin-top: 10px;
}

.dlc-smart-form-actions {
    margin-top: 10px;
}

.dlc-smart-quote-shell .dlc-accordion-panel > * {
    animation: dlc-appear-up .34s ease both;
}

.dlc-smart-quote-shell .dlc-accordion-panel > *:nth-child(1) { animation-delay: .05s; }
.dlc-smart-quote-shell .dlc-accordion-panel > *:nth-child(2) { animation-delay: .12s; }
.dlc-smart-quote-shell .dlc-accordion-panel > *:nth-child(3) { animation-delay: .19s; }
.dlc-smart-quote-shell .dlc-accordion-panel > *:nth-child(4) { animation-delay: .26s; }
.dlc-smart-quote-shell .dlc-accordion-panel > *:nth-child(5) { animation-delay: .33s; }

@media (max-width: 520px) {
    .dlc-smart-form-grid {
        grid-template-columns: 1fr;
    }

    .dlc-employee-wheel,
    .dlc-service-wheel {
        grid-template-columns: 1fr 32px 78px 32px;
    }
}

.dlc-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.dlc-toggle-icon-svg svg {
    width: 28px;
    height: 28px;
    display: block;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Chat panel ──────────────────────────────────────────── */
.dlc-chat-panel {
    position: absolute;
    bottom: 68px;
    right: 0;
    width: 370px;
    max-width: calc(100vw - 24px);
    height: 560px;
    max-height: calc(100vh - 100px);
    background: var(--dlc-bg);
    border-radius: var(--dlc-radius);
    box-shadow: var(--dlc-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .25s;
}

.dlc-chat-panel[aria-hidden="true"] {
    transform: scale(.85);
    opacity: 0;
    pointer-events: none;
}

.dlc-chat-panel[aria-hidden="false"] {
    transform: scale(1);
    opacity: 1;
}

.dlc-chat-panel-wide {
    width: 720px;
    height: 680px;
    max-width: calc(100vw - 24px);
}

/* ── Header ──────────────────────────────────────────────── */
.dlc-chat-header {
    background: var(--dlc-header);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-top-left-radius: var(--dlc-radius);
    border-top-right-radius: var(--dlc-radius);
}

.dlc-chat-header-title {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0;
    line-height: 1.25;
    padding-right: 10px;
}

.dlc-chat-clear,
.dlc-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    opacity: .85;
    transition: opacity .15s;
}

.dlc-chat-clear {
    margin-left: auto;
    font-size: 18px;
    font-weight: 700;
}

.dlc-chat-clear:hover,
.dlc-chat-close:hover {
    opacity: 1;
}

/* ── Messages area ───────────────────────────────────────── */
.dlc-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

/* ── Message bubbles ─────────────────────────────────────── */
.dlc-message {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.55;
    word-break: break-word;
    animation: dlc-appear-up .38s ease both;
}

@keyframes dlc-appear-up {
    from { transform: translateY(10px) scale(.98); opacity: 0; }
    to   { transform: translateY(0) scale(1);  opacity: 1; }
}

.dlc-message-bot {
    background: var(--dlc-msg-bot-bg);
    color: var(--dlc-text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    white-space: normal;
    line-height: 1.5;
}

.dlc-message-user {
    background: var(--dlc-msg-user-bg);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* ── Typing indicator ────────────────────────────────────── */
.dlc-typing {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 12px 14px;
}

.dlc-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--dlc-text-light);
    animation: dlc-bounce .8s infinite;
}

.dlc-typing span:nth-child(2) { animation-delay: .15s; }
.dlc-typing span:nth-child(3) { animation-delay: .3s; }

@keyframes dlc-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40%           { transform: translateY(-6px); }
}

/* ── Input area ──────────────────────────────────────────── */
.dlc-chat-input-area {
    padding: 12px 14px;
    border-top: 1px solid #e8e8ed;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Text input row ──────────────────────────────────────── */
.dlc-input-row {
    display: flex;
    gap: 8px;
}

.dlc-input {
    flex: 1;
    min-width: 0;
    border: 1.5px solid #d2d2d7;
    border-radius: 10px;
    padding: 9px 13px;
    font-size: 14px;
    color: #000;
    background: #fff;
    outline: none;
    transition: border-color .2s;
    font-family: inherit;
    resize: none;
    min-height: 42px;
    line-height: 1.35;
    caret-color: #000;
}

.dlc-chat-widget input.dlc-input,
.dlc-chat-widget textarea.dlc-input {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    font-weight: 600 !important;
    opacity: 1 !important;
}

.dlc-chat-widget input.dlc-input:focus,
.dlc-chat-widget textarea.dlc-input:focus {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
}

.dlc-chat-widget input.dlc-input:-webkit-autofill,
.dlc-chat-widget input.dlc-input:-webkit-autofill:hover,
.dlc-chat-widget input.dlc-input:-webkit-autofill:focus,
.dlc-chat-widget textarea.dlc-input:-webkit-autofill {
    -webkit-text-fill-color: #000 !important;
    color: #000 !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    caret-color: #000 !important;
    font-weight: 600 !important;
    transition: background-color 99999s ease-out 0s !important;
}

.dlc-textarea {
    display: block;
    height: 72px;
    padding-top: 10px;
    vertical-align: top;
}

.dlc-input::placeholder {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    opacity: 1 !important;
}

.dlc-chat-widget input.dlc-input::placeholder,
.dlc-chat-widget textarea.dlc-input::placeholder {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    opacity: 1 !important;
}

.dlc-input:focus {
    border-color: var(--dlc-primary);
}

/* ── Buttons ─────────────────────────────────────────────── */
.dlc-btn-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dlc-option-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--dlc-btn);
    background: #fff;
    color: var(--dlc-btn);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: background .18s, color .18s;
    white-space: nowrap;
    max-width: 100%;
    min-width: 0;
    text-align: center;
    font-weight: 500;
}

.dlc-option-button:hover,
.dlc-option-button-active {
    background: var(--dlc-btn);
    color: #fff;
}

.dlc-btn-primary {
    background: var(--dlc-btn);
    color: #fff;
    border: 1.5px solid var(--dlc-btn);
    padding: 9px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    font-weight: 600;
    transition: opacity .18s;
    flex: 1;
}

.dlc-btn-primary:hover {
    opacity: .88;
}

.dlc-btn-secondary {
    background: transparent;
    color: var(--dlc-text-light);
    border: 1.5px solid #d2d2d7;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .18s;
}

.dlc-btn-secondary:hover {
    border-color: var(--dlc-text-light);
}

.dlc-btn-send {
    background: var(--dlc-btn);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 18px;
    cursor: pointer;
    transition: opacity .18s;
    flex-shrink: 0;
}

.dlc-btn-send:hover {
    opacity: .88;
}

/* ── Service multi-select ────────────────────────────────── */
.dlc-services-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 2px;
}

.dlc-service-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1.5px solid #d2d2d7;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    transition: border-color .18s, background .18s;
    user-select: none;
    background: #fff;
    color: var(--dlc-text);
    font-family: inherit;
    width: 100%;
    text-align: left;
}

.dlc-service-item:hover {
    border-color: var(--dlc-primary);
}

.dlc-service-item.dlc-service-selected {
    border-color: var(--dlc-primary);
    background: rgba(230, 57, 70, .07);
    color: var(--dlc-primary);
    font-weight: 500;
}

.dlc-service-check {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid #d2d2d7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color .18s, background .18s;
    font-size: 11px;
}

.dlc-service-item.dlc-service-selected .dlc-service-check {
    background: var(--dlc-primary);
    border-color: var(--dlc-primary);
    color: #fff;
}

/* ── KVKK checkbox ───────────────────────────────────────── */
.dlc-kvkk-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--dlc-text-light);
    cursor: pointer;
    line-height: 1.5;
}

.dlc-kvkk-label input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--dlc-primary);
    flex-shrink: 0;
}

/* ── Summary card ────────────────────────────────────────── */
.dlc-summary-card {
    background: var(--dlc-msg-bot-bg);
    border-radius: 12px;
    padding: 14px;
    font-size: 13px;
    line-height: 1.7;
}

.dlc-summary-card strong {
    color: var(--dlc-text);
}

.dlc-summary-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.dlc-summary-label {
    color: var(--dlc-text-light);
    min-width: 110px;
    font-size: 12px;
}

.dlc-services-list {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
}

.dlc-services-list li::before {
    content: '✓ ';
    color: var(--dlc-primary);
    font-weight: 700;
}

/* ── Validation error ────────────────────────────────────── */
.dlc-error-msg {
    color: #c62828;
    font-size: 12px;
    margin-top: -4px;
}

/* ── Success screen ──────────────────────────────────────── */
.dlc-success-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 32px 20px;
    text-align: center;
    gap: 12px;
}

.dlc-success-icon {
    font-size: 48px;
}

.dlc-success-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dlc-text);
}

.dlc-success-text {
    font-size: 14px;
    color: var(--dlc-text-light);
}

.dlc-employee-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(44px, 1fr));
    gap: 8px;
    background: var(--dlc-bg);
    border-bottom-left-radius: var(--dlc-radius);
    border-bottom-right-radius: var(--dlc-radius);
}

.dlc-health-detail {
    margin-top: 8px;
    font-size: 13px;
}

.dlc-health-detail p {
    margin: 0 0 6px;
}

.dlc-health-detail ul {
    margin: 0 0 8px;
    padding-left: 18px;
}

.dlc-health-detail li {
    margin: 2px 0;
}

.dlc-service-counts {
    display: grid;
    gap: 8px;
}

.dlc-chat-input-area > * {
    animation: dlc-appear-up .34s ease both;
}

.dlc-chat-input-area > *:nth-child(2) { animation-delay: .06s; }
.dlc-chat-input-area > *:nth-child(3) { animation-delay: .12s; }
.dlc-chat-input-area > *:nth-child(4) { animation-delay: .18s; }

.dlc-service-step {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: var(--dlc-text);
    margin-top: 0;
}

.dlc-service-step-head span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e8f3ff;
    color: #0f5f99;
    font-size: 11px;
    font-weight: 700;
}

.dlc-service-step-head h3 {
    margin: 4px 0 0;
    font-size: 15px;
    line-height: 1.25;
}

.dlc-service-step-body {
    color: var(--dlc-text-light);
    font-size: 13px;
}

.dlc-service-step-body p {
    margin: 0 0 6px;
}

.dlc-service-step-body ul {
    margin: 0;
    padding-left: 18px;
}

.dlc-service-step-body li {
    margin: 3px 0;
}

.dlc-service-price-row,
.dlc-service-select-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding-top: 8px;
    border-top: 1px solid #edf2f7;
    font-size: 13px;
}

.dlc-service-price-row span,
.dlc-service-select-row span {
    color: var(--dlc-text-light);
}

.dlc-service-price-row strong {
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

.dlc-service-counts label,
.dlc-service-count-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: var(--dlc-text);
    font-size: 13px;
}

.dlc-service-counts span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.dlc-count-select {
    width: 82px;
    min-height: 36px;
    border: 1.5px solid #d2d2d7;
    border-radius: 8px;
    background: #fff;
    color: var(--dlc-text);
    font: inherit;
    padding: 4px 8px;
}

.dlc-count-picker {
    display: grid;
    grid-template-columns: repeat(5, minmax(34px, 1fr));
    gap: 6px;
    width: min(100%, 230px);
}

.dlc-count-choice {
    min-width: 0;
    min-height: 34px;
    border: 1.5px solid #d2d2d7;
    border-radius: 8px;
    background: #fff;
    color: var(--dlc-text);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    transition: background .18s, border-color .18s, color .18s;
}

.dlc-count-choice:hover,
.dlc-count-choice-active {
    border-color: var(--dlc-btn);
    background: var(--dlc-btn);
    color: #fff;
}

.dlc-service-count-note {
    color: var(--dlc-text-light);
}

.dlc-quote-summary {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13px;
}

.dlc-quote-summary section {
    min-width: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.dlc-quote-summary section:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.dlc-quote-summary h3 {
    margin: 0 0 8px;
    color: var(--dlc-text);
    font-size: 13px;
    font-weight: 700;
}

.dlc-quote-summary section > div {
    display: grid;
    grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr);
    gap: 10px;
    min-width: 0;
    padding: 5px 0;
}

.dlc-quote-summary span {
    display: block;
    color: var(--dlc-text-light);
    font-size: 11px;
    margin-bottom: 2px;
}

.dlc-quote-summary strong {
    color: var(--dlc-text);
    overflow-wrap: anywhere;
}

.dlc-quote-grand {
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
    margin-top: 4px;
}

.dlc-offer-no,
.dlc-offer-total {
    font-size: 14px;
    color: var(--dlc-text);
}

.dlc-smart-actions {
    align-self: flex-start;
    width: 100%;
    margin: 0 0 2px;
}

.dlc-smart-actions .dlc-option-button {
    border-radius: 10px;
    min-height: 38px;
}

.dlc-smart-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dlc-smart-input-row {
    align-items: stretch;
}

.dlc-smart-input {
    min-height: 42px;
}

.dlc-smart-typing {
    align-self: flex-start;
    max-width: 82%;
    background: var(--dlc-msg-bot-bg);
    border-radius: 14px;
}

.dlc-offer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.dlc-pdf-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--dlc-btn);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.dlc-pdf-link:hover {
    color: #fff;
    opacity: .9;
}

/* ── Scrollbar ───────────────────────────────────────────── */
.dlc-chat-messages::-webkit-scrollbar,
.dlc-services-grid::-webkit-scrollbar {
    width: 5px;
}

.dlc-chat-messages::-webkit-scrollbar-track,
.dlc-services-grid::-webkit-scrollbar-track {
    background: transparent;
}

.dlc-chat-messages::-webkit-scrollbar-thumb,
.dlc-services-grid::-webkit-scrollbar-thumb {
    background: #d2d2d7;
    border-radius: 4px;
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (min-width: 481px) and (max-width: 1180px) {
    .dlc-chat-panel {
        width: min(460px, calc(100vw - 32px));
        height: min(680px, calc(100dvh - 112px));
        max-height: calc(100dvh - 112px);
    }

    .dlc-chat-panel-wide {
        width: min(760px, calc(100vw - 32px));
        height: min(760px, calc(100dvh - 112px));
        max-height: calc(100dvh - 112px);
    }

    .dlc-chat-input-area {
        max-height: 52dvh;
        overflow-y: auto;
    }

    .dlc-service-select-row {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .dlc-count-picker {
        width: 100%;
        grid-template-columns: repeat(5, minmax(42px, 1fr));
    }
}

@media (pointer: coarse) and (min-width: 481px) and (max-width: 1366px) {
    .dlc-chat-panel {
        width: min(480px, calc(100vw - 32px));
        height: min(700px, calc(100dvh - 112px));
        max-height: calc(100dvh - 112px);
    }

    .dlc-chat-panel-wide {
        width: min(780px, calc(100vw - 32px));
        height: min(780px, calc(100dvh - 112px));
        max-height: calc(100dvh - 112px);
    }

    .dlc-chat-input-area {
        max-height: 52dvh;
        overflow-y: auto;
    }

    .dlc-service-select-row {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .dlc-count-picker {
        width: 100%;
        grid-template-columns: repeat(5, minmax(42px, 1fr));
    }
}

@media (max-width: 480px) {
    .dlc-chat-widget {
        bottom: 0 !important;
        right: 0 !important;
        left: 0;
        width: 100vw;
        max-width: 100vw;
        pointer-events: none;
    }

    .dlc-chat-panel,
    .dlc-chat-toggle {
        pointer-events: auto;
    }

    .dlc-chat-toggle {
        width: 54px;
        height: 54px;
        margin-left: auto;
        margin-right: max(14px, env(safe-area-inset-right));
        margin-bottom: max(14px, env(safe-area-inset-bottom));
    }

    .dlc-chat-panel {
        bottom: calc(74px + env(safe-area-inset-bottom));
        right: 0;
        left: 0;
        width: 100vw;
        max-width: 100vw;
        height: calc(100dvh - 74px - env(safe-area-inset-bottom));
        max-height: calc(100dvh - 74px - env(safe-area-inset-bottom));
        border-radius: 0;
        border-bottom-left-radius: 18px;
        border-bottom-right-radius: 18px;
        transform-origin: bottom center;
    }

    .dlc-chat-panel-wide {
        width: 100vw;
        height: calc(100dvh - 74px - env(safe-area-inset-bottom));
        max-width: 100vw;
        max-height: calc(100dvh - 74px - env(safe-area-inset-bottom));
    }

    .dlc-chat-header {
        min-height: 50px;
        padding: 10px 12px;
    }

    .dlc-chat-header-title {
        font-size: 13px;
        line-height: 1.2;
    }

    .dlc-chat-close {
        min-width: 36px;
        min-height: 36px;
    }

    .dlc-chat-messages {
        padding: 12px 10px;
        gap: 8px;
    }

    .dlc-message {
        max-width: 88%;
        padding: 9px 11px;
        font-size: 13px;
        line-height: 1.45;
    }

    .dlc-chat-input-area {
        padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
        gap: 7px;
        max-height: 58dvh;
        overflow-y: auto;
    }

    .dlc-input-row {
        gap: 7px;
    }

    .dlc-input {
        min-height: 40px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .dlc-btn-send {
        min-width: 42px;
        padding: 0 12px;
    }

    .dlc-option-button {
        white-space: normal;
        min-height: 40px;
        padding: 8px 10px;
        line-height: 1.25;
    }

    .dlc-employee-grid {
        grid-template-columns: repeat(3, minmax(44px, 1fr));
    }

    .dlc-quote-summary {
        gap: 10px;
    }

    .dlc-quote-summary section > div {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .dlc-service-price-row,
    .dlc-service-select-row {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .dlc-service-price-row strong {
        text-align: left;
    }

    .dlc-count-select {
        width: 100%;
    }

    .dlc-count-picker {
        width: 100%;
        grid-template-columns: repeat(5, minmax(38px, 1fr));
    }

    .dlc-count-choice {
        min-height: 38px;
    }

    .dlc-btn-row {
        align-items: stretch;
    }

    .dlc-btn-row button,
    .dlc-pdf-link {
        width: 100%;
    }
}

/* ── Very small phones (iPhone SE / older Android <360px) ─────────── */
@media (max-width: 360px) {
    .dlc-chat-header {
        padding: 8px 10px;
        min-height: 46px;
    }

    .dlc-chat-header-title {
        font-size: 14px;
    }

    .dlc-chat-messages {
        padding: 10px 8px;
    }

    .dlc-message {
        max-width: 92%;
        font-size: 12.5px;
        padding: 8px 10px;
    }

    .dlc-chat-input-area {
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    }

    .dlc-smart-form-card {
        padding: 9px;
    }

    .dlc-smart-form-grid {
        gap: 7px;
    }

    .dlc-smart-form-grid input,
    .dlc-smart-form-grid select {
        min-height: 38px;
        font-size: 13.5px;
        padding: 6px 8px;
    }

    .dlc-employee-wheel,
    .dlc-service-wheel {
        grid-template-columns: 1fr 30px 70px 30px;
        gap: 6px;
    }

    .dlc-wheel-values strong,
    .dlc-wheel-values input[type="number"] {
        font-size: 19px;
    }

    .dlc-btn-primary,
    .dlc-btn-secondary {
        font-size: 13px;
        padding: 9px 12px;
    }
}

/* ── Landscape phones (height-constrained) ────────────────────────── */
@media (max-width: 932px) and (orientation: landscape) and (max-height: 500px) {
    .dlc-chat-panel,
    .dlc-chat-panel-wide {
        height: calc(100dvh - 60px - env(safe-area-inset-bottom));
        max-height: calc(100dvh - 60px - env(safe-area-inset-bottom));
    }

    .dlc-chat-input-area {
        max-height: 60dvh;
        overflow-y: auto;
    }

    .dlc-chat-header {
        min-height: 42px;
        padding: 6px 12px;
    }

    .dlc-chat-toggle {
        width: 48px;
        height: 48px;
    }
}

/* ── Tablet portrait (600-820px) ──────────────────────────────────── */
@media (min-width: 600px) and (max-width: 820px) and (orientation: portrait) {
    .dlc-chat-panel {
        width: min(500px, calc(100vw - 32px));
        height: min(720px, calc(100dvh - 100px));
        max-height: calc(100dvh - 100px);
    }

    .dlc-chat-panel-wide {
        width: min(700px, calc(100vw - 32px));
        height: min(820px, calc(100dvh - 100px));
        max-height: calc(100dvh - 100px);
    }
}

/* ── Large desktop screens (>=1440px) ─────────────────────────────── */
@media (min-width: 1440px) {
    .dlc-chat-panel {
        width: 400px;
        height: 620px;
    }

    .dlc-chat-panel-wide {
        width: 780px;
        height: 720px;
    }
}

/* ── Overflow guards (limited to content inside the panel) ────────── */
/* NOTE: do NOT apply max-width:100% to .dlc-chat-widget or .dlc-chat-panel.
   The widget is position:fixed and shrinks to content (56px toggle); the panel
   is position:absolute and its containing block is the widget — clamping the
   panel to 100% of the widget collapses it to ~56px. The panel already sets
   its own width + max-width: calc(100vw - 24px). */
.dlc-smart-form-card,
.dlc-smart-form-grid,
.dlc-message {
    max-width: 100%;
    box-sizing: border-box;
}

.dlc-message,
.dlc-smart-form-grid label,
.dlc-smart-form-grid input,
.dlc-smart-form-grid select {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Prevent letterhead/logo images from overflowing in narrow chat */
.dlc-chat-messages img,
.dlc-message img {
    max-width: 100%;
    height: auto;
}
