/* ====================================
   QR & Pairing Components
   ==================================== */

/* QR Image */
.qr-img {
    display: none;
    width: 240px;
    margin: 10px auto 16px auto;
    border: 2px solid #60a5fa;
    border-radius: 12px;
}

/* QR Inline Section */
.qr-inline-section {
    background: var(--bg-primary);
    border: none;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-raised-hover);
    animation: fadeIn 0.3s ease;
}

.qr-inline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
}

.qr-inline-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
}

.qr-timer {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.qr-inline-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.qr-inline-img {
    width: 280px;
    height: 280px;
    border-radius: 20px;
    background: white;
    padding: 10px;
    box-shadow: var(--shadow-raised-hover);
    border: 4px solid var(--bg-primary);
    transform: translateY(-5px);
}

.qr-inline-text {
    color: var(--text-accent);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    background: var(--bg-primary);
    padding: 10px 25px;
    border-radius: 50px;
    box-shadow: var(--shadow-inset);
    display: inline-block;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* P0 FIX: Neumorphic Styling for Refresh Button */
/* P0 FIX: Neumorphic Styling for Refresh Button - Minimalist Update */
/* P0 FIX: Neumorphic Styling for Refresh Button - Minimalist Update with Float */
.qr-refresh-btn-content {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--bg-primary);
    /* Needs bg for shadow to work properly */
    color: var(--text-secondary);
    /* Elegant gray */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-raised);
    /* Floating effect */
    margin-top: 5px;
}

.qr-refresh-btn-content:hover {
    color: var(--text-primary);
    transform: translateY(-2px) scale(1.05);
    /* Proper float lift */
    box-shadow: var(--shadow-raised-hover);
    /* Enhanced float shadow */
}

.qr-refresh-btn-content:active {
    transform: scale(0.95);
    background: var(--bg-secondary);
}

.qr-refresh-btn-content svg {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
}

/* Pairing Code Section */
.pairing-code-section {
    background: var(--bg-primary);
    border: none;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-raised-hover);
}

.pairing-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
}

.pairing-code-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
}

.pairing-timer {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.pairing-code-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.pairing-code-text {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-accent);
    letter-spacing: 8px;
    text-align: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: var(--shadow-inset);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pairing-code-text:hover {
    transform: scale(1.05);
}

.pairing-code-account {
    color: var(--text-accent);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    background: var(--bg-primary);
    padding: 10px 25px;
    border-radius: 50px;
    box-shadow: var(--shadow-inset);
    display: inline-block;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* Pairing Phone Input Styles & Autofill Fix */
.pairing-phone-input {
    width: 60%;
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    cursor: text;
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-inset);
    font-size: 16px;
    text-align: center;
    letter-spacing: 1px;
    outline: none;
    transition: all 0.3s ease;
}

.pairing-phone-input:focus {
    box-shadow: var(--shadow-raised);
}

.pairing-phone-input:-webkit-autofill,
.pairing-phone-input:-webkit-autofill:hover,
.pairing-phone-input:-webkit-autofill:focus,
.pairing-phone-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-primary) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s;
}