/* Audio Extractor - /app/audio-extractor/
   Tool-only styles. The page title bar, FAQ, related tools and the "Updated"
   pill use the shared site styles in assets/css/main.css.
   Contrast: #2f6e8d on #fff 5.6:1, #4a5d6b on #fff 7.2:1, #fff on #2f7f6b 5.2:1,
   #fff on #3b779b 4.9:1. No left-stripe accents. */

.audio-extractor-tool { max-width: 960px; margin: 0 auto; min-width: 0; }
.audio-extractor-tool .content__header { margin-bottom: 1rem; border-radius: 8px; }
.audio-extractor-tool [hidden] { display: none !important; }

.ae-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---- card ---------------------------------------------------------------- */
.ae-card {
	position: relative;
	background: #fff;
	border: 1px solid #dfe9ef;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
	margin-bottom: 1.75rem;
	transition: border-color .2s, box-shadow .2s;
}
.ae-card.is-dragging { border-color: #4bb2d5; box-shadow: 0 0 0 4px rgba(75, 178, 213, .25); }

.ae-intro { padding: 1.25rem 1.5rem 0; }
.ae-intro__text { margin: 0 0 .75rem; font-size: .97rem; line-height: 1.6; color: #374351; }
.ae-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ae-chips li {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 4px 11px;
	border: 1px solid #cfe1eb; border-radius: 999px;
	background: #f4f9fc;
	font-size: .8rem; font-weight: 600; color: #2f6e8d;
}

/* ---- drop zone ----------------------------------------------------------- */
.ae-drop {
	margin: 1.25rem 1.5rem 1.5rem;
	padding: 2rem 1.25rem;
	text-align: center;
	border: 2px dashed #9fcbe0;
	border-radius: 10px;
	background: #f7fcfe;
	cursor: pointer;
	transition: background .2s, border-color .2s;
}
.ae-drop:hover, .ae-card.is-dragging .ae-drop { background: #e8f5fb; border-color: #4bb2d5; }
.ae-drop__icon { display: block; font-size: 2.6rem; line-height: 1; color: #3b9cc4; margin-bottom: .6rem; }
.ae-drop__title { margin: 0 0 .25rem; font-size: 1.1rem; font-weight: 700; color: #2f6e8d; }
.ae-drop__sub { margin: 0 auto 1.1rem; max-width: 440px; font-size: .85rem; line-height: 1.5; color: #5a6f7d; }

/* ---- buttons ------------------------------------------------------------- */
.ae-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px;
	padding: 10px 20px;
	border: 1px solid transparent;
	border-radius: 8px;
	font: 600 .97rem/1.2 "Open Sans", sans-serif;
	text-decoration: none !important;
	cursor: pointer;
	transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.ae-btn:focus-visible, .ae-link-btn:focus-visible, .ae-file__change:focus-visible { outline: 3px solid #2f6e8d; outline-offset: 2px; }
.ae-btn--primary { background: #3b779b; color: #fff !important; }
.ae-btn--primary:hover { background: #2f6e8d; }
.ae-btn--go {
	width: 100%;
	min-height: 52px;
	font-size: 1.08rem; font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, #2f7f6b 0%, #2f6e8d 100%);
}
.ae-btn--go:hover { box-shadow: 0 6px 18px rgba(47, 127, 107, .3); transform: translateY(-1px); }
.ae-btn--download { background: #2f7f6b; color: #fff !important; }
.ae-btn--download:hover { background: #256a59; }
.ae-btn--ghost { background: #eef5f9; color: #2f6e8d !important; border-color: #c4dbe7; }
.ae-btn--ghost:hover { background: #ddebf3; }
.ae-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.ae-link-btn {
	min-height: 32px; padding: 4px 8px;
	background: none; border: 0; border-radius: 6px;
	font: 600 .85rem "Open Sans", sans-serif; color: #b4341f;
	text-decoration: underline; text-underline-offset: 3px;
	cursor: pointer;
}

/* ---- working area -------------------------------------------------------- */
.ae-work { padding: 1.25rem 1.5rem 1.5rem; }

.ae-file {
	display: flex; align-items: center; gap: 12px;
	padding: 10px 12px;
	background: #f4f9fc;
	border: 1px solid #d5e7f0;
	border-radius: 10px;
	margin-bottom: 1.1rem;
}
.ae-file__thumb {
	width: 72px; height: 44px; flex-shrink: 0;
	display: flex; align-items: center; justify-content: center;
	border-radius: 6px; overflow: hidden;
	background: #2f6e8d; color: #fff; font-size: 1.3rem;
}
.ae-file__thumb canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.ae-file__info { flex: 1; min-width: 0; }
.ae-file__name { font-weight: 700; color: #2f6e8d; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ae-file__meta { margin-top: 2px; font-size: .82rem; color: #4a5d6b; font-variant-numeric: tabular-nums; }
.ae-file__change {
	display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
	min-height: 40px; padding: 6px 12px;
	background: #fff; border: 1px solid #c4dbe7; border-radius: 8px;
	font: 600 .85rem "Open Sans", sans-serif; color: #2f6e8d;
	cursor: pointer;
}
.ae-file__change:hover { background: #eef5f9; }
.ae-file__change:disabled { opacity: .5; cursor: not-allowed; }

/* ---- settings ------------------------------------------------------------ */
.ae-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; border: 0; margin: 0; padding: 0; }
.ae-label { font-size: .78rem; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: #4a5d6b; padding: 0; }
.ae-field--formats { margin-bottom: 1rem; }
.ae-formats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ae-format { position: relative; display: block; cursor: pointer; }
.ae-format input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ae-format span {
	display: flex; flex-direction: column; gap: 2px;
	min-height: 56px; height: 100%;
	padding: 9px 11px;
	border: 1px solid #cfe1eb; border-radius: 9px;
	background: #fff;
	transition: border-color .15s, background .15s, box-shadow .15s;
}
.ae-format strong { font-size: .95rem; color: #2f6e8d; }
.ae-format small { font-size: .74rem; line-height: 1.3; color: #5a6f7d; }
.ae-format:hover span { border-color: #4bb2d5; }
.ae-format input:checked + span { border-color: #2f6e8d; background: #eaf4fa; box-shadow: inset 0 0 0 1px #2f6e8d; }
.ae-format input:focus-visible + span { outline: 3px solid #2f6e8d; outline-offset: 2px; }

.ae-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 1rem; }
.ae-row > .ae-field { flex: 1 1 200px; }
.ae-select, .ae-input {
	width: 100%;
	min-height: 44px;
	padding: 8px 10px;
	border: 1px solid #b9cfdc; border-radius: 8px;
	background: #fff;
	font: .95rem "Open Sans", sans-serif; color: #263845;
}
.ae-select:focus, .ae-input:focus { outline: 3px solid rgba(75, 178, 213, .45); border-color: #3b779b; }
.ae-input { font-variant-numeric: tabular-nums; }

.ae-note {
	display: flex; gap: 8px; align-items: flex-start;
	margin: -.25rem 0 1rem; padding: 10px 12px;
	background: #f0f8f5; border: 1px solid #c3e2d7; border-radius: 8px;
	font-size: .87rem; line-height: 1.5; color: #285a4c;
}
.ae-note i { margin-top: 2px; }

.ae-trim { margin-bottom: 1.1rem; border: 1px solid #dfe9ef; border-radius: 10px; background: #fbfdfe; }
.ae-trim summary {
	display: flex; align-items: center; gap: 8px;
	min-height: 46px; padding: 10px 14px;
	font-weight: 600; font-size: .93rem; color: #2f6e8d;
	cursor: pointer; list-style: none;
}
.ae-trim summary::-webkit-details-marker { display: none; }
.ae-trim summary::after { content: "\F282"; font-family: "bootstrap-icons"; margin-left: auto; font-size: .85rem; transition: transform .2s; }
.ae-trim[open] summary::after { transform: rotate(180deg); }
.ae-trim summary:focus-visible { outline: 3px solid #2f6e8d; outline-offset: -3px; border-radius: 10px; }
.ae-trim__opt { font-size: .74rem; font-weight: 600; color: #5a6f7d; background: #eef3f6; border-radius: 999px; padding: 2px 8px; }
.ae-trim__fields { padding: 0 14px; margin-bottom: .5rem; }
.ae-trim__help { margin: 0; padding: 0 14px 12px; font-size: .8rem; color: #5a6f7d; }

.ae-go { display: flex; flex-direction: column; gap: 8px; }
.ae-estimate { margin: 0; min-height: 1.2em; text-align: center; font-size: .85rem; color: #4a5d6b; font-variant-numeric: tabular-nums; }

/* ---- progress ------------------------------------------------------------ */
.ae-progress { padding: .5rem 0; }
.ae-progress__labels { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: .9rem; font-weight: 700; color: #2f6e8d; font-variant-numeric: tabular-nums; }
.ae-progress__track { height: 12px; border-radius: 8px; background: #ddeef7; overflow: hidden; }
.ae-progress__fill { width: 0; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #3b9cc4, #2f7f6b); transition: width .3s ease; }
.ae-progress__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.ae-progress__status { min-width: 0; font-size: .82rem; color: #4a5d6b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- error --------------------------------------------------------------- */
.ae-error {
	display: flex; gap: 10px; align-items: flex-start;
	margin-top: 1rem; padding: 12px 14px;
	background: #fff5f4; border: 1px solid #f1c3bd; border-radius: 8px;
	font-size: .92rem; line-height: 1.5; color: #9f2d1c;
}
.ae-error i { margin-top: 2px; }

/* ---- result -------------------------------------------------------------- */
.ae-result {
	padding: 1rem;
	background: #f2fbf8;
	border: 1px solid #bfe3d6;
	border-radius: 10px;
	animation: ae-in .3s ease;
}
.ae-result:focus { outline: none; }
.ae-result:focus-visible { outline: 3px solid #2f7f6b; outline-offset: 2px; }
@keyframes ae-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ae-result__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; min-width: 0; }
.ae-result__head > div:last-child { min-width: 0; }
.ae-result__check { width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #2f7f6b; color: #fff; font-size: 1.3rem; }
.ae-result__title { margin: 0; font-size: 1.05rem; font-weight: 700; color: #22614f; }
.ae-result__meta { margin: 2px 0 0; font-size: .85rem; color: #3f6b5d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ae-result__player { display: block; width: 100%; height: 44px; margin-bottom: 12px; }
.ae-result__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ae-result__hint { margin: 10px 0 0; font-size: .85rem; color: #3f6b5d; }

/* ---- privacy line -------------------------------------------------------- */
.ae-privacy {
	display: flex; gap: 10px; align-items: flex-start;
	margin: 0; padding: 12px 1.5rem;
	border-top: 1px solid #e6eef3;
	border-radius: 0 0 12px 12px;
	background: #f6fafc;
	font-size: .85rem; line-height: 1.55; color: #3f5563;
}
.ae-privacy i { color: #3b779b; margin-top: 2px; }

/* ---- content sections ---------------------------------------------------- */
.ae-section {
	background: #fff;
	border: 1px solid #e3ebf0;
	border-radius: 12px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1.75rem;
}
.ae-section__title { display: flex; align-items: center; gap: 8px; margin: 0 0 1rem; font-size: 1.15rem; font-weight: 700; color: #2f6e8d; }
.ae-section__title i { color: #3b9cc4; }

.ae-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.ae-step { display: flex; gap: 12px; padding: 14px; background: #f8fbfc; border: 1px solid #edf2f5; border-radius: 10px; }
.ae-step__num { width: 30px; height: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #2f6e8d; color: #fff; font-weight: 700; font-size: .9rem; }
.ae-step__title { margin: 3px 0 4px; font-size: .95rem; font-weight: 700; color: #2f6e8d; }
.ae-step p { margin: 0; font-size: .86rem; line-height: 1.5; color: #4a5d6b; }

.ae-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ae-feature { display: flex; gap: 12px; padding: 14px; background: #f8fbfc; border: 1px solid #edf2f5; border-radius: 10px; }
.ae-feature > i { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: #e3f2f9; color: #2f7fa8; font-size: 1.05rem; }
.ae-feature h3 { margin: 0 0 3px; font-size: .92rem; font-weight: 700; color: #2f6e8d; }
.ae-feature p { margin: 0; font-size: .83rem; line-height: 1.45; color: #4a5d6b; }

.ae-faq .faq-heading { margin: 0; font-size: inherit; }
.ae-rel--green  { background: #2f7f6b; }
.ae-rel--blue   { background: #3b779b; }
.ae-rel--purple { background: #7d3c98; }
.ae-rel--red    { background: #b4341f; }

/* ---- small screens ------------------------------------------------------- */
@media (max-width: 860px) {
	.ae-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.ae-intro { padding: 1rem 1rem 0; }
	.ae-intro__text { font-size: .93rem; }
	.ae-drop { margin: 1rem; padding: 1.5rem 1rem; }
	.ae-drop__icon { font-size: 2.2rem; }
	.ae-work { padding: 1rem; }
	.ae-file { flex-wrap: wrap; }
	.ae-file__thumb { width: 56px; height: 36px; font-size: 1.1rem; }
	.ae-file__change span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.ae-file__change { width: 44px; height: 44px; padding: 0; justify-content: center; }
	.ae-file { flex-wrap: nowrap; }
	.ae-formats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ae-result__actions .ae-btn { flex: 1 1 100%; }
	.ae-privacy { padding: 12px 1rem; }
	.ae-section { padding: 1rem; }
	.ae-steps, .ae-features { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.ae-result { animation: none; }
	.ae-btn, .ae-progress__fill { transition: none; }
}
