/* Default Email Signature Generator — light pastel theme.
   --brand and --page-bg are updated at runtime by script.js. */

:root {
    --brand: #6FA88A;
    --page-bg: #E8F2EB;
    --ink: #1F2A24;
    --muted: #6B7470;
    --surface: #FFFFFF;
    --surface-dark: #1F2A24;
    --line: rgba(31, 42, 36, 0.10);
}

body {
    font-family: 'Inter', sans-serif;
    transition: background-color 200ms ease;
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(31, 42, 36, 0.04), 0 8px 24px rgba(31, 42, 36, 0.06);
}

.card-dark {
    background: var(--surface-dark);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Form */
.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 0.2rem;
}

.form-label-sm {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 0.2rem;
}

.form-input {
    width: 100%;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0.4rem 0.6rem;
    font-size: 0.8125rem;
    color: var(--ink);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-input::placeholder {
    color: #A8AFAB;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.form-input-sm {
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
}

.form-collapsible {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FAFAFA;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0.45rem 0.65rem;
    transition: background-color 120ms ease;
}

.form-collapsible:hover {
    background: #F3F4F2;
}

/* Upload button */
.upload-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #FAFAFA;
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    color: var(--ink);
    font-size: 0.8125rem;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.upload-btn:hover {
    background: #F3F4F2;
    border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.75rem;
    padding: 0 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: transform 100ms ease, box-shadow 150ms ease, background-color 150ms ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--brand);
    color: white;
    box-shadow: 0 1px 2px rgba(31, 42, 36, 0.08), 0 4px 12px color-mix(in srgb, var(--brand) 28%, transparent);
}

.btn-primary:hover {
    background: color-mix(in srgb, var(--brand) 88%, black);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.btn-ghost:hover {
    background: #FAFAFA;
}

/* Color swatches */
.bg-swatch {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: transform 100ms ease, box-shadow 150ms ease;
}

.bg-swatch:hover {
    transform: scale(1.08);
}

.bg-swatch.is-active {
    box-shadow: 0 0 0 2px var(--brand), 0 0 0 4px white;
}

/* Scrollbar */
.overflow-y-auto {
    scrollbar-width: thin;
    scrollbar-color: rgba(31, 42, 36, 0.25) transparent;
}

.overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.overflow-y-auto::-webkit-scrollbar-track {
    background: transparent;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
    background: rgba(31, 42, 36, 0.18);
    border-radius: 10px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: rgba(31, 42, 36, 0.30);
}

/* Cropper.js responsive */
#crop-modal .cropper-container {
    max-width: 100% !important;
    max-height: 35vh !important;
    height: 35vh !important;
    width: 100% !important;
}

@media (min-width: 640px) {
    #crop-modal .cropper-container {
        max-height: 45vh !important;
        height: 45vh !important;
    }
}

@media (min-width: 768px) {
    #crop-modal .cropper-container {
        max-height: 50vh !important;
        height: 50vh !important;
    }
}

#crop-modal img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    display: block;
}

#crop-modal .cropper-canvas,
#crop-modal .cropper-crop-box {
    max-width: 100% !important;
}

@media (max-width: 640px) {
    #crop-modal .cropper-point,
    #crop-modal .cropper-line {
        width: 12px !important;
        height: 12px !important;
    }
    #crop-modal .cropper-point.point-se {
        width: 16px !important;
        height: 16px !important;
    }
}
