@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

body {
    font-family: 'Poppins', Arial, sans-serif;
    margin: 0;
    padding: 2.5em 1.5em;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #f5f9ff 0%, #eef2ff 45%, #e4ecff 100%);
    color: #333;
}

.container {
    max-width: 600px;
    margin: 2em auto;
    padding: 2.25em 2em;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 60px rgba(32, 56, 117, 0.18);
    border-radius: 1.5em;
    animation: fadeIn .6s ease-out;
    text-align: center;
    backdrop-filter: blur(8px);
}

h1 {
    font-size: 1.75em;
    margin-top: 0;
    text-align: center;
    color: #0f1f44;
}

.qr-container {
    text-align: center;
    margin: 1em 0;
    overflow: hidden;
}

.qr-container iframe {
    max-width: 100%;
}

.qr-container img {
    width: 100%;
    max-width: 240px;
    height: auto;
}

.label-container {
    text-align: center;
    margin: 1em 0;
}

.label-container a {
    display: inline-block;
    padding: 0.75em 1em;
    background: #007811;
    color: #fff;
    text-decoration: none;
    border-radius: .3em;
    transition: background 0.2s ease;
}

.label-container a:hover {
    background: #00630d;
}

.label-actions {
    text-align: center;
    margin: 1.5em 0 0;
}

.refresh-button {
    display: inline-block;
    padding: 0.75em 1.25em;
    background: #0057b7;
    color: #fff;
    border: none;
    border-radius: .3em;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s ease;
}

.refresh-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.refresh-button:hover:not(:disabled) {
    background: #004494;
}

.status-feedback {
    margin-top: 0.75em;
    font-size: 0.95em;
}

.status-feedback.error {
    color: #cc0000;
}

.vendor-logo {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 1em;
}

.instructions {
    text-align: center;
    margin-bottom: 1em;
    font-size: 1.1em;
}

.pending-message {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25em;
    background: linear-gradient(145deg, rgba(74, 139, 255, 0.18), rgba(103, 232, 249, 0.18));
    border: 1px solid rgba(85, 139, 255, 0.35);
    color: #0f2f66;
    padding: 1.75em 1.5em;
    border-radius: 1.25em;
    margin-bottom: 1.75em;
    box-shadow: 0 24px 45px rgba(32, 56, 117, 0.18);
    overflow: hidden;
    text-align: center;
}

.pending-message::after {
    content: "";
    position: absolute;
    inset: -40% -30% 40% -30%;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.65), transparent 60%);
    opacity: 0.6;
    animation: pulseGlow 4s ease-in-out infinite;
}

.pending-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 24px;
    font-size: 2.1rem;
    background: linear-gradient(135deg, #4a8bff, #6fe3f2);
    color: #fff;
    box-shadow: 0 14px 24px rgba(74, 139, 255, 0.28);
    position: relative;
    z-index: 1;
    animation: float 3.4s ease-in-out infinite;
}

.pending-copy h2 {
    margin: 0;
    font-size: 1.35em;
    letter-spacing: 0.01em;
}

.pending-copy p {
    margin: 0 auto;
    color: #35527c;
    max-width: 28ch;
}

.find-location {
    text-align: center;
    margin-top: .5em;
}

.qr-container--pending {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(232, 239, 255, 0.95));
    border: 1px dashed rgba(82, 121, 255, 0.45);
    border-radius: 1.25em;
    padding: 2.75em 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.qr-container--pending::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0), rgba(111, 227, 242, 0.25), rgba(255, 255, 255, 0));
    transform: translateX(-100%);
    animation: shimmer 2.75s infinite;
}

.qr-placeholder {
    text-align: center;
    color: #5d6b80;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
}

.qr-placeholder-spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid rgba(82, 121, 255, 0.15);
    border-top-color: #4a8bff;
    border-right-color: #6fe3f2;
    animation: spin 1s linear infinite;
}

.qr-placeholder p {
    margin: 0 auto;
    font-size: 0.98em;
    max-width: 32ch;
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.85;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.footer {
    text-align: center;
    font-size: 0.875em;
    color: #666;
}

.error {
    color: #cc0000;
    text-align: center;
    font-weight: bold;
    margin-bottom: 1em;
}
