/* TD88 Accessibility — Widget UI v1.0.1 */
/* Floating toggle button + slide-in panel. Pure CSS, no framework. */

#td88ac-root {
    position: fixed;
    z-index: 999998;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Position variants */
#td88ac-root.td88ac-pos-bottom-right { bottom: 20px; right: 20px; }
#td88ac-root.td88ac-pos-bottom-left  { bottom: 20px; left:  20px; }
#td88ac-root.td88ac-pos-top-right    { top:    20px; right: 20px; }
#td88ac-root.td88ac-pos-top-left     { top:    20px; left:  20px; }

/* Toggle button — sárga gomb, sötét accessibility figura */
#td88ac-toggle {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--td88ac-accent, #FCD34D);
    color: var(--td88ac-text, #1F2937);
    border: 2px solid var(--td88ac-border, #1F2937);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.22);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    padding: 0;
}
#td88ac-toggle:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 22px rgba(0,0,0,0.28);
}
#td88ac-toggle:focus-visible {
    outline: 3px solid var(--td88ac-accent, #FCD34D);
    outline-offset: 3px;
}
#td88ac-toggle svg {
    width: 32px; height: 32px;
    display: block;
}

/* Size variants */
#td88ac-root.td88ac-size-small  #td88ac-toggle { width: 44px; height: 44px; }
#td88ac-root.td88ac-size-small  #td88ac-toggle svg { width: 24px; height: 24px; }
#td88ac-root.td88ac-size-large  #td88ac-toggle { width: 68px; height: 68px; }
#td88ac-root.td88ac-size-large  #td88ac-toggle svg { width: 40px; height: 40px; }

/* Panel */
.td88ac-panel {
    position: fixed;
    z-index: 999999;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 110px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,0,0,0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.5;
}
.td88ac-pos-bottom-right .td88ac-panel { bottom: 88px; right: 20px; }
.td88ac-pos-bottom-left  .td88ac-panel { bottom: 88px; left:  20px; }
.td88ac-pos-top-right    .td88ac-panel { top:    88px; right: 20px; }
.td88ac-pos-top-left     .td88ac-panel { top:    88px; left:  20px; }

/* Header */
.td88ac-panel-header {
    background: var(--td88ac-accent, #FCD34D);
    color: var(--td88ac-text, #1F2937);
    padding: 16px 20px;
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
    gap: 12px;
}
.td88ac-panel-header h2 {
    margin: 0; font-size: 17px; font-weight: 700; line-height: 1.2;
    color: inherit;
}
.td88ac-panel-header .td88ac-sub {
    font-size: 12px; opacity: 0.75; margin-top: 3px; display: block;
    font-weight: 400;
}
.td88ac-panel-close {
    background: rgba(0,0,0,0.1);
    border: none; color: inherit;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; line-height: 1;
    flex-shrink: 0;
    font-weight: 400;
}
.td88ac-panel-close:hover { background: rgba(0,0,0,0.18); }

/* Body (scrollable) */
.td88ac-panel-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 18px 4px;
}
.td88ac-panel-body::-webkit-scrollbar { width: 8px; }
.td88ac-panel-body::-webkit-scrollbar-track { background: transparent; }
.td88ac-panel-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.td88ac-panel-body::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Group sections */
.td88ac-group { margin-bottom: 18px; }
.td88ac-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.07em;
    margin: 0 0 8px;
}
.td88ac-group-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

/* Feature option (compact 2-col grid) */
.td88ac-opt {
    background: #f3f4f6;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 14px 8px 12px;
    cursor: pointer;
    font: inherit;
    color: #1f2937;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    min-height: 92px;
    line-height: 1.25;
}
.td88ac-opt-icon {
    width: 26px; height: 26px;
    flex-shrink: 0;
    color: #4b5563;
    transition: color 0.15s ease;
}
.td88ac-opt[aria-pressed="true"] .td88ac-opt-icon {
    color: var(--td88ac-text, #1F2937);
}
.td88ac-opt:hover { background: #e5e7eb; }
.td88ac-opt[aria-pressed="true"] {
    background: var(--td88ac-accent, #FCD34D);
    border-color: var(--td88ac-text, #1F2937);
    color: var(--td88ac-text, #1F2937);
}
.td88ac-opt-label {
    font-size: 13px;
    font-weight: 500;
}
.td88ac-opt-level {
    display: inline-block;
    font-size: 10px;
    background: var(--td88ac-text, #1F2937);
    color: var(--td88ac-accent, #FCD34D);
    padding: 1px 7px;
    border-radius: 999px;
    font-weight: 700;
    line-height: 1.4;
}
.td88ac-opt[aria-pressed="false"] .td88ac-opt-level { display: none; }

/* Profiles — 1-col layout, label and description with proper spacing */
.td88ac-group-profiles .td88ac-group-grid {
    grid-template-columns: 1fr;
    gap: 8px;
}
.td88ac-group-profiles .td88ac-opt {
    flex-direction: row;
    text-align: left;
    align-items: center;
    padding: 12px 14px;
    min-height: auto;
    gap: 12px;
}
.td88ac-group-profiles .td88ac-opt-icon {
    width: 28px; height: 28px;
}
.td88ac-group-profiles .td88ac-opt-content {
    flex: 1;
    display: flex; flex-direction: column; gap: 3px;
}
.td88ac-group-profiles .td88ac-opt-label {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    display: block;
}
.td88ac-group-profiles .td88ac-opt-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    display: block;
    font-weight: 400;
}
.td88ac-group-profiles .td88ac-opt[aria-pressed="true"] .td88ac-opt-desc {
    color: inherit;
    opacity: 0.85;
}

/* Footer */
.td88ac-panel-footer {
    display: flex; gap: 8px;
    padding: 14px 18px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-shrink: 0;
}
.td88ac-btn-reset {
    flex: 1;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 9px 12px;
    cursor: pointer;
    font: inherit; font-weight: 600;
    font-size: 13px;
    color: #1f2937;
}
.td88ac-btn-reset:hover { background: #f3f4f6; border-color: #9ca3af; }
.td88ac-statement-link {
    flex: 1;
    background: var(--td88ac-accent, #FCD34D);
    color: var(--td88ac-text, #1F2937);
    border: 1px solid var(--td88ac-text, #1F2937);
    border-radius: 8px;
    padding: 9px 12px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
}
.td88ac-statement-link:hover {
    opacity: 0.92;
    color: var(--td88ac-text, #1F2937);
    text-decoration: none;
}

/* Hidden state */
.td88ac-panel[aria-hidden="true"] { display: none; }

/* Mobile (< 480px): full-width bottom sheet */
@media (max-width: 480px) {
    .td88ac-panel {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 85vh;
        border-radius: 16px 16px 0 0;
    }
}
