/* ------------------------------------------------------------------ */
/* Upload widget                                                       */
/* ------------------------------------------------------------------ */
.fa-printdata-uploader {
    position: relative;
    border: 1px solid #e2e2e2;
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    margin-top: 1rem;
}
.fa-printdata-uploader.is-loading {
    opacity: 0.7;
    pointer-events: none;
}
.fa-pd__head {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Side-by-side layout: thumbnail left, dropzone right */
.fa-pd__body {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.fa-pd__dz-wrap {
    flex: 1;
    min-width: 0;
}
.fa-pd__dz {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    border: 2px dashed #cfd7e6;
    border-radius: 8px;
    color: #667;
    cursor: pointer;
    gap: 0.5rem;
    padding: 0.75rem;
    transition: background 0.15s;
}
.fa-pd__dz.is-over {
    background: #f0f7ff;
}
.fa-pd__dz input[type="file"] {
    display: none;
}
.fa-pd__note {
    font-size: 0.85rem;
    color: #777;
    margin: 0.4rem 0 0;
}
.fa-pd__stat {
    margin: 0.5rem 0 0;
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    font-size: 0.9rem;
}
.fa-pd__stat.is-hidden {
    display: none;
}
.fa-pd__stat.is-pending {
    background: #f0f7ff;
    color: #1e73be;
}
.fa-pd__stat.is-ok {
    background: #e8f7ee;
    color: #155724;
}
.fa-pd__stat.is-error {
    background: #fdecea;
    color: #a71d2a;
}
.fa-pd__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.fa-btn {
    appearance: none;
    border: 1px solid #1e73be;
    background: #1e73be;
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}
.fa-btn--ghost {
    background: #fff;
    color: #1e73be;
}
.fa-btn--ghost:hover {
    background: #f0f7ff;
}

/* ------------------------------------------------------------------ */
/* Thumbnail – shared between product page and cart                    */
/* ------------------------------------------------------------------ */
.fa-pd__thumb {
    cursor: pointer;
    display: block;
    width: 120px;
    flex-shrink: 0;
}
.fa-pd__thumb-inner {
    position: relative;
    width: 100%;
    padding-bottom: 141%; /* A4 ratio */
    border: 1px solid #dde3ed;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fb;
}
.fa-pd__thumb-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}
.fa-pd__thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.fa-pd__thumb:hover .fa-pd__thumb-overlay {
    background: rgba(0, 0, 0, 0.35);
}
.fa-pd__thumb-label {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s;
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 8px;
    border-radius: 4px;
}
.fa-pd__thumb:hover .fa-pd__thumb-label {
    opacity: 1;
}
.fa-pd__thumb-name {
    font-size: 0.75rem;
    color: #555;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

/* Cart / checkout inline preview – same size as product page thumb */
.fa-print-preview {
    display: block;
    width: 120px;
    cursor: pointer;
    margin: 6px 0;
}
.fa-print-preview .fa-pd__thumb-inner {
    padding-bottom: 141%;
}

/* ------------------------------------------------------------------ */
/* Full-screen modal                                                   */
/* ------------------------------------------------------------------ */
.fa-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
}
.fa-preview-overlay.is-visible {
    opacity: 1;
}

.fa-preview-modal {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: min(90vw, 860px);
    height: min(90vh, 1100px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: translateY(16px);
    transition: transform 0.25s;
}
.fa-preview-overlay.is-visible .fa-preview-modal {
    transform: translateY(0);
}

.fa-preview-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 10px 14px;
    background: #f5f7fa;
    border-bottom: 1px solid #e2e6ea;
    flex-shrink: 0;
}
.fa-preview-title {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fa-preview-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: #555;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}
.fa-preview-close:hover {
    background: #e8e8e8;
}

.fa-preview-iframe {
    flex: 1;
    width: 100%;
    border: none;
}
