/* ============================================
   LETTERHEAD DOCUMENTS - PDF letterhead stamper
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Flex:wght@400;500;600;700&family=Open+Sans:wght@400;500;600;700&display=swap');

.lhd-tool {
    max-width: 760px;
    margin: 0 auto;
}

.lhd-page-header {
    margin-bottom: 1.5rem;
}

.lhd-page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.lhd-page-header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.lhd-upload-card {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: 2px;
    padding: 1.5rem;
}

.lhd-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lhd-section-title .icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.lhd-file-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 2rem;
    border: 1px dashed var(--border-medium);
    border-radius: 2px;
    background: var(--bg-body);
    color: var(--text-primary);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.1s ease, background 0.1s ease, box-shadow 0.1s ease;
}

.lhd-file-drop:hover,
.lhd-file-drop:focus-within {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.lhd-file-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.lhd-file-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
}

.lhd-file-icon svg {
    width: 28px;
    height: 28px;
}

.lhd-file-title {
    display: block;
    font-family: 'Google Sans Flex', 'Open Sans', 'Google Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.lhd-file-meta {
    display: block;
    max-width: 100%;
    font-family: 'Google Sans Flex', 'Open Sans', 'Google Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.lhd-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
}

.lhd-btn-primary {
    width: 100%;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Google Sans Flex', 'Open Sans', 'Google Sans', sans-serif;
    border: 1px solid var(--primary);
    border-radius: 2px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    transition: background 0.1s ease, border-color 0.1s ease, opacity 0.1s ease;
}

.lhd-btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.lhd-btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.lhd-status {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 2px;
    background: var(--bg-body);
    color: var(--text-secondary);
    font-family: 'Google Sans Flex', 'Open Sans', 'Google Sans', sans-serif;
    font-size: 0.92rem;
    line-height: 1.35;
}

.lhd-status.success {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.lhd-status.error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.lhd-status.busy {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

@media screen and (min-width: 600px) {
    .lhd-btn-primary {
        width: auto;
    }
}

@media screen and (max-width: 768px) {
    .lhd-tool {
        max-width: none;
    }

    .lhd-page-header {
        margin-bottom: 1rem;
    }

    .lhd-page-header h1 {
        font-size: 1.4rem;
        line-height: 1.2;
    }

    .lhd-page-header p {
        font-size: 0.9rem;
    }

    .lhd-upload-card {
        padding: 1rem;
    }

    .lhd-file-drop {
        min-height: 190px;
        padding: 1.5rem 1rem;
    }
}

@media print {
    .lhd-tool {
        display: none !important;
    }
}
