/*----------------------------------------------------------------------------*/
/* Styles for cs1302uga.sphinx.ext.qrcode extension                           */
/*----------------------------------------------------------------------------*/

.cs1302-qrcode-figure {
    margin: 1.5rem auto;
    text-align: center;
    display: table;
    max-width: 100%;
}

.cs1302-qrcode-figure.align-center {
    margin-left: auto;
    margin-right: auto;
}

.cs1302-qrcode-figure.align-left {
    margin-left: 0;
    margin-right: auto;
}

.cs1302-qrcode-figure.align-right {
    margin-left: auto;
    margin-right: 0;
}

.cs1302-qrcode-image {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    color: currentColor;
}

.cs1302-qrcode-link {
    display: inline-block;
    transition: transform 0.15s ease-in-out, opacity 0.15s ease-in-out;
}

.cs1302-qrcode-link:hover {
    transform: scale(1.02);
    opacity: 0.95;
}

.cs1302-qrcode-caption {
    margin-top: 0.5rem;
    font-size: 0.9em;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-foreground-secondary, #4a5568);
    text-align: center;
}

.cs1302-qrcode-actions {
    margin-top: 0.35rem;
    font-size: 0.8em;
    text-align: center;
}

.cs1302-qrcode-download {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.85em;
    text-decoration: none;
    color: var(--color-brand-primary, #ba0c2f);
    background-color: var(--color-background-secondary, #f7fafc);
    border: 1px solid var(--color-sidebar-background-border, #e2e8f0);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.cs1302-qrcode-download:hover {
    background-color: var(--color-brand-primary, #ba0c2f);
    color: #ffffff;
    text-decoration: none;
}

/*----------------------------------------------------------------------------*/
/* Adaptive Background Theme Contrast Plate                                  */
/*----------------------------------------------------------------------------*/

.cs1302-qrcode-figure.cs1302-qrcode-adaptive-bg {
    padding: 1.25rem;
    border-radius: 0.5rem;
    background-color: #ffffff;
    border: 1px solid var(--color-sidebar-background-border, #e2e8f0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

/* Dark mode theme overrides ensuring high-contrast scanning */
body[data-theme="dark"] .cs1302-qrcode-figure.cs1302-qrcode-adaptive-bg,
body:not([data-theme="light"]) .cs1302-qrcode-figure.cs1302-qrcode-adaptive-bg {
    background-color: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .cs1302-qrcode-figure.cs1302-qrcode-adaptive-bg .cs1302-qrcode-caption,
body:not([data-theme="light"]) .cs1302-qrcode-figure.cs1302-qrcode-adaptive-bg .cs1302-qrcode-caption {
    color: #1a202c !important;
}

body[data-theme="dark"] .cs1302-qrcode-figure.cs1302-qrcode-adaptive-bg .cs1302-qrcode-download,
body:not([data-theme="light"]) .cs1302-qrcode-figure.cs1302-qrcode-adaptive-bg .cs1302-qrcode-download {
    background-color: #f1f5f9;
    color: #ba0c2f;
    border-color: #cbd5e1;
}

body[data-theme="dark"] .cs1302-qrcode-figure.cs1302-qrcode-adaptive-bg .cs1302-qrcode-download:hover,
body:not([data-theme="light"]) .cs1302-qrcode-figure.cs1302-qrcode-adaptive-bg .cs1302-qrcode-download:hover {
    background-color: #ba0c2f;
    color: #ffffff;
}
