.questionmark-tooltip:hover .tooltip-text,
.questionmark-tooltip:focus-within {
    display: block;
}

.questionmark-tooltip .tooltip-text {
    display: none;
}

h3 {
    text-align: center;
}

/* Compact horizontal layout for Time Shift inputs only */
.offsets-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.offsets-inline .offset-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.offsets-inline .offset-input {
    width: 64px;
    padding: 6px 8px;
    font-size: 14px;
    line-height: 1.2;
    height: 30px;
}

.offsets-inline .offset-unit {
    font-size: 13px;
    color: #666;
}

/* Place total on its own line, slightly compact */
.offsets-inline .offset-total {
    flex-basis: 100%;
    margin-top: 6px;
    font-size: 14px;
}

/* Optional: make number spinners less obtrusive on WebKit */
.offsets-inline .offset-input::-webkit-outer-spin-button,
.offsets-inline .offset-input::-webkit-inner-spin-button {
    height: 24px;
}

.site-footer {
  margin-top: 48px;
  padding: 16px 12px;
  border-top: 1px solid #e6e6e6;
  color: #666;
  font-size: 14px;
}
.legal-links {
  display: flex;
  gap: 10px;
  justify-content: center; /* or flex-end for right-aligned */
  flex-wrap: wrap;
}
.legal-links a { color: inherit; text-decoration: none; }
.legal-links a:hover { text-decoration: underline; }


#featuresSection {
    margin: 24px auto 12px auto;
    width: 99vw;
    max-width: 99vw;
    min-width: 340px;
    padding: 10px 0;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
}

.feature-tiles-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    min-width: 330px;
    width: 100%;
}

.feature-tile {
    width: 158px;
    min-height: 200px;
    margin: 6px 2px;
    border: 2px solid #dadada;
    box-sizing: border-box;
    border-radius: 9px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    padding: 9px 9px 8px 9px;
    opacity: 1;
    transition: filter .2s, opacity .2s, box-shadow .15s, border-color .15s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.feature-tile.disabled {
    filter: grayscale(100%);
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.feature-tile.selected {
    border-color: #007BFF;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.12);
}

.feature-tile:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.18);
}

.feature-radio {
    position: absolute;
    top: 9px;
    left: 9px;
    transform: scale(1.12);
}

.feature-name {
    font-weight: 600;
    font-size: 1.06em;
    margin: 4px 0 5px 0;
    text-align: center;
}

.feature-image {
    width: 86px;
    height: 86px;
    object-fit: contain;
    margin: 6px 0;
    transition: transform 0.20s cubic-bezier(.24, .84, .43, .95);
}

/*        .feature-tile:hover .feature-image {
            transform: scale(2.0);
        }
*/
.feature-desc {
    font-size: 0.97em;
    color: #444;
    margin: 8px 0 0 0;
    text-align: center;
    flex: 1;
}

.premium-tag {
    display: inline-block;
    background: #ffd700;
    color: #8a5900;
    font-size: .93em;
    border-radius: 7px;
    padding: 2px 8px;
    margin-top: 8px;
}

body {
    margin: 0;
    padding: 0;
    background: #faf7f7;
    font-family: Segoe UI, sans-serif;
}

#dropArea,
#fileList,
#downloadLinks,
#progressIndicator,
#result,
#errorMessage {
    width: 300px;
    margin: 20px auto;
    text-align: center;
}

fileList {
    margin: 18px 0 12px 0;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fileItem {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.fileLeft {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.fileCreated {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.fileItem span[title] {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 75vw;
    display: block;
}

.removeFile {
    color: #b35656;
    background: #fff0f0;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    font-size: 1.2em;
    transition: color 0.15s, transform 0.2s;
    margin-left: 12px;
    user-select: none;
    border: 1px solid #f4cccc;
    box-shadow: 0 1px 2px rgba(200, 75, 75, 0.07);
}

.removeFile:hover {
    background: #e60000;
    color: #fff;
    border-color: #e60000;
}

@keyframes fileAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


#dropArea {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 130px;
    border: 3px dashed #ccc;
    border-radius: 10px;
    padding: 20px;
    width: 360px;
    margin: 20px auto;
    text-align: center;
}

.fileItem {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    border: 1px solid #ccc;
    margin-bottom: 5px;
}

.fileItem span:first-child {
    max-width: 260px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}

.removeFile {
    cursor: pointer;
    color: red;
}

/*     .button {
            display: block;
            margin: 10px auto;
            padding: 10px;
            background-color: #007BFF;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }
            */
.button {
    display: block;
    margin: 10px auto;
    padding: 10px;
    background-color: #007BFF;
    color: white !important;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none !important;
    /* Remove underline for <a> */
    text-align: center;
}

.align-right {
    display: block;
    margin-left: auto;
    margin-right: 0;
}

#uploadButton {
    padding: 12px 64px;
    margin: 32px auto;
    font-size: 1.05em;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    /* Small shadow for presence */
}

#progressIndicator {
    display: none;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.07);
    border-radius: 50%;
    border-top: 4px solid #007BFF;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#result {
    display: none;
}

#errorMessage {
    display: none;
    color: red;
}

.input-row {
    margin: 10px auto;
    width: 320px;
    display: flex;
    align-items: center;
    font-size: 0.93em;
    /* Remove or change justify-content */
}

.input-row label {
    margin-right: 10px;
    font-weight: 500;
    width: 110px;
    /* Fixed width for aligned inputs, adjust as needed */
    text-align: left;
    /* Ensure left alignment */
    flex-shrink: 0;
}

.input-row input[type="number"] {
    width: 70px;
    padding: 2px 6px;
    font-size: 0.93em;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    margin-right: 6px;
    flex-shrink: 0;
}

.input-row input[type="number"]:disabled {
    background: #f4f4f4;
    color: #999;
    border-color: #ddd;
}

.questionmark-tooltip {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    margin-left: 0;
}

.questionmark-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 11.5px;
    font-weight: bold;
    color: #666;
    border: 1px solid #ccc;
    text-align: center;
    user-select: none;
}

.tooltip-text {
    display: none;
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    background: #fafafa;
    border: 1px solid #aaa;
    border-radius: 7px;
    padding: 6px 12px;
    font-size: 0.92em;
    color: #555;
    white-space: normal;
    min-width: 400px;
    max-width: 800px;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.questionmark-tooltip:hover .tooltip-text,
.questionmark-tooltip:focus-within .tooltip-text {
    display: block;
}

.small-explanation {
    font-size: 0.85em;
    color: #666;
    margin-top: 8px;
    display: block;
}

.user-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
    background: linear-gradient(90deg, #00b8d9 0%, #0077a3 100%);
    color: #fff;
    border-bottom: 1px solid #eee;
    min-height: 48px;
    box-sizing: border-box;
}

.brand {
    font-size: 1.65em;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1;
}

.teaser {
    font-size: 0.8em;
    line-height: 1;
}

.user-bar .brand,
.user-bar .teaser {
    margin-right: 18px;
}

.user-bar .right-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.user-bar .email {
    color: #fff;
    font-style: italic;
    margin-right: 10px;
    font-size: 1em;
    display: inline-block;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-bar .right-btns {
    display: flex;
    gap: 6px;
}

.user-bar .align-right {
    margin-left: auto;
}

.button.align-right {
    margin-left: auto;
}

.logout-btn,
.upgrade-btn,
.login-btn {
    margin-left: 8px;
    padding: 6px 14px;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    background: #425BE4;
    color: white;
    cursor: pointer;
    transition: background .18s;
}

.logout-btn:hover,
.upgrade-btn:hover,
.login-btn:hover {
    background: #2d41a1;
}

.hidden {
    display: none !important;
}

.info-banner {
    max-width: 360px;
    background: linear-gradient(98deg, #e9f2fd 0%, #f4f9ff 100%);
    border: 1.7px solid #83a8e9;
    margin: 18px auto 0 auto;
    padding: 14px 18px 11px 18px;
    border-radius: 10px;
    box-shadow: 0 2px 8px 0 rgba(70, 110, 185, .07), 0 1px 5px 0 rgba(60, 100, 170, .08);
    color: #23407c;
    font-size: 0.97em;
    font-family: 'Inter', Arial, sans-serif;
    line-height: 1.52;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.info-banner::before {
    content: "ℹ️";
    font-size: 1.22em;
    margin-right: 3px;
    flex-shrink: 0;
    margin-top: 1.5px;
}

.info-banner ul {
    margin: 7px 0 8px 25px;
    padding: 0;
    font-size: 0.96em;
}

.upgrade-link {
    color: #426be4;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
}

@media (max-width: 480px) {
    .info-banner {
        max-width: 98vw;
        padding: 12px 4vw;
    }
}

.button:disabled {
    background-color: #cccccc;
    color: #888888;
    border-color: #bbbbbb;
    cursor: not-allowed;
}

.setting-card {
    width: 340px;
    max-width: 92vw;
    margin: 14px auto;
    padding: 10px 12px 12px 12px;
    background: #fff;
    border: 1px solid #e1e5ee;
    border-radius: 10px;
    box-shadow: 0 2px 7px rgba(180, 195, 210, 0.12);
}

.setting-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.setting-title {
    font-weight: 600;
    font-size: 1.0em;
    color: #273449;
}

.setting-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-body.offsets-inline {
    flex-direction: row;   /* row layout only for Time Shift */
    flex-wrap: wrap;       /* allow wrap so total can go to next line */
    align-items: center;
    gap: 8px;
}
.setting-body.offsets-inline .offset-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;        /* prevent stretching */
}
.setting-body.offsets-inline .offset-total {
    flex-basis: 100%;      /* move total to the next line */
    margin-top: 6px;
    font-size: 14px;
}

.setting-body.offsets-inline .offset-input {
    width: 64px;           /* compact inputs so all fit in one row */
    height: 30px;
    font-size: 14px;
    padding: 6px 8px;
}



.setting-fullwidth-input {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.95em;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}

/* Time Shift (Offset) Layout */
.offset-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.offset-input {
    width: 100%;
    max-width: 220px;
    padding: 6px 8px;
    font-size: 0.95em;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}

.offset-unit {
    color: #555;
    font-size: 0.93em;
    font-weight: 500;
    min-width: 16px;
}

.offset-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 2px;
}

.offset-total-label {
    white-space: nowrap;
    color: #333;
    font-size: 0.93em;
    font-weight: 500;
}

.offset-total-value {
    min-width: 48px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #273449;
}

/* Tooltip nutzt bestehende Klassen (.questionmark-tooltip etc.) */
.setting-header .questionmark-tooltip {
    margin-left: 8px;
}

/* Einheitliche Optik für Sample Rate & Time Shift */
.setting-fullwidth-input,
.offset-input {
    box-sizing: border-box;
    width: 100%;
    padding: 6px 8px;
    height: 34px;
    /* einheitliche Höhe */
    line-height: 1.2;
    font-size: 0.95em;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}

/* WICHTIG: Spinners wieder aktivieren */
.setting-fullwidth-input[type="number"],
.offset-input[type="number"] {
    appearance: auto;
    /* Standard */
    -moz-appearance: auto;
    /* Firefox */
}

/* WebKit: Spinners explizit anzeigen (falls zuvor überschrieben) */
.setting-fullwidth-input::-webkit-outer-spin-button,
.setting-fullwidth-input::-webkit-inner-spin-button,
.offset-input::-webkit-outer-spin-button,
.offset-input::-webkit-inner-spin-button {
    -webkit-appearance: auto;
    margin: 0;
    /* kein zusätzlicher Abstand */
}

/* Time Shift Reihen-Layout */
.offset-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.offset-input {
    max-width: 220px;
    /* etwas schmaler als Fullwidth */
}

.offset-unit {
    color: #555;
    font-size: 0.93em;
    font-weight: 500;
    min-width: 16px;
}

/* Sample-Card Input bleibt volle Breite */
.setting-fullwidth-input {
    width: 100%;
}

.faq-section {
  width: 600px;
  max-width: 96vw;
}

.faq-list {
  gap: 6px;
}

.faq-item {
  border: 1px solid #e6eaf2;
  border-radius: 8px;
  background: #fff;
  padding: 0; /* let summary control spacing */
  overflow: hidden;
}

.faq-item:not([open]) .faq-answer {
  display: none;
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 600;
  color: #273449;
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-answer {
  padding: 8px 12px 12px 28px; /* indent answers to align with text after chevron */
  color: #2b3a4f;
  line-height: 1.45;
  font-size: 0.98em;
  border-top: 1px solid #eef2f8;
  background: #fbfdff;
}

/* Chevron (left, slightly lifted) */
.faq-question .chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #242d60;
  border-bottom: 2px solid #242d60;
  transform: translateY(-1px) rotate(-45deg); /* closed: right arrow */
  transition: transform 0.2s ease;
  flex: 0 0 auto;
}

.faq-item[open] .faq-question .chevron {
  transform: translateY(-1px) rotate(45deg); /* open: down arrow */
}

/* Hover/focus affordance */
.faq-item .faq-question:hover {
  background: #f7f9fc;
}

.faq-item .faq-question:focus {
  outline: 2px solid rgba(0, 123, 255, 0.25);
  outline-offset: 2px;
}

