/**
 * Estilos públicos de VTKS Helpdesk.
 * Widget moderno estilo Qualified/Drift.
 *
 * @package VTKS_Helpdesk
 * @since   1.0.0
 */

/* ==========================================================================
   Variables CSS
   ========================================================================== */

:root {
    --vtks-primary: #1a4d2e;
    --vtks-primary-hover: #143d24;
    --vtks-secondary: #50575e;
    --vtks-success: #00a32a;
    --vtks-warning: #dba617;
    --vtks-danger: #d63638;
    --vtks-light: #f0f0f1;
    --vtks-dark: #1d2327;
    --vtks-white: #ffffff;
    --vtks-gray-100: #f6f7f7;
    --vtks-gray-200: #dcdcde;
    --vtks-gray-300: #c3c4c7;
    --vtks-gray-600: #50575e;
    --vtks-border-radius: 8px;
    --vtks-border-radius-lg: 16px;
    --vtks-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    --vtks-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.18);
    --vtks-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Widget Base
   ========================================================================== */

.vtks-widget {
    position: fixed;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Safari/iOS box-sizing fix */
.vtks-widget *,
.vtks-widget *::before,
.vtks-widget *::after {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* Safari/iOS form elements fix */
.vtks-widget input,
.vtks-widget textarea,
.vtks-widget button,
.vtks-widget select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Safari flexbox fixes */
.vtks-widget [class*="flex"],
.vtks-widget .vtks-agent-info,
.vtks-widget .vtks-bubble-input-wrap,
.vtks-widget .vtks-header-agent,
.vtks-widget .vtks-header-buttons,
.vtks-widget .vtks-chat-form,
.vtks-widget .vtks-chat-input-wrap,
.vtks-widget .vtks-feedback-buttons,
.vtks-widget .vtks-option-buttons {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

.vtks-widget-bottom-right {
    bottom: 24px;
    right: 24px;
}

.vtks-widget-bottom-left {
    bottom: 24px;
    left: 24px;
}

/* ==========================================================================
   Burbuja de Preview (Estilo Qualified)
   ========================================================================== */

.vtks-bubble-preview {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 340px;
    background: var(--vtks-white);
    border-radius: var(--vtks-border-radius-lg);
    box-shadow: var(--vtks-shadow-lg);
    animation: vtks-slide-up 0.4s ease-out;
    overflow: visible;
    display: none;
}

.vtks-widget.bubble-visible .vtks-bubble-preview {
    display: block;
}

.vtks-widget-bottom-left .vtks-bubble-preview {
    right: auto;
    left: 0;
}

@keyframes vtks-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vtks-bubble-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--vtks-gray-600);
    transition: var(--vtks-transition);
    z-index: 10;
}

.vtks-bubble-close:hover {
    background: rgba(0, 0, 0, 0.15);
    color: var(--vtks-dark);
}

.vtks-bubble-content {
    padding: 20px;
}

.vtks-bubble-header {
    margin-bottom: 16px;
}

.vtks-agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vtks-agent-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.vtks-agent-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.vtks-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border: 2px solid var(--vtks-white);
    border-radius: 50%;
}

.vtks-agent-details {
    display: flex;
    flex-direction: column;
}

.vtks-agent-name {
    font-weight: 600;
    color: var(--vtks-dark);
    font-size: 15px;
}

.vtks-agent-status {
    font-size: 13px;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 4px;
}

.vtks-bubble-message {
    color: var(--vtks-gray-600);
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
}

/* Bubble Search */
.vtks-bubble-search-wrap {
    position: relative;
}

.vtks-bubble-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--vtks-gray-100);
    border-radius: 24px;
    padding: 6px 6px 6px 16px;
}

.vtks-bubble-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    padding: 8px 0;
    outline: none;
}

.vtks-bubble-input::placeholder {
    color: var(--vtks-gray-600);
}

.vtks-search-icon-bubble {
    color: var(--vtks-gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 8px;
}

/* Bubble Suggestions (Autocomplete) */
.vtks-bubble-suggestions {
    background: var(--vtks-white);
    border: 1px solid var(--vtks-gray-200);
    border-radius: var(--vtks-border-radius);
    box-shadow: var(--vtks-shadow);
    margin-top: 12px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 10;
}

.vtks-bubble-suggestions-header {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--vtks-gray-600);
    background: var(--vtks-gray-100);
    letter-spacing: 0.5px;
}

.vtks-bubble-suggestions-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vtks-bubble-suggestions-list li {
    margin: 0;
}

.vtks-bubble-suggestion-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--vtks-dark);
    text-decoration: none;
    font-size: 14px;
    transition: var(--vtks-transition);
    cursor: pointer;
    border-bottom: 1px solid var(--vtks-gray-100);
}

.vtks-bubble-suggestion-link:last-child {
    border-bottom: none;
}

.vtks-bubble-suggestion-link::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: var(--vtks-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.vtks-bubble-suggestion-link:hover {
    background: var(--vtks-gray-100);
    color: var(--vtks-primary);
}

/* ==========================================================================
   Botón Trigger con Avatar
   ========================================================================== */

.vtks-widget-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--vtks-white);
    cursor: pointer;
    box-shadow: var(--vtks-shadow-lg);
    transition: var(--vtks-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.vtks-widget-trigger:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.vtks-trigger-avatar {
    position: relative;
    width: 100%;
    height: 100%;
}

.vtks-trigger-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.vtks-trigger-avatar .vtks-status-dot {
    bottom: 4px;
    right: 4px;
}

/* Ocultar elementos según el estado del widget */
.vtks-widget.bubble-visible .vtks-widget-trigger,
.vtks-widget.panel-visible .vtks-widget-trigger {
    display: none;
}

.vtks-widget.panel-visible .vtks-bubble-preview {
    display: none !important;
}

/* Mostrar trigger cuando no hay burbuja ni panel */
.vtks-widget:not(.bubble-visible):not(.panel-visible) .vtks-widget-trigger {
    display: flex;
}

/* ==========================================================================
   Panel del Widget (Expandido)
   ========================================================================== */

.vtks-widget-panel {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 380px;
    max-height: 600px;
    background: var(--vtks-white);
    border-radius: var(--vtks-border-radius-lg);
    box-shadow: var(--vtks-shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: vtks-scale-up 0.3s ease-out;
}

@keyframes vtks-scale-up {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.vtks-widget-bottom-left .vtks-widget-panel {
    right: auto;
    left: 0;
}

/* Header del Panel */
.vtks-widget-header {
    background: var(--vtks-primary);
    color: var(--vtks-white);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vtks-header-agent {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vtks-header-agent .vtks-agent-avatar {
    width: 40px;
    height: 40px;
}

.vtks-header-agent .vtks-agent-name {
    color: var(--vtks-white);
}

.vtks-header-agent .vtks-agent-status {
    color: rgba(255, 255, 255, 0.8);
}

.vtks-header-agent .vtks-status-dot {
    border-color: var(--vtks-primary);
}

/* Header Buttons Container */
.vtks-header-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vtks-widget-maximize,
.vtks-widget-minimize {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--vtks-white);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    opacity: 0.9;
    transition: var(--vtks-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vtks-widget-maximize:hover,
.vtks-widget-minimize:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.vtks-widget-maximize svg,
.vtks-widget-minimize svg {
    display: block;
}

/* Maximized State */
.vtks-widget.maximized .vtks-widget-panel {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    border-radius: 0 !important;
    position: fixed !important;
}

.vtks-widget.maximized .vtks-widget-body {
    max-height: calc(100vh - 80px) !important;
    height: calc(100vh - 80px) !important;
}

.vtks-widget.maximized .vtks-widget-maximize svg {
    transform: rotate(180deg);
}

.vtks-widget.maximized .vtks-chat-messages {
    max-height: calc(100vh - 250px) !important;
}

/* ==========================================================================
   Cuerpo del Widget
   ========================================================================== */

.vtks-widget-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.vtks-widget-view {
    display: none;
}

.vtks-widget-view.active {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Article view specific layout */
.vtks-view-article.active {
    display: flex;
    flex-direction: column;
}

.vtks-view-article .vtks-article-content {
    flex: 1;
    overflow-y: auto;
}

.vtks-view-article .vtks-feedback-section {
    flex-shrink: 0;
}

/* Search Intro */
.vtks-search-intro {
    color: var(--vtks-gray-600);
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
}

/* ==========================================================================
   Search Form
   ========================================================================== */

.vtks-search-input-wrap {
    position: relative;
}

.vtks-search-input {
    width: 100%;
    padding: 14px 16px;
    padding-right: 44px;
    border: 1px solid var(--vtks-gray-300);
    border-radius: var(--vtks-border-radius);
    font-size: 14px;
    transition: var(--vtks-transition);
}

.vtks-search-input:focus {
    outline: none;
    border-color: var(--vtks-primary);
    box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.15);
}

.vtks-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vtks-gray-600);
}

/* Suggestions */
.vtks-suggestions {
    margin-top: 16px;
}

.vtks-suggestions h4 {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--vtks-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vtks-suggestions-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vtks-suggestions-list li {
    margin-bottom: 8px;
}

.vtks-suggestions-list a {
    display: block;
    padding: 12px 14px;
    background: var(--vtks-gray-100);
    border-radius: var(--vtks-border-radius);
    color: var(--vtks-dark);
    text-decoration: none;
    transition: var(--vtks-transition);
}

.vtks-suggestions-list a:hover {
    background: var(--vtks-gray-200);
}

.vtks-suggestions-list .vtks-suggestion-title {
    font-weight: 500;
    display: block;
}

.vtks-suggestions-list .vtks-suggestion-category {
    font-size: 12px;
    color: var(--vtks-gray-600);
}

/* No Results */
.vtks-no-results {
    text-align: center;
    padding: 24px 0;
}

.vtks-no-results p {
    color: var(--vtks-gray-600);
    margin-bottom: 16px;
}

.vtks-no-results-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Search Footer */
.vtks-search-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--vtks-gray-200);
    text-align: center;
}

.vtks-search-footer p {
    color: var(--vtks-gray-600);
    margin: 0 0 8px;
    font-size: 13px;
}

/* Chat Footer */
.vtks-chat-footer {
    margin-top: 12px;
    text-align: center;
    border-top: 1px solid var(--vtks-gray-200);
    padding-top: 12px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.vtks-btn {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--vtks-border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    -webkit-transition: var(--vtks-transition);
    transition: var(--vtks-transition);
    text-decoration: none;
    line-height: 1.4;
    text-align: center;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.vtks-btn:focus {
    outline: none;
    -webkit-box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.3);
    box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.3);
}

.vtks-btn:active {
    -webkit-transform: scale(0.98);
    transform: scale(0.98);
}

.vtks-btn svg {
    width: 18px;
    height: 18px;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}

.vtks-btn-primary {
    background: var(--vtks-primary);
    color: var(--vtks-white);
    -webkit-box-shadow: 0 2px 4px rgba(26, 77, 46, 0.3);
    box-shadow: 0 2px 4px rgba(26, 77, 46, 0.3);
}

.vtks-btn-primary:hover {
    background: var(--vtks-primary-hover);
    -webkit-box-shadow: 0 4px 8px rgba(26, 77, 46, 0.4);
    box-shadow: 0 4px 8px rgba(26, 77, 46, 0.4);
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}

.vtks-btn-secondary {
    background: var(--vtks-white);
    color: var(--vtks-dark);
    border: 2px solid var(--vtks-gray-300);
    -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vtks-btn-secondary:hover {
    background: var(--vtks-gray-100);
    border-color: var(--vtks-primary);
    color: var(--vtks-primary);
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}

.vtks-btn-link {
    background: transparent;
    color: var(--vtks-primary);
    padding: 8px 12px;
    font-weight: 500;
}

.vtks-btn-link:hover {
    text-decoration: underline;
    background: rgba(26, 77, 46, 0.05);
}

.vtks-btn-block {
    width: 100%;
}

/* Disabled state */
.vtks-btn:disabled,
.vtks-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    -webkit-transform: none;
    transform: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

/* Back Button */
.vtks-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: var(--vtks-primary);
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 16px;
    font-size: 14px;
    transition: var(--vtks-transition);
}

.vtks-back-btn:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Article View
   ========================================================================== */

.vtks-article-content {
    padding: 16px 0;
}

.vtks-article-content h3 {
    margin: 0 0 16px;
    font-size: 18px;
}

.vtks-article-content p {
    margin: 0 0 12px;
    color: var(--vtks-gray-600);
}

/* Feedback Section - Always Visible */
.vtks-feedback-section {
    flex-shrink: 0;
    padding: 16px;
    background: var(--vtks-gray-100);
    border-top: 1px solid var(--vtks-gray-200);
    margin-top: auto;
}

.vtks-article-feedback {
    text-align: center;
}

.vtks-article-feedback > p:first-child {
    margin: 0 0 12px;
    font-weight: 600;
    font-size: 14px;
    color: var(--vtks-dark);
}

.vtks-feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.vtks-feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid var(--vtks-gray-300);
    border-radius: var(--vtks-border-radius);
    background: var(--vtks-white);
    cursor: pointer;
    transition: var(--vtks-transition);
    font-size: 14px;
    font-weight: 500;
}

.vtks-feedback-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.vtks-feedback-btn:hover {
    border-color: var(--vtks-primary);
    color: var(--vtks-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vtks-feedback-yes:hover {
    border-color: var(--vtks-success);
    color: var(--vtks-success);
    background: rgba(0, 163, 42, 0.05);
}

.vtks-feedback-no:hover {
    border-color: var(--vtks-danger);
    color: var(--vtks-danger);
    background: rgba(214, 54, 56, 0.05);
}

.vtks-feedback-thanks {
    color: var(--vtks-success);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    background: rgba(0, 163, 42, 0.1);
    border-radius: var(--vtks-border-radius);
    display: inline-block;
}

/* ==========================================================================
   Chat View
   ========================================================================== */

.vtks-chat-messages {
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
    padding: 8px 0;
}

.vtks-chat-message {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.vtks-chat-message.user {
    align-items: flex-end;
}

.vtks-chat-message.ai {
    align-items: flex-start;
}

.vtks-chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.vtks-chat-message.user .vtks-chat-bubble {
    background: var(--vtks-primary);
    color: var(--vtks-white);
    border-bottom-right-radius: 4px;
}

.vtks-chat-message.ai .vtks-chat-bubble {
    background: var(--vtks-gray-100);
    color: var(--vtks-dark);
    border-bottom-left-radius: 4px;
}

/* Typing indicator */
.vtks-chat-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.vtks-chat-typing span {
    width: 8px;
    height: 8px;
    background: var(--vtks-gray-300);
    border-radius: 50%;
    animation: vtks-typing 1.4s infinite ease-in-out;
}

.vtks-chat-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.vtks-chat-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes vtks-typing {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Chat Form */
.vtks-chat-form {
    display: flex;
    gap: 8px;
}

.vtks-chat-input-wrap {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--vtks-gray-100);
    border-radius: 24px;
    padding: 8px 8px 8px 16px;
    transition: var(--vtks-transition);
}

.vtks-chat-input-wrap:focus-within {
    background: var(--vtks-white);
    box-shadow: 0 0 0 2px var(--vtks-primary);
}

.vtks-chat-input {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    font-size: 14px;
    min-height: 24px;
    max-height: 100px;
    outline: none;
}

.vtks-chat-input::placeholder {
    color: var(--vtks-gray-600);
}

.vtks-chat-send {
    background: var(--vtks-primary);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vtks-white);
    cursor: pointer;
    transition: var(--vtks-transition);
    flex-shrink: 0;
}

.vtks-chat-send:disabled {
    background: var(--vtks-gray-300);
    cursor: not-allowed;
}

.vtks-chat-send:not(:disabled):hover {
    background: var(--vtks-primary-hover);
    transform: scale(1.05);
}

/* ==========================================================================
   Ticket Form
   ========================================================================== */

.vtks-form-group {
    margin-bottom: 16px;
}

.vtks-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--vtks-dark);
    font-size: 13px;
}

.vtks-form-group input,
.vtks-form-group textarea,
.vtks-form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--vtks-gray-300);
    border-radius: var(--vtks-border-radius);
    font-size: 14px;
    transition: var(--vtks-transition);
}

.vtks-form-group input:focus,
.vtks-form-group textarea:focus,
.vtks-form-group select:focus {
    outline: none;
    border-color: var(--vtks-primary);
    box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.15);
}

/* Success View */
.vtks-view-success {
    text-align: center;
    padding: 32px 0;
}

.vtks-success-icon {
    color: var(--vtks-success);
    margin-bottom: 16px;
}

.vtks-view-success h4 {
    margin: 0 0 8px;
    font-size: 20px;
}

.vtks-view-success p {
    color: var(--vtks-gray-600);
    margin: 0 0 16px;
}

.vtks-ticket-id {
    font-weight: 600;
    color: var(--vtks-primary);
}

/* ==========================================================================
   Not Helpful Options
   ========================================================================== */

.vtks-not-helpful-options {
    text-align: center;
    padding: 20px;
    background: var(--vtks-gray-100);
    border-radius: var(--vtks-border-radius);
    margin-top: 16px;
}

.vtks-sorry-message {
    margin: 0 0 8px;
    color: var(--vtks-gray-600);
    font-size: 14px;
}

.vtks-try-options {
    margin: 0 0 16px;
    font-weight: 500;
    color: var(--vtks-dark);
}

.vtks-option-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
    .vtks-widget {
        bottom: 12px;
        right: 12px;
    }

    .vtks-widget-bottom-left {
        left: 12px;
    }

    .vtks-bubble-preview {
        width: calc(100vw - 24px);
        right: 0;
        bottom: 72px;
    }

    .vtks-widget-bottom-left .vtks-bubble-preview {
        left: 0;
    }

    .vtks-widget-panel {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 80px);
        right: 0;
    }

    .vtks-widget-bottom-left .vtks-widget-panel {
        left: 0;
    }

    .vtks-widget-body {
        max-height: calc(100vh - 180px);
        padding: 16px;
    }

    .vtks-widget-header {
        padding: 12px 16px;
    }

    .vtks-header-agent .vtks-agent-avatar {
        width: 36px;
        height: 36px;
    }

    .vtks-agent-name {
        font-size: 14px;
    }

    .vtks-agent-status {
        font-size: 11px;
    }

    .vtks-feedback-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .vtks-feedback-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
    }

    .vtks-chat-messages {
        max-height: 200px;
    }

    .vtks-chat-bubble {
        max-width: 90%;
        padding: 10px 14px;
        font-size: 13px;
    }

    .vtks-form-group input,
    .vtks-form-group textarea,
    .vtks-form-group select {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .vtks-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .vtks-search-input {
        padding: 12px 14px;
        padding-right: 40px;
    }

    .vtks-no-results-actions {
        gap: 8px;
    }

    .vtks-no-results-actions .vtks-btn {
        width: 100%;
    }

    /* Hide maximize button on mobile - already responsive */
    .vtks-widget-maximize {
        display: none;
    }
}

/* Extra small devices */
@media (max-width: 380px) {
    .vtks-widget {
        bottom: 8px;
        right: 8px;
    }

    .vtks-widget-bottom-left {
        left: 8px;
    }

    .vtks-bubble-preview {
        width: calc(100vw - 16px);
    }

    .vtks-widget-panel {
        width: calc(100vw - 16px);
    }

    .vtks-widget-trigger {
        width: 52px;
        height: 52px;
    }

    .vtks-bubble-content {
        padding: 16px;
    }

    .vtks-agent-avatar {
        width: 40px;
        height: 40px;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .vtks-widget-panel {
        max-height: calc(100vh - 40px);
    }

    .vtks-widget-body {
        max-height: calc(100vh - 120px);
    }

    .vtks-chat-messages {
        max-height: 120px;
    }
}
