/* Popup Styles - Optimized for laptop screens */
.dn-vietqr-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    animation: dnFadeIn 0.3s ease-out forwards;
}

.dn-vietqr-modal {
    background: #1a1a1a;
    color: #fff;
    width: 90%;
    max-width: 380px; /* Gọn hơn */
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    max-height: 95vh; /* Không vượt quá màn hình */
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    animation: dnSlideUp 0.3s ease-out forwards;
    border: 1px solid #333;
    position: relative;
    overflow: hidden;
}

.dn-vietqr-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 6px;
    line-height: 0;
    transition: color 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.dn-vietqr-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

#dn-vietqr-timer {
    color: #ff9800;
    font-size: 15px;
    margin-left: 6px;
    font-weight: 500;
}

.dn-vietqr-header {
    background: #222;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}

.dn-vietqr-header h3 {
    margin: 0;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
}

.dn-vietqr-body {
    padding: 15px 20px;
    overflow-y: auto; /* Cuộn nếu màn hình quá thấp */
}

/* Tùy chỉnh thanh cuộn cho body */
.dn-vietqr-body::-webkit-scrollbar {
    width: 6px;
}
.dn-vietqr-body::-webkit-scrollbar-track {
    background: #1a1a1a; 
}
.dn-vietqr-body::-webkit-scrollbar-thumb {
    background: #444; 
    border-radius: 4px;
}

.dn-vietqr-qr-container {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

.dn-vietqr-img {
    max-width: 220px; /* Giới hạn kích thước mã QR */
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

.dn-vietqr-info {
    background: #252525;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    border: 1px solid #333;
}

.dn-qr-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #444;
}

.dn-qr-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dn-qr-row:first-child {
    padding-top: 0;
}

.dn-qr-row > span {
    color: #aaa;
}

.dn-qr-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dn-qr-row strong {
    color: #fff;
    font-weight: 600;
    text-align: right;
}

.dn-amount {
    color: #4CAF50 !important;
    font-size: 15px;
}

.dn-copy-btn {
    background: transparent;
    border: 1px solid #555;
    color: #aaa;
    border-radius: 4px;
    padding: 4px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dn-copy-btn:hover {
    background: #333;
    color: #fff;
    border-color: #777;
}

.dn-vietqr-note {
    margin-top: 15px;
    padding: 10px 12px;
    background: rgba(255, 152, 0, 0.1);
    border-left: 3px solid #FF9800;
    color: #FFB74D;
    font-size: 12px;
    line-height: 1.4;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border-radius: 4px;
}

.dn-vietqr-note svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.dn-vietqr-footer {
    padding: 0 20px 15px;
    flex-shrink: 0;
}

.dn-btn-primary {
    background: #4CAF50;
    color: #fff;
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    display: block;
    text-align: center;
}

.dn-btn-primary:hover {
    background: #45a049;
}

.dn-btn-secondary {
    width: 100%;
    background: transparent;
    color: #888;
    border: 1px solid #444;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    margin-top: 10px;
}

.dn-btn-secondary:hover {
    color: #fff;
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

.dn-btn-primary:disabled {
    background: #333;
    color: #888;
    cursor: not-allowed;
}

@keyframes dnFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes dnSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
