/* =====================================================================
   conversion-tool-api — modern base styles (replaces remote Bootstrap 3)
   Provides every class the plugin markup emits, theme-independent.
   The colormag-child theme refines these further.
   ===================================================================== */

:root {
	--ct-border: #e3e8ee;
	--ct-text: #1a2b3c;
	--ct-muted: #5b6b7b;
	--ct-accent: #2563eb;
	--ct-accent-h: #1d4ed8;
	--ct-radius: 12px;
}

/* ---------- Cards (plugin uses BS4 card classes) ---------- */
.card { background: #fff; border: 1px solid var(--ct-border); border-radius: var(--ct-radius); margin-bottom: 20px; }
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--ct-border); font-weight: 700; font-size: 17px; border-radius: var(--ct-radius) var(--ct-radius) 0 0; }
.card-body { padding: 20px; }

/* Plugin markup puts bg-success/text-white on the WHOLE card — restyle so only
   the header is accent-colored and the body stays a normal white card. */
.card.bg-success, .card.text-white { background: #fff !important; color: var(--ct-text) !important; }
.card.bg-success .card-header, .card.text-white .card-header,
.card-header.bg-success { background: var(--ct-accent) !important; color: #fff !important; border-color: var(--ct-accent); }
.card.bg-success .card-body, .card.text-white .card-body { color: var(--ct-text); }
.mb-3 { margin-bottom: 1rem; }
.text-right { text-align: right; }

/* ---------- Alerts ---------- */
.alert { padding: 14px 18px; border-radius: 10px; border: 1px solid transparent; margin: 14px 0; }
.alert-success { background: #e8f6ee; border-color: #bce5cd; color: #14532d; }
.alert-info    { background: #eef3fd; border-color: #c6d8f7; color: #1e3a8a; }
.alert-danger  { background: #fdecec; border-color: #f5c6c6; color: #7f1d1d; }
.alert-link { font-weight: 700; color: inherit; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 10px 22px; border-radius: 10px; border: 1px solid transparent; font-size: 15px; font-weight: 600; cursor: pointer; text-align: center; transition: background .15s ease; }
.btn-primary { background: var(--ct-accent); border-color: var(--ct-accent); color: #fff; }
.btn-primary:hover { background: var(--ct-accent-h); border-color: var(--ct-accent-h); color: #fff; }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Forms ---------- */
.form-control { display: block; width: 100%; max-width: 100%; padding: 10px 14px; font-size: 14px; color: var(--ct-text); background: #fff; border: 1px solid var(--ct-border); border-radius: 10px; box-sizing: border-box; }
.form-control:focus { border-color: var(--ct-accent); outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.ctc-field { display: block; margin: 10px 0; }
.ctc-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ct-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.ctc-check { display: inline-flex; align-items: center; gap: 8px; }
.ctc-check label { font-weight: 600; margin: 0; }
.ctc-help { display: block; font-size: 13px; color: var(--ct-muted); font-style: normal; margin: 8px 0 0; line-height: 1.5; }

/* Section headings inside the tool form ("Source file", "Options", …) */
.my-form h3 { font-size: 18px; font-weight: 700; margin: 22px 0 10px; }
.my-form h3:first-child { margin-top: 0; }

/* ---------- Upload drop zone ---------- */
.ctc-toolcard { background: #fff; border: 1px solid var(--ct-border); border-radius: var(--ct-radius); padding: 24px; }
.ctc-drop { position: relative; border: 2px dashed #b9c7e8; background: #f3f7ff; border-radius: var(--ct-radius); padding: 32px 20px; text-align: center; margin-bottom: 6px; }
.ctc-drop-label { display: block; cursor: pointer; font-size: 16px; color: var(--ct-text); }
.ctc-drop-icon { display: block; font-size: 30px; margin-bottom: 6px; }
.ctc-drop .ctc-file-input { display: block; margin: 12px auto 0; max-width: 320px; }
.ctc-or { display: flex; align-items: center; gap: 10px; color: var(--ct-muted); font-size: 13px; margin: 14px 0 8px; }
.ctc-or::before, .ctc-or::after { content: ""; flex: 1; height: 1px; background: var(--ct-border); }
.ctc-urlrow { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.ctc-urlrow .ctc-field { flex: 1 1 320px; margin: 0; }
#dropboxcontainer { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding-bottom: 6px; }
#dropboxcontainer img { display: block; }
.ctc-submit-row { text-align: center; margin-top: 18px; }
.ctc-btn-big { width: 100%; max-width: 440px; }

/* ---------- Progress ---------- */
.progress { background: #eef3fd; border-radius: 8px; height: 22px; overflow: hidden; margin: 14px 0; }
.progress-bar { background: var(--ct-accent); color: #fff; font-size: 12.5px; line-height: 22px; text-align: center; height: 100%; }
.progress-bar-striped { background-image: linear-gradient(45deg, rgba(255,255,255,.18) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.18) 75%, transparent 75%, transparent); background-size: 1rem 1rem; }
.progress-bar-animated, .progress-bar.active { animation: ct-stripes 1s linear infinite; }
@keyframes ct-stripes { from { background-position: 1rem 0; } to { background-position: 0 0; } }

/* ---------- Lists (search results / downloads) ---------- */
.list-group { padding: 0; margin: 14px 0; list-style: none; border: 1px solid var(--ct-border); border-radius: 10px; overflow: hidden; }
.list-group-item { display: block; padding: 12px 16px; border-bottom: 1px solid var(--ct-border); background: #fff; }
.list-group-item:last-child { border-bottom: none; }

/* ---------- Share row (replaces AddThis) ---------- */
.ctc-share { display: flex; gap: 8px; justify-content: flex-end; margin: 6px 0 14px; flex-wrap: wrap; }
.ctc-share a { font-size: 12.5px; font-weight: 600; color: var(--ct-muted); border: 1px solid var(--ct-border); border-radius: 16px; padding: 4px 12px; text-decoration: none; }
.ctc-share a:hover { color: var(--ct-accent); border-color: var(--ct-accent); }

/* ---------- Loading ---------- */
.ctc-loading { text-align: center; padding: 14px 0; }

/* ---------- Reserved ad containers (zero CLS) ---------- */
.ctc-ad { display: flex; align-items: center; justify-content: center; overflow: hidden; margin: 18px auto; width: 100%; }
.ctc-ad--leaderboard { min-height: 90px; max-width: 728px; }
.ctc-ad--incontent { min-height: 280px; max-width: 336px; }
.ctc-ad--inarticle { min-height: 250px; max-width: 728px; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
	.ctc-urlrow { flex-direction: column; align-items: stretch; }
	.ctc-btn-big { max-width: none; }
	.card-body, .ctc-toolcard { padding: 14px; }
}
