@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700;800&display=swap");

#gm3-card {
    --gm3-cta: #111827;
    --gm3-cta-soft: rgba(17,24,39,.10);
    --gm3-cta-dark: #0b1220;
    --gm3-ink: #0f172a;
    --gm3-muted: #64748b;
    --gm3-line: #e2e8f0;

    direction: rtl;
    text-align: right;
    font-family: "Rubik", "Segoe UI", Tahoma, sans-serif;
    color: var(--gm3-ink);
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
#gm3-card *, #gm3-card *::before, #gm3-card *::after { box-sizing: border-box; }
/* guard: theme display rules must not override the HTML `hidden` attribute */
#gm3-card [hidden] { display: none !important; }

/* ---------- upload head ---------- */
#gm3-card .gm3-upload-head { margin-bottom: 14px; }
#gm3-card .gm3-upload-title { font-size: 18px; font-weight: 700; margin: 0 0 4px; color: var(--gm3-ink); }
#gm3-card .gm3-upload-sub { font-size: 12.5px; color: var(--gm3-muted); margin: 0; }

/* ---------- dropzone ---------- */
#gm3-card .gm3-dropzone {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 2.5px dashed var(--gm3-cta-soft);
    border-color: color-mix(in srgb, var(--gm3-cta) 40%, transparent);
    background: linear-gradient(135deg, #fff 0%, var(--gm3-cta-soft) 100%);
    border-radius: 16px;
    padding: 20px 18px;
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .15s;
}
#gm3-card .gm3-dropzone:hover,
#gm3-card .gm3-dropzone.drag,
#gm3-card .gm3-dropzone:focus-visible {
    border-color: var(--gm3-cta);
    background: var(--gm3-cta-soft);
    transform: scale(1.005);
    outline: none;
}
#gm3-card .gm3-dz-icon {
    width: 54px; height: 54px;
    flex: 0 0 54px;
    border-radius: 50%;
    background: var(--gm3-cta);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 22px -10px var(--gm3-cta);
}
#gm3-card .gm3-dz-text { display: flex; flex-direction: column; gap: 3px; }
#gm3-card .gm3-dz-title { font-size: 14px; font-weight: 600; color: var(--gm3-ink); }
#gm3-card .gm3-dz-formats { font-size: 11.5px; color: var(--gm3-muted); }

/* ---------- files list ---------- */
#gm3-card .gm3-files { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
#gm3-card .gm3-files:empty { margin-top: 0; }
#gm3-card .gm3-file {
    display: flex; align-items: center; gap: 12px;
    border: 1px solid var(--gm3-line);
    border-radius: 12px;
    padding: 8px 10px;
    background: #fff;
    animation: gm3-in .2s ease;
}
#gm3-card .gm3-file.is-error { border-color: #fca5a5; background: #fef2f2; }
#gm3-card .gm3-file-thumb {
    width: 46px; height: 46px; flex: 0 0 46px;
    border-radius: 9px; overflow: hidden;
    border: 1px solid var(--gm3-line);
    display: flex; align-items: center; justify-content: center;
    background: #f8fafc;
}
#gm3-card .gm3-file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
#gm3-card .gm3-file-pdf {
    font-size: 11px; font-weight: 800; letter-spacing: .5px;
    color: #dc2626; background: #fee2e2;
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}
#gm3-card .gm3-file-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
#gm3-card .gm3-file-name {
    font-size: 13px; font-weight: 600; color: var(--gm3-ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#gm3-card .gm3-file-sub { font-size: 11px; color: var(--gm3-muted); }
#gm3-card .gm3-file.is-error .gm3-file-sub { color: #b91c1c; }
#gm3-card .gm3-file-remove {
    flex: 0 0 auto;
    width: 26px; height: 26px;
    border-radius: 8px;
    border: 1px solid var(--gm3-line);
    background: #fff; color: var(--gm3-muted);
    font-size: 18px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s, border-color .15s;
}
#gm3-card .gm3-file-remove:hover { background: #fef2f2; color: #dc2626; border-color: #fca5a5; }

/* loader */
#gm3-card .gm3-file-loader {
    flex: 0 0 60px; height: 5px; border-radius: 100px;
    background: var(--gm3-line); overflow: hidden;
}
#gm3-card .gm3-file-loader span {
    display: block; width: 40%; height: 100%; border-radius: 100px;
    background: var(--gm3-cta);
    animation: gm3-bar 1.1s ease-in-out infinite;
}

/* ---------- error ---------- */
#gm3-card .gm3-err {
    margin-top: 10px;
    background: #fef2f2; color: #b91c1c;
    border: 1px solid #fecaca; border-radius: 10px;
    padding: 9px 12px; font-size: 12.5px; font-weight: 500;
}

/* ---------- notes ---------- */
#gm3-card .gm3-notes { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
#gm3-card .gm3-notes li {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 12.5px; color: var(--gm3-muted); line-height: 1.5;
}
#gm3-card .gm3-notes li svg { flex: 0 0 15px; margin-top: 2px; color: var(--gm3-cta); }

/* ---------- customer note ---------- */
#gm3-card .gm3-note-field { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
#gm3-card .gm3-note-field label { font-size: 13px; font-weight: 600; color: var(--gm3-ink); }
#gm3-card .gm3-note-field textarea {
    width: 100%; resize: vertical; min-height: 46px;
    border: 1.5px solid var(--gm3-line); border-radius: 10px;
    padding: 9px 12px; font-family: inherit; font-size: 13px; color: var(--gm3-ink);
    background: #fafafa; outline: none; transition: border-color .2s, background .2s;
}
#gm3-card .gm3-note-field textarea:focus {
    border-color: var(--gm3-cta); background: #fff;
    box-shadow: 0 0 0 3px var(--gm3-cta-soft);
}

/* ---------- fast delivery ---------- */
#gm3-card .gm3-fast {
    display: block; margin-top: 16px; cursor: pointer;
}
#gm3-card .gm3-fast input { position: absolute; opacity: 0; width: 0; height: 0; }
#gm3-card .gm3-fast-box {
    display: flex; align-items: center; gap: 12px;
    border: 1.5px solid var(--gm3-line); border-radius: 14px;
    padding: 12px 14px; background: #fff;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
#gm3-card .gm3-fast.on .gm3-fast-box {
    border-color: var(--gm3-cta);
    background: var(--gm3-cta-soft);
    box-shadow: 0 0 0 3px var(--gm3-cta-soft);
}
#gm3-card .gm3-fast-check-mark {
    flex: 0 0 22px; width: 22px; height: 22px;
    border-radius: 7px; border: 2px solid var(--gm3-line);
    background: #fff; color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s, border-color .2s;
}
#gm3-card .gm3-fast-check-mark svg { opacity: 0; transition: opacity .15s; }
#gm3-card .gm3-fast.on .gm3-fast-check-mark { background: var(--gm3-cta); border-color: var(--gm3-cta); }
#gm3-card .gm3-fast.on .gm3-fast-check-mark svg { opacity: 1; }
#gm3-card .gm3-fast-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
#gm3-card .gm3-fast-label { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--gm3-ink); }
#gm3-card .gm3-fast-label svg { color: var(--gm3-cta); }
#gm3-card .gm3-fast-sub { font-size: 12px; color: var(--gm3-muted); }
#gm3-card .gm3-fast-price { font-size: 14px; font-weight: 800; color: var(--gm3-cta); white-space: nowrap; }

/* ---------- actions + inline price ---------- */
#gm3-card .gm3-actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
#gm3-card .gm3-total-inline {
    font-size: 24px; font-weight: 800; color: var(--gm3-cta); white-space: nowrap; line-height: 1;
}
#gm3-card .gm3-total-inline .woocommerce-Price-amount { font-size: inherit; font-weight: inherit; color: inherit; }

#gm3-card .gm3-cta {
    flex: 1 1 auto; min-width: 180px;
    display: inline-flex !important; align-items: center; justify-content: center; gap: 8px;
    background: var(--gm3-cta) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 15px 22px !important;
    font-family: "Rubik", inherit !important;
    font-size: 16px !important; font-weight: 700 !important;
    cursor: pointer;
    box-shadow: 0 8px 20px -8px var(--gm3-cta);
    transition: background .2s, transform .12s, box-shadow .2s, opacity .2s;
    text-decoration: none !important;
}
#gm3-card .gm3-cta:hover { background: var(--gm3-cta-dark) !important; transform: translateY(-1px); }
#gm3-card .gm3-cta-arrow { font-size: 18px; }

#gm3-card .gm3-buy {
    flex: 1 1 auto; min-width: 150px;
    display: inline-flex !important; align-items: center; justify-content: center;
    background: #fff !important;
    color: var(--gm3-cta) !important;
    border: 1.5px solid var(--gm3-cta) !important;
    border-radius: 12px !important;
    padding: 15px 20px !important;
    font-family: "Rubik", inherit !important;
    font-size: 15px !important; font-weight: 700 !important;
    cursor: pointer;
    transition: background .2s, color .2s, transform .12s, opacity .2s;
    text-decoration: none !important;
}
#gm3-card .gm3-buy:hover { background: var(--gm3-cta-soft) !important; transform: translateY(-1px); }

#gm3-card .gm3-cta.is-disabled,
#gm3-card .gm3-buy.is-disabled,
#gm3-card .gm3-cta:disabled,
#gm3-card .gm3-buy:disabled {
    opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none;
}

/* ---------- success ---------- */
#gm3-card .gm3-success {
    display: flex; align-items: center; gap: 8px;
    margin-top: 14px; padding: 11px 14px;
    background: #dcfce7; color: #15803d;
    border: 1px solid #86efac; border-radius: 10px;
    font-size: 13.5px; font-weight: 600;
    animation: gm3-in .2s ease;
}

@keyframes gm3-bar {
    0% { transform: translateX(-120%); } 100% { transform: translateX(320%); }
}
@keyframes gm3-in {
    from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); }
}

/* ---------- mobile ---------- */
@media (max-width: 520px) {
    #gm3-card .gm3-cta, #gm3-card .gm3-buy { min-width: 0; }
    #gm3-card .gm3-total-inline { font-size: 21px; }
    #gm3-card .gm3-dz-icon { width: 46px; height: 46px; flex-basis: 46px; }
}
