/* Word to PDF converter.
 *
 * The one control that does the work has to look like a button. It was inheriting
 * the browser default before, and the previous version of this page left its only
 * button hidden until a client-side render had finished, so the tool had no
 * visible action at all.
 *
 * Colours come from the site's own custom properties with explicit fallbacks, so
 * the button is painted even if the theme variable is missing.
 */

.sk-w2p {
    max-width: 760px;
}

.sk-w2p-panel {
    margin: 22px 0 0;
    padding: 22px;
    border: 1px solid var(--sk-line, #e5ddec);
    border-radius: 14px;
    background: var(--sk-surface, #ffffff);
}

.sk-w2p-drop {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 26px 20px;
    border: 2px dashed var(--sk-line, #cfc6dd);
    border-radius: 12px;
    background: var(--sk-soft, #f7f5fa);
    text-align: center;
    cursor: pointer;
}

.sk-w2p-drop:hover,
.sk-w2p-drop:focus-within {
    border-color: var(--sk-accent, #68438b);
    background: #f2ecfa;
}

.sk-w2p-drop strong {
    font-size: 1.02rem;
}

.sk-w2p-drop span,
.sk-w2p-drop small {
    color: var(--sk-muted, #6b7280);
}

.sk-w2p-drop small {
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

/* Visually hidden but still focusable and still clickable through the label.
 * `display: none` would break the label, and a plain visible file input next to
 * a labelled drop zone looks like two controls doing one job. */
.sk-w2p-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

.sk-w2p-file {
    margin: 16px 0 0;
    font-size: 0.92rem;
    color: var(--sk-ink, #1f2430);
    overflow-wrap: anywhere;
}

.sk-w2p-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 0;
}

.sk-w2p .sk-w2p-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--sk-accent, #68438b);
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(31, 36, 48, 0.18);
    transition: background-color 0.15s ease, transform 0.05s ease;
}

.sk-w2p .sk-w2p-button:hover:not(:disabled) {
    background: var(--sk-accent-strong, #553471);
}

.sk-w2p .sk-w2p-button:active:not(:disabled) {
    transform: translateY(1px);
}

.sk-w2p .sk-w2p-button:focus-visible {
    outline: 3px solid rgba(104, 67, 139, 0.45);
    outline-offset: 2px;
}

.sk-w2p .sk-w2p-button:disabled {
    background: #cfc6dd;
    color: #5b5570;
    box-shadow: none;
    cursor: not-allowed;
}

.sk-w2p .sk-w2p-button--ghost {
    border-color: var(--sk-accent, #68438b);
    background: #ffffff;
    color: var(--sk-accent, #68438b);
}

.sk-w2p .sk-w2p-button--ghost:hover:not(:disabled) {
    background: #f2ecfa;
}

.sk-w2p .sk-w2p-button--ghost:disabled {
    border-color: var(--sk-line, #e5ddec);
    background: #ffffff;
    color: #9aa0ad;
}

.sk-w2p .sk-w2p-button--quiet {
    background: none;
    color: var(--sk-accent, #68438b);
    box-shadow: none;
    text-decoration: underline;
}

.sk-w2p .sk-w2p-button--quiet:hover:not(:disabled) {
    background: none;
    color: var(--sk-accent-strong, #553471);
}

.sk-w2p .sk-w2p-button--quiet:disabled {
    background: none;
    color: #9aa0ad;
}

.sk-w2p-status {
    min-height: 1.4em;
    margin: 16px 0 0;
    font-size: 0.94rem;
    color: var(--sk-muted, #6b7280);
}

.sk-w2p-status[data-state="busy"] {
    color: var(--sk-accent, #68438b);
    font-weight: 600;
}

.sk-w2p-status[data-state="error"] {
    color: var(--sk-error, #b4232c);
    font-weight: 600;
}

.sk-w2p-status[data-state="done"] {
    color: #1f7a43;
    font-weight: 600;
}

/* No empty grey box: the preview only takes space once there is a PDF in it. */
.sk-w2p-preview {
    margin-top: 18px;
}

.sk-w2p-preview:empty {
    margin-top: 0;
}

.sk-word-frame {
    width: 100%;
    height: 520px;
    border: 1px solid var(--sk-line, #e5ddec);
    border-radius: 10px;
    background: #ffffff;
}

.sk-word-empty {
    margin: 0;
    color: var(--sk-muted, #6b7280);
    font-size: 0.92rem;
}

@media (max-width: 600px) {
    .sk-w2p-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sk-w2p-button {
        transition: none;
    }
}
