body {
    font-family: Arial, sans-serif;
    padding: 20px;
    background: #fafafa;
}

h2 {
    margin-top: 0;
}

h3 {
    background: #e6e6e6;
    padding: 8px;
    border-radius: 4px;
    margin-top: 20px;
}

label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    box-sizing: border-box;
}

input[type="radio"],
input[type="checkbox"] {
    width: auto;
    margin-right: 5px;
}

button {
    background: #0078d4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #005fa3;
}

textarea {
    resize: vertical;
}

.option-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
    margin-bottom: 6px;
}


.option-row label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-disabled {
    opacity: 0.4;
}

.ei-tarkastettu-wrapper {
    margin-left: auto; /* vie oikealle */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.form-disabled input,
.form-disabled select,
.form-disabled textarea {
    pointer-events: none;
}

.option-row label {
    white-space: nowrap;
}
.pdf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-overlay-content {
    text-align: center;
    color: #3B404C;
    font-family: Arial, sans-serif;
}

.pdf-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #C3D9E8;
    border-top-color: #2c6bed;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.pdf-text {
    font-size: 16px;
    line-height: 1.4;
}
.rappu-row {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.drag-handle {
    cursor: grab;
    font-size: 18px;
    padding: 5px;
    touch-action: none; /* 👈 tärkeä mobiilille */
}

.drag-handle:active {
    cursor: grabbing;
}

.rappu-row:hover {
    background: #e0e0e0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.img-preview-box {
    position: relative;
    display: inline-block;
}

.img-delete {
    position: absolute;
    top: 5px;
    right: 5px;
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 14px;
    display: none;
}

.img-preview-box:hover .img-delete {
    display: block;
}