/* ==============================================
   CS Widget — Ügyfélszolgálat döntési fa widget
   ============================================== */

/* --- Választó panel (chat gomb kattintás után) --- */
.cs-chooser-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
}

.cs-chooser-panel {
    display: none;
    position: fixed;
    z-index: 9999;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    padding: 20px;
    width: 280px;
}

/* Desktop pozíció — chat gomb felett */
.cs-chooser-panel.desktop {
    bottom: 175px;
    right: 40px;
}

.cs-chooser-panel .cs-chooser-title {
    font-family: 'Mona Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #0c1e21;
    margin-bottom: 14px;
    text-align: center;
}

.cs-chooser-panel .cs-chooser-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f5f9f9;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    color: #0c1e21;
    margin-bottom: 8px;
}

.cs-chooser-panel .cs-chooser-option:last-child {
    margin-bottom: 0;
}

.cs-chooser-panel .cs-chooser-option:hover {
    background: #1e8a8a;
    color: #fff;
}

.cs-chooser-panel .cs-chooser-option i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.cs-chooser-panel .cs-chooser-option span {
    font-family: 'Mona Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
}

/* --- Widget panel --- */
.cs-widget-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.3);
}

.cs-widget-panel {
    display: none;
    position: fixed;
    z-index: 10000;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    font-family: 'Mona Sans', sans-serif;
}

/* Desktop */
.cs-widget-panel.desktop {
    bottom: 40px;
    right: 40px;
    width: 400px;
    max-height: 70vh;
}

/* Mobil */
.cs-widget-panel.mobile {
    bottom: 65px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 70vh;
    border-radius: 16px 16px 0 0;
}

/* --- Header --- */
.cs-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #1e8a8a;
    color: #fff;
}

.cs-widget-header-title {
    font-size: 16px;
    font-weight: 600;
}

.cs-widget-header-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.cs-widget-header-close:hover {
    opacity: 1;
}

/* --- Body --- */
.cs-widget-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(70vh - 56px);
}

/* --- Lépések --- */
.cs-widget-step {
    display: none;
}

.cs-widget-step.active {
    display: block;
}

.cs-widget-step-title {
    font-size: 16px;
    font-weight: 600;
    color: #0c1e21;
    margin-bottom: 6px;
}

.cs-widget-step-text {
    font-size: 14px;
    color: #364e52;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* --- Kategória választó gombok --- */
.cs-widget-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cs-widget-option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #c9d1d1;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    font-family: 'Mona Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #0c1e21;
}

.cs-widget-option-btn:hover {
    border-color: #1e8a8a;
    background: #f5f9f9;
}

.cs-widget-option-btn i {
    font-size: 18px;
    color: #1e8a8a;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.cs-widget-option-btn:hover i {
    color: #1e8a8a;
}

/* --- Auto-resolve tartalom --- */
.cs-widget-resolve-content {
    font-size: 14px;
    color: #364e52;
    line-height: 1.6;
}

.cs-widget-resolve-content p {
    margin-bottom: 10px;
}

.cs-widget-resolve-content ol,
.cs-widget-resolve-content ul {
    padding-left: 20px;
    margin-bottom: 10px;
}

.cs-widget-resolve-content li {
    margin-bottom: 6px;
}

.cs-widget-resolve-content a.cs-widget-link {
    display: inline-block;
    color: #1e8a8a;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.cs-widget-resolve-content a.cs-widget-link:hover {
    border-bottom-color: #1e8a8a;
}

/* --- "Hasznos volt?" kérdés --- */
.cs-widget-feedback {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #ecf0f0;
}

.cs-widget-feedback-question {
    font-size: 14px;
    font-weight: 500;
    color: #0c1e21;
    margin-bottom: 10px;
}

.cs-widget-feedback-buttons {
    display: flex;
    gap: 8px;
}

.cs-widget-feedback-btn {
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid #c9d1d1;
    background: #fff;
    font-family: 'Mona Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #0c1e21;
    cursor: pointer;
    transition: all 0.25s ease;
}

.cs-widget-feedback-btn:hover {
    border-color: #1e8a8a;
    color: #1e8a8a;
}

.cs-widget-feedback-btn.yes:hover {
    background: #1e8a8a;
    color: #fff;
    border-color: #1e8a8a;
}

/* --- Email form --- */
.cs-widget-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cs-widget-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cs-widget-form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #0c1e21;
}

.cs-widget-form-group label .required {
    color: #ff0000;
}

.cs-widget-form-group input,
.cs-widget-form-group textarea {
    padding: 10px 12px;
    border: 1px solid #c9d1d1;
    border-radius: 8px;
    font-family: 'Mona Sans', sans-serif;
    font-size: 14px;
    color: #0c1e21;
    transition: border-color 0.2s;
    background: #fff;
}

.cs-widget-form-group input:focus,
.cs-widget-form-group textarea:focus {
    outline: none;
    border-color: #1e8a8a;
    box-shadow: 0 0 0 2px rgba(30, 138, 138, 0.15);
}

.cs-widget-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.cs-widget-form-submit {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    background: #1e8a8a;
    color: #fff;
    font-family: 'Mona Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease;
}

.cs-widget-form-submit:hover {
    background: #0c1e21;
}

.cs-widget-form-submit:disabled {
    background: #a9b8b8;
    cursor: not-allowed;
}

/* --- Verify-resend (BO4) gomb távolság --- */
#csVrBtn {
    margin-top: 12px;
}

/* --- Ügyfélszám ellenőrzés --- */
.cs-widget-verify-input {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.cs-widget-verify-input input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #c9d1d1;
    border-radius: 8px;
    font-family: 'Mona Sans', sans-serif;
    font-size: 14px;
    color: #0c1e21;
}

.cs-widget-verify-input input:focus {
    outline: none;
    border-color: #1e8a8a;
    box-shadow: 0 0 0 2px rgba(30, 138, 138, 0.15);
}

.cs-widget-verify-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: #1e8a8a;
    color: #fff;
    font-family: 'Mona Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease;
    white-space: nowrap;
}

.cs-widget-verify-btn:hover {
    background: #0c1e21;
}

/* --- Sikeres küldés --- */
.cs-widget-success {
    text-align: center;
    padding: 20px 0;
}

.cs-widget-success i {
    font-size: 48px;
    color: #1e8a8a;
    margin-bottom: 12px;
}

.cs-widget-success-title {
    font-size: 16px;
    font-weight: 600;
    color: #0c1e21;
    margin-bottom: 6px;
}

.cs-widget-success-text {
    font-size: 14px;
    color: #364e52;
    line-height: 1.5;
}

/* --- Login figyelmeztetés --- */
.cs-widget-login-notice {
    text-align: center;
    padding: 20px 0;
}

.cs-widget-login-notice i {
    font-size: 40px;
    color: #a9b8b8;
    margin-bottom: 12px;
}

.cs-widget-login-notice p {
    font-size: 14px;
    color: #364e52;
    margin-bottom: 16px;
    line-height: 1.5;
}

.cs-widget-login-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 50px;
    background: #1e8a8a;
    color: #fff;
    font-family: 'Mona Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.25s ease;
}

.cs-widget-login-btn:hover {
    background: #0c1e21;
    color: #fff;
}

/* --- Hiba üzenet --- */
.cs-widget-error {
    padding: 10px 14px;
    border-radius: 8px;
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: #cc0000;
    font-size: 13px;
    margin-top: 8px;
}

/* --- Vissza gomb --- */
.cs-widget-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #1e8a8a;
    font-family: 'Mona Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-bottom: 14px;
    transition: color 0.2s;
}

.cs-widget-back-btn:hover {
    color: #0c1e21;
}

.cs-widget-back-btn i {
    font-size: 12px;
}

/* --- Loading spinner --- */
.cs-widget-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
    color: #364e52;
    font-size: 14px;
}

.cs-widget-loading i {
    animation: cs-spin 1s linear infinite;
}

@keyframes cs-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Számla lista (BO3) --- */
.cs-invoice-card {
    border: 1px solid #e0e6e6;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #fafcfc;
}

.cs-invoice-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}

.cs-invoice-label {
    font-size: 13px;
    color: #6b7f83;
    font-weight: 500;
}

.cs-invoice-value {
    font-size: 13px;
    color: #0c1e21;
    font-weight: 500;
}

.cs-invoice-amount {
    font-weight: 700;
    color: #0c1e21;
}

.cs-invoice-pay-btn {
    display: block;
    text-align: center;
    margin-top: 10px;
    padding: 9px 20px;
    border-radius: 50px;
    background: #1e8a8a;
    color: #fff;
    font-family: 'Mona Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.25s ease;
}

.cs-invoice-pay-btn:hover {
    background: #0c1e21;
    color: #fff;
}

.cs-invoice-empty {
    text-align: center;
    padding: 20px 0;
    color: #364e52;
}

.cs-invoice-empty i {
    font-size: 36px;
    color: #4caf50;
    margin-bottom: 10px;
    display: block;
}

.cs-invoice-empty p {
    font-size: 14px;
    line-height: 1.5;
}

/* --- Billing edit (BO5) --- */
.cs-billing-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c9d1d1;
    border-radius: 8px;
    font-family: 'Mona Sans', sans-serif;
    font-size: 14px;
    color: #0c1e21;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.cs-billing-select:focus {
    outline: none;
    border-color: #1e8a8a;
    box-shadow: 0 0 0 2px rgba(30, 138, 138, 0.15);
}

.cs-billing-form {
    gap: 10px !important;
}

.cs-billing-confirm {
    margin-top: 4px;
}

.cs-billing-confirm-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #364e52;
    cursor: pointer;
    line-height: 1.4;
}

.cs-billing-confirm-label input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #1e8a8a;
    flex-shrink: 0;
}

/* --- Archív előadás keresés (BO8) --- */
.cs-archive-search-input {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.cs-archive-search-input input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #c9d1d1;
    border-radius: 8px;
    font-family: 'Mona Sans', sans-serif;
    font-size: 14px;
    color: #0c1e21;
}

.cs-archive-search-input input:focus {
    outline: none;
    border-color: #1e8a8a;
    box-shadow: 0 0 0 2px rgba(30, 138, 138, 0.15);
}

.cs-archive-card {
    display: flex;
    gap: 12px;
    border: 1px solid #e0e6e6;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fafcfc;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.cs-archive-card:hover {
    border-color: #1e8a8a;
    background: #f0f7f7;
}

.cs-archive-card-img {
    width: 70px;
    height: 52px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e0e6e6;
}

.cs-archive-card-body {
    flex: 1;
    min-width: 0;
}

.cs-archive-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #0c1e21;
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cs-archive-card-date {
    font-size: 12px;
    color: #6b7f83;
}

.cs-archive-empty {
    text-align: center;
    padding: 20px 0;
    color: #364e52;
}

.cs-archive-empty i {
    font-size: 32px;
    color: #a9b8b8;
    margin-bottom: 10px;
    display: block;
}

.cs-archive-empty p {
    font-size: 14px;
    line-height: 1.5;
}

/* --- Mobil: chooser panel alulról --- */
@media (max-width: 991px) {
    .cs-chooser-panel {
        bottom: 65px;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 16px 16px 0 0;
    }

    .cs-widget-panel.mobile {
        bottom: 65px;
    }
}
