/* ==========================================================================
   PITERWAVE TOOLS SECTION (/tools/)
   Palette aligned with site theme:
   Dark Blue:   #1a365d
   Main Blue:   #3B5E85 / #456A8C / #4682b4
   Light Blue:  #7BA3C8
   Text Slate:  #334155
   Muted Slate: #64748b
   Light Bg:    #f8fafc
   ========================================================================== */

.tools-page {
    padding: 32px 0 80px;
    color: #334155;
}

.tools-container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ===== Breadcrumbs ===== */
.tools-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #64748b;
}

.tools-breadcrumbs__link {
    color: #3B5E85;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tools-breadcrumbs__link:hover {
    color: #1a365d;
    text-decoration: underline;
}

.tools-breadcrumbs__sep {
    color: #cbd5e1;
}

.tools-breadcrumbs__current {
    color: #64748b;
}

/* ===== Header ===== */
.tools-header {
    margin-bottom: 28px;
}

.tools-category-badge {
    display: inline-block;
    background: #ebf4ff;
    color: #2c5282;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.tools-h1 {
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 14px;
}

.tools-intro {
    font-size: 16px;
    line-height: 1.65;
    color: #475569;
    max-width: 820px;
}

.tools-intro p {
    margin: 0 0 10px;
}

.tools-intro p:last-child {
    margin-bottom: 0;
}

/* ===== Widget Wrapper ===== */
.tools-widget-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 8px 28px rgba(26, 54, 93, 0.06);
    margin-bottom: 40px;
}

.tools-widget-placeholder {
    padding: 32px;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
}

.tools-privacy-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 16px;
    background: #f0f7ff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
    color: #2c5282;
}

.tools-privacy-note__icon {
    flex-shrink: 0;
    font-size: 15px;
}

/* ===== Timer Widget (Хрономер 2.0) ===== */
.timer-widget__textarea-wrap {
    margin-bottom: 20px;
}

.timer-widget__label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.timer-widget__label {
    font-size: 15px;
    font-weight: 600;
    color: #1a365d;
}

.timer-widget__live-stats {
    font-size: 13px;
    color: #64748b;
}

.timer-widget__textarea {
    width: 100%;
    min-height: 220px;
    padding: 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.6;
    color: #1e293b;
    background: #fcfdff;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.timer-widget__textarea:focus {
    outline: none;
    border-color: #4682b4;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(70, 130, 180, 0.16);
}

.timer-widget__controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 22px;
}

.timer-widget__panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
}

.timer-widget__panel-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 12px;
}

/* Pace selector */
.timer-pace-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.timer-pace-option {
    position: relative;
    cursor: pointer;
}

.timer-pace-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.timer-pace-option__box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 8px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.timer-pace-option__name {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

.timer-pace-option__meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
}

.timer-pace-option input:checked + .timer-pace-option__box {
    border-color: #3B5E85;
    background: #ebf4ff;
    box-shadow: 0 0 0 2px rgba(59, 94, 133, 0.14);
}

.timer-pace-option input:checked + .timer-pace-option__box .timer-pace-option__name {
    color: #1a365d;
}

.timer-pace-option:hover .timer-pace-option__box {
    border-color: #7BA3C8;
}

/* Target duration inputs */
.timer-target-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.timer-target-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 10px;
}

.timer-target-field input {
    width: 64px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #1a365d;
    text-align: center;
    background: transparent;
}

.timer-target-field input:focus {
    outline: none;
}

.timer-target-field span {
    font-size: 13px;
    color: #64748b;
}

.timer-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.timer-preset-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.timer-preset-btn:hover {
    border-color: #3B5E85;
    color: #1a365d;
    background: #f0f7ff;
}

.timer-preset-btn.is-active {
    border-color: #3B5E85;
    background: #3B5E85;
    color: #ffffff;
}

/* Actions */
.timer-widget__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tools-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.tools-btn--primary {
    color: #ffffff;
    background: linear-gradient(135deg, #2f4f6a 0%, #4682b4 55%, #6a99c4 100%);
}

.tools-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 94, 133, 0.28);
    color: #ffffff;
}

.tools-btn--secondary {
    color: #2c5282;
    background: #ffffff;
    border-color: #cbd5e1;
}

.tools-btn--secondary:hover {
    border-color: #3B5E85;
    background: #f0f7ff;
    color: #1a365d;
}

.tools-btn--danger {
    color: #b91c1c;
    background: #ffffff;
    border-color: #fecaca;
}

.tools-btn--danger:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

/* Results */
.timer-results {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid #e2e8f0;
}

.timer-results[hidden] {
    display: none;
}

.timer-results__headline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.timer-metric-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
}

.timer-metric-card--accent {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0fa 100%);
    border-color: #bfdbfe;
}

.timer-metric-card__label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.timer-metric-card__value {
    font-size: 22px;
    font-weight: 700;
    color: #1a365d;
    line-height: 1.2;
}

.timer-metric-card__sub {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.timer-verdict {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
    margin-bottom: 18px;
}

.timer-verdict--neutral {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.timer-verdict--optimal {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.timer-verdict--short {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.timer-verdict--long {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.timer-paces-table {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.timer-pace-summary {
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timer-pace-summary.is-selected {
    border-color: #4682b4;
    background: #f0f7ff;
}

.timer-pace-summary__label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.timer-pace-summary__time {
    font-size: 17px;
    font-weight: 700;
    color: #1a365d;
}

.timer-pace-summary__hint {
    font-size: 12px;
    color: #64748b;
}

/* ===== SEO Body ===== */
.tools-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 18px;
}

.tools-seo-body {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 40px;
    line-height: 1.7;
    font-size: 16px;
    color: #334155;
}

.tools-seo-body h2 {
    font-size: 22px;
    color: #1a365d;
    margin: 24px 0 12px;
}

.tools-seo-body h2:first-child {
    margin-top: 0;
}

.tools-seo-body h3 {
    font-size: 18px;
    color: #1a365d;
    margin: 20px 0 10px;
}

.tools-seo-body p {
    margin: 0 0 12px;
}

.tools-seo-body ul,
.tools-seo-body ol {
    margin: 0 0 16px;
    padding-left: 22px;
}

.tools-seo-body li {
    margin-bottom: 6px;
}

.tools-seo-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.tools-seo-body th,
.tools-seo-body td {
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    text-align: left;
}

.tools-seo-body th {
    background: #f8fafc;
    color: #1a365d;
    font-weight: 700;
}

/* ===== FAQ ===== */
.tools-faq {
    margin-bottom: 40px;
}

.tools-faq__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tools-faq__item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tools-faq__item[open] {
    border-color: #bfdbfe;
    box-shadow: 0 4px 16px rgba(59, 94, 133, 0.08);
}

.tools-faq__question {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    font-size: 16px;
    font-weight: 600;
    color: #1a365d;
    user-select: none;
}

.tools-faq__question::-webkit-details-marker {
    display: none;
}

.tools-faq__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ebf4ff;
    color: #2c5282;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.tools-faq__q-text {
    flex: 1;
}

.tools-faq__chevron {
    color: #64748b;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.tools-faq__item[open] .tools-faq__chevron {
    transform: rotate(90deg);
    color: #3B5E85;
}

.tools-faq__answer {
    padding: 0 20px 18px 62px;
    font-size: 15px;
    line-height: 1.65;
    color: #475569;
}

.tools-faq__answer p {
    margin: 0 0 10px;
}

.tools-faq__answer p:last-child {
    margin-bottom: 0;
}

/* ===== Related & Hub Cards ===== */
.tools-hub-group,
.tools-related {
    margin-bottom: 40px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tools-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tools-card:hover {
    transform: translateY(-3px);
    border-color: #93c5fd;
    box-shadow: 0 10px 24px rgba(26, 54, 93, 0.09);
}

.tools-card__category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #3B5E85;
    margin-bottom: 8px;
}

.tools-card__title {
    font-size: 18px;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 10px;
    line-height: 1.3;
}

.tools-card__desc {
    font-size: 14px;
    line-height: 1.55;
    color: #475569;
    margin: 0 0 16px;
    flex: 1;
}

.tools-card__cta {
    font-size: 14px;
    font-weight: 600;
    color: #3B5E85;
}

.tools-empty {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 36px 24px;
    text-align: center;
    color: #64748b;
    margin-bottom: 40px;
}

/* ===== Studio CTA ===== */
.tools-studio-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #f0f7ff 0%, #f8fafc 100%);
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 26px 30px;
}

.tools-studio-cta__content {
    flex: 1;
    min-width: 260px;
}

.tools-studio-cta__title {
    font-size: 20px;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 8px;
}

.tools-studio-cta__text {
    font-size: 15px;
    line-height: 1.55;
    color: #475569;
    margin: 0;
}

.tools-studio-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ===== Responsive ===== */
@media (max-width: 820px) {
    .timer-widget__controls {
        grid-template-columns: 1fr;
    }

    .timer-results__headline {
        grid-template-columns: repeat(2, 1fr);
    }

    .timer-paces-table {
        grid-template-columns: 1fr;
    }
}

/* ===== Extract Audio Widget (Извлечь звук из видео) ===== */
.extract-widget {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.extract-privacy-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0f9ff 100%);
    border: 1.5px solid #86efac;
    border-radius: 12px;
    color: #14532d;
}

.extract-privacy-banner__icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.extract-privacy-banner__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.extract-privacy-banner__title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: #065f46;
}

.extract-privacy-banner__desc {
    font-size: 14px;
    line-height: 1.5;
    color: #1e4620;
}

.extract-alert {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.55;
}

.extract-alert[hidden] {
    display: none;
}

.extract-alert p {
    margin: 6px 0 0;
}

.extract-alert--warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.extract-alert--info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
}

.extract-alert--error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    font-weight: 500;
}

.extract-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 36px 24px;
    border: 2px dashed #93c5fd;
    border-radius: 14px;
    background: #f8fbff;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.extract-dropzone[hidden] {
    display: none;
}

.extract-dropzone:hover,
.extract-dropzone:focus-visible {
    outline: none;
    border-color: #3B5E85;
    background: #f0f7ff;
    box-shadow: 0 0 0 3px rgba(59, 94, 133, 0.14);
}

.extract-dropzone.is-dragover {
    border-color: #2c5282;
    background: #e6f0fa;
    box-shadow: 0 0 0 4px rgba(70, 130, 180, 0.2);
}

.extract-dropzone.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.extract-dropzone__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.extract-dropzone__icon {
    font-size: 36px;
    line-height: 1;
}

.extract-dropzone__title {
    font-size: 17px;
    font-weight: 700;
    color: #1a365d;
}

.extract-dropzone__meta {
    font-size: 14px;
    color: #64748b;
}

.extract-dropzone__btn {
    margin-top: 6px;
}

.extract-file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1.5px solid #bfdbfe;
    border-radius: 12px;
}

.extract-file-info[hidden] {
    display: none;
}

.extract-file-info__details {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.extract-file-info__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    background: #3B5E85;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.extract-file-info__text {
    min-width: 0;
}

.extract-file-info__name {
    font-size: 15px;
    font-weight: 700;
    color: #1a365d;
    word-break: break-word;
}

.extract-file-info__size {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}

.extract-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.extract-options__group {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
}

.extract-options__group[hidden] {
    display: none;
}

.extract-format-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.extract-bitrate-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.extract-progress {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
}

.extract-progress[hidden] {
    display: none;
}

.extract-progress__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 14px;
}

.extract-progress__stage {
    font-weight: 600;
    color: #1a365d;
}

.extract-progress__percent {
    font-weight: 700;
    color: #3B5E85;
}

.extract-progress__track {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.extract-progress__fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2f4f6a 0%, #4682b4 60%, #7BA3C8 100%);
    transition: width 0.2s ease;
}

.extract-result {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 14px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.extract-result[hidden] {
    display: none;
}

.extract-result__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.extract-result__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #065f46;
    background: #d1fae5;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.extract-result__title {
    font-size: 17px;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 4px;
    word-break: break-word;
}

.extract-result__meta {
    font-size: 13px;
    color: #475569;
}

.extract-result__audio {
    width: 100%;
}

.tools-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (max-width: 820px) {
    .extract-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .extract-format-grid,
    .extract-bitrate-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .tools-h1 {
        font-size: 25px;
    }

    .tools-widget-section,
    .tools-seo-body,
    .tools-studio-cta {
        padding: 20px 16px;
    }

    .timer-pace-options {
        grid-template-columns: 1fr;
    }

    .timer-results__headline {
        grid-template-columns: 1fr;
    }

    .tools-faq__answer {
        padding: 0 16px 16px 16px;
    }
}

/* ===== Trim Audio Widget (Обрезка аудио) ===== */
.trim-widget,
.merge-widget {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.trim-editor {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.trim-editor[hidden] {
    display: none;
}

.trim-waveform-wrap {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
}

.trim-waveform-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.trim-waveform-header__title {
    font-size: 14px;
    font-weight: 700;
    color: #1a365d;
}

.trim-waveform-header__selection {
    font-size: 13px;
    font-weight: 600;
    color: #2c5282;
    background: #ebf4ff;
    padding: 4px 10px;
    border-radius: 999px;
}

.trim-canvas-box {
    width: 100%;
    height: 136px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    cursor: ew-resize;
}

.trim-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.trim-timeline-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.trim-range-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.trim-range-field {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trim-range-field__top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.trim-range-field__label {
    font-size: 13px;
    font-weight: 700;
    color: #1a365d;
}

.trim-range-field__formatted {
    font-size: 13px;
    font-weight: 700;
    color: #3B5E85;
    font-variant-numeric: tabular-nums;
}

.trim-slider {
    width: 100%;
    accent-color: #3B5E85;
    cursor: pointer;
}

.trim-number-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 5px 10px;
}

.trim-number-input {
    width: 82px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #1a365d;
    background: transparent;
}

.trim-number-input:focus {
    outline: none;
}

.trim-number-unit {
    font-size: 13px;
    color: #64748b;
}

/* ===== Merge Audio Widget (Склейка аудио) ===== */
.merge-list-wrap {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.merge-list-wrap[hidden] {
    display: none;
}

.merge-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.merge-list-header__title {
    margin: 0 0 4px;
}

.merge-list-header__hint {
    font-size: 13px;
    color: #64748b;
}

.merge-track-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.merge-track-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: grab;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.merge-track-item:hover {
    border-color: #93c5fd;
    box-shadow: 0 3px 10px rgba(26, 54, 93, 0.06);
}

.merge-track-item.is-dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.merge-track-item.is-drop-target {
    border-color: #3B5E85;
    background: #f0f7ff;
}

.merge-track-item__handle {
    font-size: 16px;
    color: #94a3b8;
    letter-spacing: -1px;
    user-select: none;
    flex-shrink: 0;
}

.merge-track-item__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ebf4ff;
    color: #2c5282;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.merge-track-item__ext {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #3B5E85;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.merge-track-item__info {
    min-width: 0;
    flex: 1;
}

.merge-track-item__name {
    font-size: 14px;
    font-weight: 600;
    color: #1a365d;
    word-break: break-word;
}

.merge-track-item__size {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.merge-track-item__controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.merge-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.merge-icon-btn:hover:not(:disabled) {
    border-color: #3B5E85;
    color: #1a365d;
    background: #f0f7ff;
}

.merge-icon-btn--danger:hover:not(:disabled) {
    border-color: #ef4444;
    color: #b91c1c;
    background: #fef2f2;
}

.merge-icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (max-width: 720px) {
    .trim-range-controls {
        grid-template-columns: 1fr;
    }

    .merge-track-item {
        flex-wrap: wrap;
    }
}

/* ===== Convert Audio Widget (Конвертер аудио) ===== */
.convert-widget {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.convert-select-label {
    display: block;
}

.convert-select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #1a365d;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.convert-select:focus {
    outline: none;
    border-color: #3B5E85;
    box-shadow: 0 0 0 3px rgba(59, 94, 133, 0.14);
}

.convert-select-hint {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}
