/* ==========================================================================
   Vyjuvek Resource Widget — Public Styles v1.1.0
   Matches vyjuvek.com branding: deep purple (#24144a), medium purple (#4b4b86),
   green accents, Roboto/Roboto Slab typography.
   All classes are scoped with the "vwgt-" prefix to avoid theme conflicts.
   ========================================================================== */

/* --- CSS Custom Properties (Brand Tokens) --- */
#vyjuvek-widget-root {
    --vwgt-color-primary:       #24144a;
    --vwgt-color-primary-hover: #1a0e36;
    --vwgt-color-secondary:     #4b4b86;
    --vwgt-color-accent:        #5a8a3c;
    --vwgt-color-accent-light:  #e8f4e0;
    --vwgt-color-white:         #ffffff;
    --vwgt-color-off-white:     #f8f7fc;
    --vwgt-color-border:        #e2dff0;
    --vwgt-color-text:          #2d2d2d;
    --vwgt-color-text-muted:    #6b6b8a;
    --vwgt-color-link:          #24144a;
    --vwgt-color-pdf:           #24144a;   /* PDF download icon uses brand purple */
    --vwgt-color-external:      #2980b9;
    --vwgt-color-video:         #8e44ad;
    --vwgt-color-error:         #c0392b;
    --vwgt-shadow-panel:        0 8px 40px rgba(36, 20, 74, 0.22), 0 2px 8px rgba(36, 20, 74, 0.10);
    --vwgt-shadow-trigger:      0 4px 16px rgba(36, 20, 74, 0.30);
    --vwgt-radius-panel:        16px;
    --vwgt-radius-btn:          50px;
    --vwgt-radius-item:         10px;
    --vwgt-panel-width:         390px;
    --vwgt-panel-height:        600px;
    --vwgt-font-family:         inherit;
    --vwgt-font-family-serif:   inherit;
    --vwgt-z-index:             999999;
    --vwgt-transition:          0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Content Wrapper (fills panel, enables flex scroll chain) --- */
.vwgt-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

/* --- Root Container --- */
#vyjuvek-widget-root {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--vwgt-z-index);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: var(--vwgt-color-text);
    box-sizing: border-box;
}

#vyjuvek-widget-root *,
#vyjuvek-widget-root *::before,
#vyjuvek-widget-root *::after {
    box-sizing: border-box;
}

/* --- Trigger Button --- */
.vwgt-trigger-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--vwgt-color-primary);
    color: var(--vwgt-color-white);
    border: none;
    border-radius: var(--vwgt-radius-btn);
    padding: 12px 20px 12px 16px;
    cursor: pointer;
    font-family: var(--vwgt-font-family);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: var(--vwgt-shadow-trigger);
    transition: background var(--vwgt-transition), transform var(--vwgt-transition), box-shadow var(--vwgt-transition);
    outline: none;
    white-space: nowrap;
}

.vwgt-trigger-btn:hover,
.vwgt-trigger-btn:focus-visible {
    background: var(--vwgt-color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(36, 20, 74, 0.38);
}

.vwgt-trigger-btn:active {
    transform: translateY(0);
}

.vwgt-trigger-btn[aria-expanded="true"] .vwgt-trigger-icon {
    transform: rotate(45deg);
}

.vwgt-trigger-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--vwgt-transition);
    flex-shrink: 0;
}

.vwgt-trigger-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* --- Panel --- */
.vwgt-panel {
    position: absolute;
    bottom: 64px;
    right: 0;
    width: var(--vwgt-panel-width);
    /* Fixed height so the body can scroll within it */
    height: var(--vwgt-panel-height);
    max-height: calc(100vh - 110px);
    background: var(--vwgt-color-white);
    border-radius: var(--vwgt-radius-panel);
    box-shadow: var(--vwgt-shadow-panel);
    /* overflow hidden on panel, overflow-y auto on body */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform-origin: bottom right;
    animation: vwgt-panel-open 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.vwgt-panel[hidden] {
    display: none !important;
}

@keyframes vwgt-panel-open {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* --- Panel Header --- */
.vwgt-header {
    background: var(--vwgt-color-primary);
    color: var(--vwgt-color-white);
    padding: 16px 16px 14px;
    flex-shrink: 0;
}

.vwgt-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.vwgt-header-title {
    font-family: var(--vwgt-font-family-serif);
    font-size: 16px;
    font-weight: 700;
    color: var(--vwgt-color-white);
    margin: 0;
    line-height: 1.3;
}

.vwgt-header-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    margin: 2px 0 0;
}

.vwgt-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.vwgt-expand-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--vwgt-color-white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--vwgt-transition);
    flex-shrink: 0;
}

.vwgt-expand-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* --- Expanded panel state (70% of viewport, centered) --- */
.vwgt-panel.vwgt-expanded {
    position: fixed !important;
    width: 70vw !important;
    height: 70vh !important;
    max-height: 70vh !important;
    top: 15vh !important;
    left: 15vw !important;
    bottom: auto !important;
    right: auto !important;
    transition: width 0.3s cubic-bezier(0.4,0,0.2,1),
                height 0.3s cubic-bezier(0.4,0,0.2,1),
                top 0.3s cubic-bezier(0.4,0,0.2,1),
                left 0.3s cubic-bezier(0.4,0,0.2,1);
    z-index: 9999999 !important;
}

.vwgt-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--vwgt-color-white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: background var(--vwgt-transition);
    flex-shrink: 0;
    padding: 0;
}

.vwgt-close-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* --- Search Bar --- */
.vwgt-search-wrap {
    position: relative;
    margin-top: 4px;
}

.vwgt-search-input {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--vwgt-color-white);
    font-family: var(--vwgt-font-family);
    font-size: 13px;
    outline: none;
    transition: background var(--vwgt-transition);
    caret-color: var(--vwgt-color-white);
}

.vwgt-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.vwgt-search-input:focus {
    background: rgba(255, 255, 255, 0.22);
}

.vwgt-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.vwgt-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 2px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 16px;
    line-height: 1;
}

.vwgt-search-clear:hover {
    color: var(--vwgt-color-white);
    background: rgba(255, 255, 255, 0.15);
}

.vwgt-search-clear.vwgt-visible {
    display: flex;
}

/* AI badge on search */
.vwgt-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

.vwgt-ai-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7dde7d;
    animation: vwgt-pulse 2s infinite;
}

@keyframes vwgt-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- ISI Banner --- */
.vwgt-isi-banner {
    background: #f0ede8;
    border-bottom: 1px solid #e0dbd0;
    padding: 8px 16px;
    flex-shrink: 0;
}

.vwgt-isi-link {
    color: var(--vwgt-color-primary);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.vwgt-isi-link:hover {
    text-decoration: underline;
}

.vwgt-isi-link svg {
    flex-shrink: 0;
}

/* --- Scrollable Body ---
   The body takes all remaining height and scrolls internally.
   The panel itself does NOT scroll — only this element does.
   ---------------------------------------------------------------- */
.vwgt-body {
    flex: 1;
    min-height: 0;          /* critical for flex children to scroll */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.vwgt-body::-webkit-scrollbar {
    width: 4px;
}

.vwgt-body::-webkit-scrollbar-track {
    background: transparent;
}

.vwgt-body::-webkit-scrollbar-thumb {
    background: var(--vwgt-color-border);
    border-radius: 4px;
}

/* --- View Sections --- */
.vwgt-view {
    display: none;
    flex-direction: column;
}

.vwgt-view.vwgt-active {
    display: flex;
}

/* --- Section Header (within body) --- */
.vwgt-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--vwgt-color-border);
    position: sticky;
    top: 0;
    background: var(--vwgt-color-white);
    z-index: 1;
}

.vwgt-back-btn {
    background: none;
    border: none;
    color: var(--vwgt-color-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: background var(--vwgt-transition), color var(--vwgt-transition);
    flex-shrink: 0;
}

.vwgt-back-btn:hover {
    background: var(--vwgt-color-off-white);
    color: var(--vwgt-color-primary);
}

.vwgt-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--vwgt-color-primary);
    margin: 0;
    flex: 1;
}

.vwgt-section-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--vwgt-color-text-muted);
    background: var(--vwgt-color-off-white);
    border: 1px solid var(--vwgt-color-border);
    border-radius: 20px;
    padding: 2px 8px;
}

/* --- Category List --- */
.vwgt-category-list {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.vwgt-category-item {
    margin: 0;
}

.vwgt-category-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 12px;
    transition: background var(--vwgt-transition);
    border-bottom: 1px solid transparent;
}

.vwgt-category-btn:hover {
    background: var(--vwgt-color-off-white);
}

/* Category icon removed */

.vwgt-category-info {
    flex: 1;
    min-width: 0;
}

.vwgt-category-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--vwgt-color-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vwgt-category-desc {
    font-size: 11px;
    color: var(--vwgt-color-text-muted);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.vwgt-category-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.vwgt-category-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--vwgt-color-secondary);
    background: rgba(75, 75, 134, 0.1);
    border-radius: 20px;
    padding: 2px 8px;
    min-width: 24px;
    text-align: center;
}

.vwgt-chevron {
    color: var(--vwgt-color-text-muted);
    flex-shrink: 0;
}

/* --- Resource List --- */
.vwgt-resource-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.vwgt-resource-item {
    margin: 0;
    padding: 0 12px 4px;
}

.vwgt-resource-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--vwgt-radius-item);
    text-decoration: none;
    color: var(--vwgt-color-text);
    transition: background var(--vwgt-transition);
    border: 1px solid transparent;
}

.vwgt-resource-link:hover {
    background: var(--vwgt-color-off-white);
    border-color: var(--vwgt-color-border);
    text-decoration: none;
}

/* Resource type icons removed — links display title + description only */

/* Download icon for PDF links */
.vwgt-download-icon {
    color: var(--vwgt-color-primary);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: 0.75;
    transition: opacity var(--vwgt-transition), transform var(--vwgt-transition);
}

.vwgt-resource-link--pdf:hover .vwgt-download-icon {
    opacity: 1;
    transform: translateY(2px);
}

.vwgt-resource-info {
    flex: 1;
    min-width: 0;
}

.vwgt-resource-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--vwgt-color-primary);
    display: block;
    line-height: 1.35;
}

.vwgt-resource-desc {
    font-size: 11px;
    color: var(--vwgt-color-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 2px;
    line-height: 1.4;
}

/* --- CTA Banner (now a button, not a link) --- */
.vwgt-cta-banner {
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, var(--vwgt-color-primary) 0%, var(--vwgt-color-secondary) 100%);
    border-radius: 0;
    padding: 14px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity var(--vwgt-transition), transform var(--vwgt-transition);
    border: none;
    cursor: pointer;
    text-align: left;
}

.vwgt-cta-banner:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.vwgt-cta-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--vwgt-color-white);
}

.vwgt-cta-text {
    flex: 1;
}

.vwgt-cta-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--vwgt-color-white);
    display: block;
    line-height: 1.35;
}

.vwgt-cta-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    display: block;
    margin-top: 1px;
}

.vwgt-cta-arrow {
    color: rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
}

/* --- Featured / Most Requested Section --- */
.vwgt-featured-section {
    padding: 0 0 12px;
}

.vwgt-featured-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--vwgt-color-text-muted);
    padding: 10px 16px 6px;
    display: block;
    border-top: 1px solid var(--vwgt-color-border);
}

/* --- Search Results View --- */
.vwgt-search-status {
    padding: 12px 16px;
    font-size: 12px;
    color: var(--vwgt-color-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.vwgt-search-status .vwgt-spinner {
    width: 14px;
    height: 14px;
}

.vwgt-no-results {
    padding: 32px 20px;
    text-align: center;
    color: var(--vwgt-color-text-muted);
}

.vwgt-no-results-icon {
    font-size: 36px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.vwgt-no-results-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--vwgt-color-primary);
    margin: 0 0 6px;
}

.vwgt-no-results-text {
    font-size: 12px;
    margin: 0;
}

/* --- Loading Spinner --- */
.vwgt-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--vwgt-color-text-muted);
    font-size: 13px;
    gap: 12px;
}

.vwgt-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--vwgt-color-border);
    border-top-color: var(--vwgt-color-secondary);
    border-radius: 50%;
    animation: vwgt-spin 0.8s linear infinite;
    display: inline-block;
}

.vwgt-spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
    vertical-align: middle;
    margin-left: 6px;
}

@keyframes vwgt-spin {
    to { transform: rotate(360deg); }
}

/* --- Divider --- */
.vwgt-divider {
    height: 1px;
    background: var(--vwgt-color-border);
    margin: 4px 0;
}

/* --- Footer --- */
.vwgt-footer {
    padding: 0;
    border-top: 1px solid var(--vwgt-color-border);
    background: var(--vwgt-color-white);
    flex-shrink: 0;
    display: block;
    overflow: hidden;
    border-radius: 0 0 20px 20px;
}

.vwgt-footer-text {
    font-size: 10px;
    color: var(--vwgt-color-text-muted);
    text-align: center;
    margin: 0;
}

.vwgt-footer-text a {
    color: var(--vwgt-color-link);
    text-decoration: none;
}

.vwgt-footer-text a:hover {
    text-decoration: underline;
}

/* --- Search Result Highlight --- */
.vwgt-highlight {
    background: rgba(255, 220, 50, 0.35);
    border-radius: 2px;
    padding: 0 1px;
}

/* =========================================================================
   Connect Form View
   ========================================================================= */

.vwgt-connect-body {
    padding: 0 0 16px;
}

.vwgt-connect-intro {
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--vwgt-color-border);
}

.vwgt-connect-intro p {
    font-size: 12px;
    color: var(--vwgt-color-text);
    margin: 0 0 4px;
    line-height: 1.5;
}

.vwgt-connect-intro .vwgt-connect-note {
    font-size: 11px;
    color: var(--vwgt-color-text-muted);
    margin: 0;
}

.vwgt-connect-phone {
    color: var(--vwgt-color-secondary);
    font-weight: 600;
    text-decoration: none;
}

.vwgt-connect-phone:hover {
    text-decoration: underline;
}

/* Form layout */
.vwgt-connect-form {
    padding: 14px 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vwgt-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vwgt-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.vwgt-form-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--vwgt-color-primary);
    letter-spacing: 0.2px;
}

.vwgt-required {
    color: var(--vwgt-color-error);
    font-size: 10px;
}

.vwgt-form-input,
.vwgt-form-select {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid var(--vwgt-color-border);
    border-radius: 7px;
    font-family: var(--vwgt-font-family);
    font-size: 12px;
    color: var(--vwgt-color-text);
    background: var(--vwgt-color-white);
    outline: none;
    transition: border-color var(--vwgt-transition), box-shadow var(--vwgt-transition);
    -webkit-appearance: none;
    appearance: none;
}

.vwgt-form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b8a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    cursor: pointer;
}

.vwgt-form-input:focus,
.vwgt-form-select:focus {
    border-color: var(--vwgt-color-secondary);
    box-shadow: 0 0 0 3px rgba(75, 75, 134, 0.12);
}

.vwgt-form-input::placeholder {
    color: var(--vwgt-color-text-muted);
    opacity: 0.7;
}

/* Checkboxes */
.vwgt-form-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.vwgt-form-checkbox {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--vwgt-color-secondary);
    cursor: pointer;
}

.vwgt-form-check-label {
    font-size: 11px;
    color: var(--vwgt-color-text);
    line-height: 1.4;
    cursor: pointer;
}

/* Consent text */
.vwgt-form-consent {
    background: var(--vwgt-color-off-white);
    border: 1px solid var(--vwgt-color-border);
    border-radius: 7px;
    padding: 10px 12px;
}

.vwgt-form-consent p {
    font-size: 10px;
    color: var(--vwgt-color-text-muted);
    margin: 0;
    line-height: 1.5;
}

.vwgt-form-consent a {
    color: var(--vwgt-color-secondary);
    text-decoration: none;
}

.vwgt-form-consent a:hover {
    text-decoration: underline;
}

/* Error message */
.vwgt-form-error {
    background: rgba(192, 57, 43, 0.08);
    border: 1px solid rgba(192, 57, 43, 0.25);
    border-radius: 7px;
    padding: 10px 12px;
    font-size: 11px;
    color: var(--vwgt-color-error);
    line-height: 1.5;
}

/* Submit button */
.vwgt-connect-submit-btn {
    width: 100%;
    padding: 11px 20px;
    background: var(--vwgt-color-primary);
    color: var(--vwgt-color-white);
    border: none;
    border-radius: var(--vwgt-radius-btn);
    font-family: var(--vwgt-font-family);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: background var(--vwgt-transition), transform var(--vwgt-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
}

.vwgt-connect-submit-btn:hover:not(:disabled) {
    background: var(--vwgt-color-primary-hover);
    transform: translateY(-1px);
}

.vwgt-connect-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.vwgt-connect-privacy-note {
    font-size: 10px;
    color: var(--vwgt-color-text-muted);
    text-align: center;
    margin: 6px 0 0;
}

/* Success state */
.vwgt-connect-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    gap: 12px;
}

.vwgt-connect-success-icon {
    color: var(--vwgt-color-accent);
    margin-bottom: 4px;
}

.vwgt-connect-success-title {
    font-family: var(--vwgt-font-family-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--vwgt-color-primary);
    margin: 0;
}

.vwgt-connect-success-text {
    font-size: 13px;
    color: var(--vwgt-color-text);
    margin: 0;
    line-height: 1.6;
}

.vwgt-connect-success-phone {
    font-size: 12px;
    color: var(--vwgt-color-text-muted);
    margin: 0;
}

.vwgt-connect-success-phone a {
    color: var(--vwgt-color-secondary);
    font-weight: 600;
    text-decoration: none;
}

.vwgt-connect-success-phone a:hover {
    text-decoration: underline;
}

.vwgt-connect-back-home {
    background: none;
    border: 2px solid var(--vwgt-color-primary);
    color: var(--vwgt-color-primary);
    border-radius: var(--vwgt-radius-btn);
    padding: 9px 20px;
    font-family: var(--vwgt-font-family);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--vwgt-transition), color var(--vwgt-transition);
    margin-top: 4px;
}

.vwgt-connect-back-home:hover {
    background: var(--vwgt-color-primary);
    color: var(--vwgt-color-white);
}

/* =========================================================================
   Responsive: Mobile
   ========================================================================= */
@media (max-width: 480px) {
    #vyjuvek-widget-root {
        bottom: 16px;
        right: 16px;
    }

    .vwgt-panel {
        width: calc(100vw - 32px);
        max-width: 390px;
        right: 0;
        bottom: 60px;
        height: calc(100vh - 100px);
        max-height: calc(100vh - 100px);
    }

    .vwgt-trigger-label {
        display: none;
    }

    .vwgt-trigger-btn {
        padding: 14px;
        border-radius: 50%;
        width: 52px;
        height: 52px;
        justify-content: center;
    }

    .vwgt-form-row {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   Accessibility: Reduced Motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
    .vwgt-panel {
        animation: none;
    }

    .vwgt-trigger-btn,
    .vwgt-category-btn,
    .vwgt-resource-link,
    .vwgt-cta-banner,
    .vwgt-connect-submit-btn {
        transition: none;
    }

    .vwgt-spinner {
        animation: none;
        border-top-color: var(--vwgt-color-secondary);
    }

    .vwgt-ai-badge-dot {
        animation: none;
    }
}

/* =========================================================================
   Video Library View
   ========================================================================= */

/* ── Video Home: category filter pills ─────────────────────────────────── */
.vwgt-video-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--vwgt-color-border);
}

.vwgt-video-filter-btn {
    padding: 4px 12px;
    border-radius: 50px;
    border: 1.5px solid var(--vwgt-color-border);
    background: var(--vwgt-color-white);
    color: var(--vwgt-color-text-muted);
    font-family: var(--vwgt-font-family);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--vwgt-transition);
    white-space: nowrap;
}

.vwgt-video-filter-btn:hover,
.vwgt-video-filter-btn.vwgt-active {
    background: var(--vwgt-color-primary);
    border-color: var(--vwgt-color-primary);
    color: var(--vwgt-color-white);
}

/* ── Video card grid ────────────────────────────────────────────────────── */
.vwgt-video-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
}

.vwgt-video-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--vwgt-color-border);
    transition: background var(--vwgt-transition);
    text-align: left;
    width: 100%;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    font-family: var(--vwgt-font-family);
}

.vwgt-video-card:hover {
    background: var(--vwgt-color-off-white);
}

.vwgt-video-card:last-child {
    border-bottom: none;
}

/* Play button thumbnail area */
.vwgt-video-thumb {
    width: 52px;
    height: 36px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--vwgt-color-primary) 0%, var(--vwgt-color-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255,255,255,0.9);
    transition: transform var(--vwgt-transition);
}

.vwgt-video-card:hover .vwgt-video-thumb {
    transform: scale(1.05);
}

.vwgt-video-thumb svg {
    width: 18px;
    height: 18px;
    margin-left: 2px; /* optical centering for play triangle */
}

.vwgt-video-info {
    flex: 1;
    min-width: 0;
}

.vwgt-video-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--vwgt-color-primary);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.vwgt-video-category-label {
    font-size: 10.5px;
    color: var(--vwgt-color-text-muted);
    margin-top: 2px;
    display: block;
}

.vwgt-video-play-arrow {
    color: var(--vwgt-color-text-muted);
    flex-shrink: 0;
}

/* ── Video category section headers ────────────────────────────────────── */
.vwgt-video-cat-header {
    padding: 10px 16px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--vwgt-color-text-muted);
    background: var(--vwgt-color-off-white);
    border-bottom: 1px solid var(--vwgt-color-border);
    position: sticky;
    top: 0;
    z-index: 1;
}

/* ── Inline Vimeo Player ────────────────────────────────────────────────── */
.vwgt-video-player-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vwgt-video-player-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--vwgt-color-border);
    flex-shrink: 0;
}

.vwgt-video-player-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--vwgt-color-primary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}

.vwgt-video-iframe-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    background: #000;
    flex-shrink: 0;
}

.vwgt-video-iframe-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.vwgt-video-player-desc {
    padding: 12px 16px;
    font-size: 12px;
    color: var(--vwgt-color-text);
    line-height: 1.55;
    border-bottom: 1px solid var(--vwgt-color-border);
    flex-shrink: 0;
}

/* "More Videos" list below the player */
.vwgt-video-more-label {
    padding: 10px 16px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--vwgt-color-text-muted);
    flex-shrink: 0;
}

/* ── Video Library tab button in home view ──────────────────────────────── */
.vwgt-video-tab-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--vwgt-color-border);
    cursor: pointer;
    font-family: var(--vwgt-font-family);
    text-align: left;
    transition: background var(--vwgt-transition);
}

.vwgt-video-tab-btn:hover {
    background: var(--vwgt-color-off-white);
}

.vwgt-video-tab-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--vwgt-color-primary) 0%, var(--vwgt-color-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.vwgt-video-tab-info {
    flex: 1;
    min-width: 0;
}

.vwgt-video-tab-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--vwgt-color-primary);
    display: block;
}

.vwgt-video-tab-sub {
    font-size: 11px;
    color: var(--vwgt-color-text-muted);
    display: block;
    margin-top: 1px;
}

.vwgt-video-tab-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vwgt-video-tab-count {
    background: var(--vwgt-color-secondary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50px;
    padding: 1px 7px;
    min-width: 20px;
    text-align: center;
}

/* =========================================================================
   AI Answer Panel
   ========================================================================= */
.vwgt-ai-answer {
    margin: 12px 14px 4px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f5f0ff 0%, #eef4ff 100%);
    border: 1px solid #d8c9f8;
    border-radius: 12px;
    animation: vwgt-fade-in 0.3s ease;
}

.vwgt-ai-answer-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
}

.vwgt-ai-answer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--vwgt-color-primary, #24144a);
    animation: vwgt-pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes vwgt-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(1.3); }
}

.vwgt-ai-answer-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--vwgt-color-primary, #24144a);
}

.vwgt-ai-answer-text {
    margin: 0 0 10px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #1a1a2e;
    font-weight: 400;
}

.vwgt-ai-answer-disclaimer {
    margin: 0;
    font-size: 10.5px;
    color: #888;
    line-height: 1.4;
    font-style: italic;
}

.vwgt-related-label {
    padding: 10px 16px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #888;
}

@keyframes vwgt-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
