/* Image2PDF Tools \u2013 converter widget styles. Loaded only on pages that show the tool. */
.i2p-tool { max-width: 100%; }
.i2p-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.i2p-error { background: #FBEAEA; border: 1px solid #E3A6A6; color: #7A2020; padding: .85rem 1rem; border-radius: 10px; margin: 0 0 1rem; font-size: .95rem; }
.i2p-error p { margin: 0; }
.i2p-error p + p { margin-top: .35rem; }

.i2p-tool__panel { border: 1px solid var(--line, #DDE3E0); border-radius: 14px; background: var(--surface, #fff); padding: 1.5rem; transition: border-color .15s ease, background .15s ease; }
.i2p-tool__panel.is-drag { border-color: var(--i2p-primary, #0E7C86); background: rgba(var(--i2p-primary-rgb, 14,124,134), .04); }

.i2p-drop { text-align: center; padding: 2.75rem 1.25rem; border: 1.5px dashed var(--line, #DDE3E0); border-radius: 12px; cursor: pointer; }
.i2p-drop__icon { display: inline-flex; color: var(--i2p-primary, #0E7C86); margin-bottom: .5rem; }
.i2p-drop__title { font-family: var(--font-display, serif); font-size: 1.3rem; margin: .25rem 0 .2rem; color: var(--ink, #16231F); }
.i2p-drop__sub { color: #5B6B65; margin: 0 0 1.1rem; }
.i2p-drop__hint { color: #778680; font-size: .85rem; margin: 1rem 0 0; }

.i2p-btn { display: inline-flex; align-items: center; gap: .45rem; font: inherit; font-weight: 600; font-size: .95rem; border-radius: 9px; border: 1px solid transparent; padding: .65rem 1.2rem; cursor: pointer; text-decoration: none; line-height: 1.2; transition: background .15s ease, border-color .15s ease, color .15s ease, transform .05s ease; }
.i2p-btn:active { transform: translateY(1px); }
.i2p-btn--primary { background: var(--i2p-primary, #0E7C86); color: #fff; }
.i2p-btn--primary:hover { background: var(--i2p-primary-dark, #0A5860); }
.i2p-btn--soft { background: rgba(var(--i2p-primary-rgb, 14,124,134), .08); color: var(--i2p-primary-dark, #0A5860); }
.i2p-btn--soft:hover { background: rgba(var(--i2p-primary-rgb, 14,124,134), .15); }
.i2p-btn--ghost { background: transparent; color: #5B6B65; border-color: var(--line, #DDE3E0); }
.i2p-btn--ghost:hover { border-color: #B8C3BE; color: var(--ink, #16231F); }
.i2p-btn--lg { padding: .85rem 1.6rem; font-size: 1rem; }
.i2p-btn--wide { width: 100%; justify-content: center; }
.i2p-btn:disabled { opacity: .5; cursor: not-allowed; }
.i2p-btn:focus-visible, .i2p-icon-btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--i2p-primary, #0E7C86); outline-offset: 2px; }

.i2p-work__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.i2p-work__head h3 { margin: 0; font-family: var(--font-display, serif); font-size: 1.2rem; }
.i2p-work__head span { color: #778680; font-weight: 400; font-size: 1rem; }
.i2p-work__btns { display: flex; gap: .5rem; flex-wrap: wrap; }

.i2p-cards { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .85rem; }
.i2p-card { position: relative; border: 1px solid var(--line, #DDE3E0); border-radius: 10px; padding: .6rem; background: #FCFDFC; touch-action: none; }
.i2p-card.is-dragging { opacity: .55; border-style: dashed; }
.i2p-card__thumb { position: relative; aspect-ratio: 4 / 3; background: #EEF1EF; border-radius: 7px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.i2p-card__thumb img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.i2p-card.is-nothumb .i2p-card__thumb img { display: none; }
.i2p-card__thumb::after { content: attr(data-ext); position: absolute; inset: 0; display: none; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; letter-spacing: .02em; color: #778680; }
.i2p-card.is-nothumb .i2p-card__thumb::after { display: flex; }
.i2p-card__num { position: absolute; top: 6px; left: 6px; background: rgba(22,35,31,.72); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1; padding: .28rem .45rem; border-radius: 6px; z-index: 1; }
.i2p-card__name { font-size: .82rem; margin: .5rem 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink, #16231F); }
.i2p-card__meta { font-size: .74rem; color: #8A9691; margin: .1rem 0 .45rem; }
.i2p-card__tools { display: flex; gap: .25rem; }
.i2p-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line, #DDE3E0); background: #fff; color: #5B6B65; cursor: pointer; }
.i2p-icon-btn:hover:not(:disabled) { border-color: #B8C3BE; color: var(--ink, #16231F); }
.i2p-icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.i2p-icon-btn--danger:hover { color: #B23A3A; border-color: #E3A6A6; }
.i2p-handle { cursor: grab; touch-action: none; }
.i2p-handle:active { cursor: grabbing; }
.i2p-hint { font-size: .85rem; color: #778680; margin: .25rem 0 1.25rem; }

.i2p-settings { border: 1px solid var(--line, #DDE3E0); border-radius: 12px; padding: 1.1rem 1.1rem .9rem; margin: 0 0 .25rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .9rem 1rem; }
.i2p-settings legend { font-weight: 700; font-size: .85rem; padding: 0 .4rem; color: var(--ink, #16231F); }
.i2p-field label { display: block; font-size: .8rem; font-weight: 600; color: #5B6B65; margin-bottom: .3rem; }
.i2p-field select, .i2p-field input[type="text"] { width: 100%; padding: .55rem .65rem; border: 1px solid var(--line, #DDE3E0); border-radius: 8px; font: inherit; font-size: .92rem; background: #fff; color: var(--ink, #16231F); }

.i2p-actions { margin-top: 1.25rem; }

.i2p-progress { text-align: center; padding: 2.5rem 1rem; }
.i2p-progress__label { font-weight: 700; font-size: 1.05rem; margin: 0 0 1rem; color: var(--ink, #16231F); }
.i2p-bar { height: 10px; border-radius: 999px; background: #EEF1EF; overflow: hidden; max-width: 420px; margin: 0 auto; }
.i2p-bar span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--i2p-primary, #0E7C86), #F2A65A); transition: width .25s ease; }
.i2p-progress__sub { font-size: .85rem; color: #778680; margin: .85rem 0 1.5rem; min-height: 1.2em; }

.i2p-done { text-align: center; padding: 2.5rem 1rem; }
.i2p-done__icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(var(--i2p-primary-rgb, 14,124,134), .1); color: var(--i2p-primary, #0E7C86); margin-bottom: .75rem; }
.i2p-done h3 { font-family: var(--font-display, serif); font-size: 1.4rem; margin: 0 0 .35rem; }
.i2p-done__info { color: #5B6B65; margin: 0 0 1.4rem; font-size: .92rem; }
.i2p-done__btns { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; }

.i2p-privacy-note { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: #5B6B65; margin: 1rem .25rem 0; }
.i2p-privacy-note svg { flex: none; color: var(--i2p-primary, #0E7C86); }

@media (max-width: 640px) {
  .i2p-tool__panel { padding: 1.1rem; border-radius: 12px; }
  .i2p-drop { padding: 2.1rem 1rem; }
  .i2p-cards { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .i2p-done__btns, .i2p-work__btns { flex-direction: column; align-items: stretch; }
  .i2p-done__btns .i2p-btn, .i2p-work__btns .i2p-btn { justify-content: center; }
}

/* Ad slots (shared across theme + converter placement) */
.i2p-ad { border: 1px dashed var(--line, #DDE3E0); border-radius: 10px; background: #FAFBFA; padding: .6rem; text-align: center; }
.i2p-ad__label { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .03em; color: #9AA6A1; margin-bottom: .4rem; }
.i2p-ad__slot { min-height: 90px; display: flex; align-items: center; justify-content: center; color: #B8C3BE; font-size: .78rem; }
.i2p-ad__slot:empty::before { content: "\2014"; }
