/* DennisWall_Support — Kundenseiten & Modal im cvents-Design
   (Lato, cvents-Rot #d14c39, zentrierte Karten statt 100%-Breite) */

.dws-page {
    max-width: 760px;
    margin: 30px auto 60px;
    padding: 0 15px;
    font-family: 'Lato', sans-serif;
    color: #333;
}
.dws-page * { box-sizing: border-box; }

.dws-page .dws-hero { text-align: center; margin-bottom: 24px; }
.dws-page .dws-hero h1 {
    font-family: 'Lato', sans-serif;
    font-size: 32px;
    font-weight: 900;
    margin: 0 0 8px;
    color: #222;
}
.dws-page .dws-hero p { color: #777; font-size: 16px; margin: 0; }

.dws-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
    padding: 30px;
    margin-bottom: 20px;
}
@media (max-width: 600px) { .dws-card { padding: 20px 16px; } }

/* Formular */
.dws-field { margin-bottom: 18px; }
.dws-field label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
    color: #444;
}
.dws-field label .req { color: #d14c39; }
.dws-input,
.dws-field input[type=text],
.dws-field input[type=email],
.dws-field select,
.dws-field textarea {
    display: block;
    width: 100%;
    height: 46px;
    padding: 10px 14px;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    color: #333;
    background: #fff;
    border: 1px solid #d7d7d7;
    border-radius: 8px;
    -webkit-appearance: none;
    transition: border-color .15s, box-shadow .15s;
}
.dws-field textarea { height: auto; min-height: 130px; resize: vertical; line-height: 1.5; }
.dws-field select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23777' d='M1.4 0 6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
.dws-field input:focus,
.dws-field select:focus,
.dws-field textarea:focus {
    outline: none;
    border-color: #d14c39;
    box-shadow: 0 0 0 3px rgba(209, 76, 57, .12);
}
.dws-cols { display: flex; gap: 16px; }
.dws-cols > .dws-field { flex: 1; min-width: 0; }
@media (max-width: 600px) { .dws-cols { display: block; } }

.dws-btn {
    display: inline-block;
    background: #d14c39;
    color: #fff !important;
    border: 0;
    border-radius: 8px;
    padding: 13px 34px;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .15s;
}
.dws-btn:hover, .dws-btn:focus { background: #ae3929; color: #fff; }
.dws-btn-light {
    background: #fff;
    color: #d14c39 !important;
    border: 1px solid #d14c39;
}
.dws-btn-light:hover { background: #fdf1ef; color: #ae3929 !important; }
@media (max-width: 600px) { .dws-btn { display: block; width: 100%; text-align: center; } }

.dws-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.dws-form-note { font-size: 12px; color: #999; }

.dws-privacy {
    font-size: 12px;
    color: #999;
    margin-top: 14px;
    line-height: 1.5;
}

/* Ticket-Ansicht */
.dws-status {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    vertical-align: middle;
}
.dws-status.open, .dws-status.customer_reply { background: #e8a33d; }
.dws-status.answered { background: #4c9a58; }
.dws-status.closed { background: #9aa0a6; }

.dws-linkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f8f8;
    border: 1px dashed #d7d7d7;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 18px 0 0;
}
.dws-linkbox .lnk {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #777;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dws-linkbox button {
    flex: 0 0 auto;
    background: #fff;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    padding: 6px 12px;
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    cursor: pointer;
}
.dws-linkbox button:hover { border-color: #d14c39; color: #d14c39; }
.dws-linkhint { font-size: 12px; color: #aaa; margin: 6px 2px 0; }

.dws-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.dws-chip {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 4px 12px;
    font-size: 12.5px;
    color: #666;
}
.dws-chip b { color: #333; }

/* Verlauf: Kunde rechts (wie Messenger), Support links */
.dws-thread { margin-top: 8px; }
.dws-msg { max-width: 82%; margin-bottom: 18px; }
.dws-msg.customer { margin-left: auto; }
.dws-msg.admin { margin-right: auto; }
.dws-msg .who {
    font-size: 12px;
    color: #999;
    margin: 0 6px 4px;
}
.dws-msg .who .agent-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}
.dws-msg.customer .who { text-align: right; }
.dws-msg .bubble {
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.55;
    word-wrap: break-word;
}
.dws-msg .bubble a { color: #d14c39; word-break: break-all; text-decoration: underline; }
.dws-msg .bubble a:hover { color: #ae3929; }
.dws-msg.customer .bubble {
    background: #fdf1ef;
    border: 1px solid #f3d5cf;
    border-bottom-right-radius: 4px;
}
.dws-msg.admin .bubble {
    background: #f7f7f7;
    border: 1px solid #e9e9e9;
    border-bottom-left-radius: 4px;
}
.dws-msg .files { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.dws-msg .file-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 5px 11px;
    font-size: 12.5px;
    color: #d14c39;
    text-decoration: none;
}
.dws-msg .file-chip:hover { border-color: #d14c39; }
.dws-msg .file-img img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    display: block;
}

/* Antwortbereich */
.dws-reply h2 {
    font-family: 'Lato', sans-serif;
    font-size: 20px;
    font-weight: 900;
    margin: 0 0 14px;
    color: #222;
}
.dws-upload {
    border: 2px dashed #d7d7d7;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 13px;
    color: #888;
    margin-bottom: 18px;
    background: #fcfcfc;
}
.dws-upload input { margin-top: 6px; font-family: 'Lato', sans-serif; }

.dws-notice {
    background: #fdf6e3;
    border: 1px solid #f0dfa8;
    border-radius: 10px;
    padding: 16px 18px;
    color: #8a6d3b;
    font-size: 14.5px;
    text-align: center;
}

/* Leere/Unavailable-Seite */
.dws-empty-card { text-align: center; padding: 50px 30px; }
.dws-empty-card .icon { font-size: 48px; margin-bottom: 14px; }
.dws-empty-card h1 {
    font-family: 'Lato', sans-serif;
    font-size: 26px;
    font-weight: 900;
    margin: 0 0 10px;
    color: #222;
}
.dws-empty-card p { color: #777; font-size: 15px; margin: 0 0 24px; }

/* WYSIWYG-Antwortfeld */
.dws-editor {
    width: 100%;
    min-height: 130px;
    padding: 10px 14px;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    background: #fff;
    border: 1px solid #d7d7d7;
    border-radius: 8px;
    transition: border-color .15s, box-shadow .15s;
    overflow-y: auto;
    word-wrap: break-word;
}
.dws-editor:focus {
    outline: none;
    border-color: #d14c39;
    box-shadow: 0 0 0 3px rgba(209, 76, 57, .12);
}
.dws-editor:empty::before {
    content: attr(data-placeholder);
    color: #9a9a9a;
    pointer-events: none;
}

/* Editor-Leiste (B/I/U + Emoji) unter dem Antwortfeld */
.dws-editor-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}
.dws-editor-bar .sep {
    width: 1px;
    height: 20px;
    background: #e0e0e0;
    margin: 0 4px;
}
.dws-wrap-btn,
.dws-emoji-toggle {
    background: #fff;
    border: 1px solid #d7d7d7;
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    line-height: 1;
    min-width: 38px;
    padding: 8px 10px;
    color: #555;
    cursor: pointer;
    text-align: center;
}
.dws-emoji-toggle { font-size: 19px; }
.dws-wrap-btn:hover,
.dws-emoji-toggle:hover { border-color: #d14c39; color: #d14c39; }
.dws-emoji-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 500;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    width: 340px;
    max-width: 90vw;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    padding: 8px;
}
.dws-emoji-panel button {
    border: 0;
    background: none;
    font-size: 20px;
    line-height: 1;
    padding: 5px;
    border-radius: 6px;
    cursor: pointer;
}
.dws-emoji-panel button:hover { background: #fdf1ef; }

/* Toasts (Erfolg/Fehler, unten mittig — statt 100%-Banner oben) */
.dws-toast-wrap {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 9500;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    max-width: 92%;
    pointer-events: none;
}
.dws-toast-item {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: #2d3238;
    border-radius: 10px;
    padding: 11px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .35s ease, transform .35s ease;
    max-width: 100%;
}
.dws-toast-item.is-visible { opacity: 1; transform: translateY(0); }
/* color je Variante explizit — Theme-Regeln .success/.error setzen sonst grüne/rote Schrift */
.dws-toast-item.success { background: #3e7a49; color: #fff; }
.dws-toast-item.error { background: #b3362a; color: #fff; }

/* ---------- Support-Modal (Footer-Button) ---------- */
.dw-support-fab {
    display: inline-block;
    margin: 8px 0;
    padding: 7px 18px;
    background: transparent;
    border: 1px solid #bbb;
    border-radius: 18px;
    color: #555;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s;
}
.dw-support-fab:hover { border-color: #d14c39; color: #d14c39; text-decoration: none; }

.dw-support-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, .55);
    padding: 20px;
    overflow-y: auto;
}
.dw-support-overlay.is-open { display: block; }
.dw-support-modal {
    max-width: 560px;
    margin: 5vh auto;
    background: #fff;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, .3);
    position: relative;
    font-family: 'Lato', sans-serif;
    color: #333;
}
.dw-support-modal h3 {
    font-family: 'Lato', sans-serif;
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 900;
    color: #222;
}
.dw-support-modal .sub { color: #777; font-size: 14px; margin: 0 0 18px; }
.dw-support-modal .close {
    position: absolute;
    top: 14px;
    right: 16px;
    border: 0;
    background: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.dw-support-modal .close:hover { color: #d14c39; }
@media (max-width: 600px) { .dw-support-modal { padding: 22px 16px; margin: 2vh auto; } }
