/* ═══════════════════════════════════════════════
   在线印章生成器 — seal_generator.css
═══════════════════════════════════════════════ */

/* ── Component Classes (替代 @apply) ────────── */

.sg-card {
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid #f3f4f6;
}

.sg-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
}

.sg-input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.sg-input:focus {
    border-color: #fb7185;
    box-shadow: 0 0 0 2px rgba(251,113,133,0.3);
}

.sg-select {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.5rem 0.625rem;
    font-size: 0.875rem;
    background-color: #fff;
    outline: none;
}
.sg-select:focus {
    border-color: #fb7185;
    box-shadow: 0 0 0 2px rgba(251,113,133,0.3);
}

.sg-num {
    width: 4rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    text-align: center;
    padding: 0.375rem 0.25rem;
    font-size: 0.875rem;
    outline: none;
}
.sg-num:focus {
    border-color: #fb7185;
    box-shadow: 0 0 0 2px rgba(251,113,133,0.3);
}

.sg-btn-primary {
    width: 100%;
    background-color: #e11d48;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-size: 0.9375rem;
}
.sg-btn-primary:hover {
    background-color: #be123c;
}
.sg-btn-primary:disabled {
    background-color: #fda4af;
    cursor: not-allowed;
}

.sg-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sg-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    background: transparent;
    border: none;
    transition: background-color 0.15s;
}
.sg-accordion-header:hover {
    background-color: #f9fafb;
}

.sg-accordion-title {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.sg-accordion-body {
    padding: 0.25rem 1.25rem 1rem;
    border-top: 1px solid #f3f4f6;
}
.sg-accordion-body > * + * {
    margin-top: 0.875rem;
}

/* ── 透明棋盘格背景 ──────────────────────────── */
.bg-checkerboard {
    background-color: #f0f0f0;
    background-image:
        linear-gradient(45deg, #d8d8d8 25%, transparent 25%),
        linear-gradient(-45deg, #d8d8d8 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d8d8d8 75%),
        linear-gradient(-45deg, transparent 75%, #d8d8d8 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

/* ── Range Slider ─────────────────────────────── */
.mmpdf-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: #e5e7eb;
    cursor: pointer;
    outline: none;
    transition: background 0.2s;
}

.mmpdf-range:hover {
    background: #d1d5db;
}

.mmpdf-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e11d48;
    border: 2.5px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
    margin-top: -6.5px;
}

.mmpdf-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(225,29,72,0.4);
}

.mmpdf-range::-webkit-slider-runnable-track {
    height: 5px;
    border-radius: 3px;
}

.mmpdf-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e11d48;
    border: 2.5px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: transform 0.12s;
}

.mmpdf-range::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.mmpdf-range::-moz-range-track {
    height: 5px;
    background: #e5e7eb;
    border-radius: 3px;
}

/* ── Color Picker ─────────────────────────────── */
input[type="color"] {
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

/* ── SVG Preview Container ────────────────────── */
#svg-preview-container svg {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* ── Disabled buttons ─────────────────────────── */
button:disabled {
    cursor: not-allowed;
}

/* ── Cloak ────────────────────────────────────── */
[x-cloak] { display: none !important; }

/* ── Number input spin buttons ────────────────── */
input[type="number"].sg-num::-webkit-inner-spin-button,
input[type="number"].sg-num::-webkit-outer-spin-button {
    opacity: 0.4;
}
/* Hide scrollbar for Chrome, Safari and Opera */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.scrollbar-hide {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
