/* Floating Button */
.wqrd-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 999998;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wqrd-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

/* Modal Overlay */
#wqrd-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}
#wqrd-modal-overlay.wqrd-hidden {
    opacity: 0;
    pointer-events: none;
    display: flex !important;
    visibility: hidden;
}

/* Modal Box */
.wqrd-modal {
    background: #fff;
    width: 100%;
    max-width: 680px;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.3s ease;
}
#wqrd-modal-overlay.wqrd-hidden .wqrd-modal {
    transform: translateY(10px);
}

/* Close button */
#wqrd-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}
#wqrd-modal-close:hover {
    color: #333;
}

/* Header & Intro */
.wqrd-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
}
.wqrd-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}
.wqrd-modal-intro {
    padding: 24px 36px 0;
    text-align: center;
}
.wqrd-modal-intro p {
    margin: 0;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

/* Body */
.wqrd-modal-body {
    padding: 24px 32px;
    display: flex;
    gap: 32px;
}
.wqrd-qr-col {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.wqrd-qr-frame {
    width: 240px;
    height: 240px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px;
    background: #fff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wqrd-qr-skeleton {
    color: #888;
    font-size: 13px;
}
.wqrd-qr-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.wqrd-scan-text {
    margin: 12px 0 0;
    font-size: 13px;
    color: #777;
    text-align: center;
}

/* Info Col */
.wqrd-info-col {
    flex: 1;
}
.wqrd-info-col h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Info Boxes */
.wqrd-bank-box, .wqrd-syntax-box {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 24px;
}
.wqrd-bank-row {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}
.wqrd-bank-row strong {
    font-weight: 600;
}
.wqrd-stk-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    font-size: 14px;
    color: #333;
}
.wqrd-stk-row p { margin: 0; }
.wqrd-stk-number {
    font-size: 15px;
    font-family: monospace;
    letter-spacing: 0.5px;
    margin-left: 4px;
}

.wqrd-syntax-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}
.wqrd-highlight-text {
    font-family: monospace;
    font-size: 15px;
    color: #d32f2f;
    font-weight: 600;
}

/* Copy button */
.wqrd-copy-btn {
    background: #e9ecef;
    border: none;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.wqrd-copy-btn:hover {
    background: #dee2e6;
}

/* Amount Input */
.wqrd-amount-section {
    padding: 0 32px 24px;
}
.wqrd-amount-section label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    color: #1a1a1a;
}
#wqrd-amount-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 6px;
    color: #1a1a1a;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
#wqrd-amount-input:focus {
    outline: none;
    border-color: #333;
}

/* Footer */
.wqrd-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}
.wqrd-modal-footer p {
    margin: 0;
    font-weight: 600;
    color: #444;
    font-size: 14px;
}

/* Toast */
#wqrd-toast {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 10;
}
#wqrd-toast.wqrd-hidden {
    opacity: 0;
}

/* Responsive */
@media screen and (max-width: 650px) {
    .wqrd-modal-body {
        flex-direction: column;
        align-items: center;
        gap: 24px;
        padding: 20px;
    }
    .wqrd-qr-col {
        flex: 0 0 auto;
    }
    .wqrd-info-col { width: 100%; }
    .wqrd-amount-section {
        padding: 0 20px 20px;
    }
    .wqrd-modal-intro {
        padding: 20px;
    }
}
