/* ISBN Barcode Generator — Elementor Form Widget CSS */

/* ── Widget wrapper ─────────────────────────────────────────────────────── */
.ibg-ef-widget {
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
}
.ibg-ef-widget *,
.ibg-ef-widget *::before,
.ibg-ef-widget *::after {
    box-sizing: border-box;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.ibg-ef-header {
    margin-bottom: 16px;
}
.ibg-ef-title {
    margin: 0 0 6px;
    line-height: 1.3;
}
.ibg-ef-subtitle {
    margin: 0;
    line-height: 1.5;
}

/* ── Disclaimer ─────────────────────────────────────────────────────────── */
.ibg-ef-disclaimer {
    background: #fffbeb;
    border: 1px solid #f0c040;
    border-left: 4px solid #e6a817;
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 0.85em;
    color: #5a4000;
    margin-bottom: 20px;
    line-height: 1.5;
}
.ibg-ef-disclaimer a { color: inherit; }

/* ── Fields row ─────────────────────────────────────────────────────────── */
.ibg-ef-fields-row {
    margin-bottom: 16px;
}
.ibg-ef-fields-row.ibg-ef-fields-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.ibg-ef-fields-column {
    flex-direction: column !important;
}
.ibg-ef-fields-row .ibg-ef-field {
    flex: 1 1 180px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ── Label ──────────────────────────────────────────────────────────────── */
.ibg-ef-label {
    display: block;
    font-weight: 600;
    font-size: 0.9em;
    color: #1d2327;
    line-height: 1.3;
}
.ibg-ef-label-opt {
    font-weight: 400;
    font-size: 0.85em;
    color: #8c8f94;
}

/* ── Input ──────────────────────────────────────────────────────────────── */
.ibg-ef-input {
    display: block;
    width: 100%;
    padding: 9px 12px;
    font-size: 1em;
    font-family: inherit;
    color: inherit;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 4px;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}
.ibg-ef-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba( 34, 113, 177, .18 );
}
.ibg-ef-hint {
    font-size: 0.78em;
    color: #8c8f94;
    line-height: 1.3;
}

/* ── Button ─────────────────────────────────────────────────────────────── */
.ibg-ef-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 28px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
    transition: background .2s, color .2s, border-color .2s;
    -webkit-appearance: none;
    appearance: none;
}
.ibg-ef-btn:hover   { background: #135e96; }
.ibg-ef-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    pointer-events: none;
}
.ibg-ef-btn-full {
    display: flex;
    width: 100%;
}

/* ── Error ──────────────────────────────────────────────────────────────── */
.ibg-ef-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-left: 4px solid #dc2626;
    border-radius: 4px;
    font-size: 0.9em;
    color: #991b1b;
    line-height: 1.4;
}

/* ── Result area ────────────────────────────────────────────────────────── */
.ibg-ef-result {
    margin-top: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.ibg-ef-result-inner {
    display: flex;
    gap: 24px;
    padding: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* ── Preview ─────────────────────────────────────────────────────────────── */
.ibg-ef-preview {
    flex: 0 0 220px;
    max-width: 220px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ibg-ef-preview svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Result info ─────────────────────────────────────────────────────────── */
.ibg-ef-result-info {
    flex: 1 1 160px;
    min-width: 0;
}
.ibg-ef-isbn-label {
    font-size: 0.82em;
    color: #888;
    margin: 0 0 3px;
    line-height: 1.3;
}
.ibg-ef-isbn-val {
    margin: 0 0 8px;
}
.ibg-ef-isbn-val-code {
    font-size: 1.1em;
    letter-spacing: 1px;
    color: #1e3a5f;
    font-weight: 700;
    word-break: break-all;
}
.ibg-ef-title-line {
    font-size: 0.9em;
    color: #444;
    margin: 0 0 8px;
}
.ibg-ef-filename-hint {
    font-size: 0.82em;
    color: #888;
    margin: 0 0 2px;
    word-break: break-all;
}
.ibg-ef-filename-hint code {
    font-size: 1em;
}

/* ── Download button ─────────────────────────────────────────────────────── */
.ibg-ef-dl-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 9px 22px;
    background: #16a34a;
    color: #fff !important;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95em;
    font-family: inherit;
    text-decoration: none !important;
    transition: background .15s, color .15s;
    border: none;
}
.ibg-ef-dl-btn:hover {
    background: #15803d;
    color: #fff !important;
}

/* ── Mini disclaimer ────────────────────────────────────────────────────── */
.ibg-ef-mini-disc {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 10px 20px;
    font-size: 0.78em;
    color: #888;
    line-height: 1.5;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media ( max-width: 540px ) {
    .ibg-ef-result-inner { flex-direction: column; }
    .ibg-ef-preview      { flex: none; max-width: 100%; width: 100%; }
    .ibg-ef-fields-row   { flex-direction: column; }
}
