/* ============================================
   Tensor Interactive — BTCPay Server Theme
   Matches tensorinteractive.com design system
   Font: Proxima Nova (self-hosted) | Primary: #0062FF
   ============================================ */

/* --- Proxima Nova — self-hosted from LocalStorage --- */
@font-face {
    font-family: 'Proxima Nova';
    src: url('/LocalStorage/proximanova_light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Proxima Nova';
    src: url('/LocalStorage/proximanova_regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Proxima Nova';
    src: url('/LocalStorage/proximanova_bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Proxima Nova';
    src: url('/LocalStorage/proximanova_boldit.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Proxima Nova';
    src: url('/LocalStorage/proximanova_extrabold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Proxima Nova';
    src: url('/LocalStorage/proximanova_black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Proxima Nova';
    src: url('/LocalStorage/proximanova_blackit.woff2') format('woff2');
    font-weight: 900;
    font-style: italic;
    font-display: swap;
}

/* --- Reset BTCPay's defaults --- */
* {
    font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
}

:root {
    --btcpay-primary: #0062FF;
    --btcpay-primary-rgb: 0, 98, 255;
    --btcpay-primary-accent: #004FCC;
    --btcpay-primary-accent-rgb: 0, 79, 204;
    --btcpay-primary-shadow: rgba(0, 98, 255, 0.25);
    --btcpay-primary-100: #E6F0FF;
    --btcpay-primary-200: #B3D4FF;
    --btcpay-primary-300: #80B8FF;
    --btcpay-primary-400: #4D9CFF;
    --btcpay-primary-500: #0062FF;
    --btcpay-primary-600: #004FCC;
    --btcpay-primary-700: #003C99;
    --btcpay-primary-800: #002966;
    --btcpay-primary-900: #001633;
    --btcpay-bg-tile: #FFFFFF;
    --btcpay-body-bg: #FAFAFA;
    --btcpay-body-text: #111827;
    --btcpay-body-text-muted: #6B7280;
    --btcpay-border-color: #E5E7EB;
    --btcpay-border-radius: 0.5rem;
    --ti-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --ti-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --ti-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --ti-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --ti-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

[data-btcpay-theme="dark"] {
    --btcpay-primary: #3B8AFF;
    --btcpay-primary-rgb: 59, 138, 255;
    --btcpay-body-bg: #09090B;
    --btcpay-bg-tile: #18181B;
    --btcpay-body-text: #FAFAFA;
    --btcpay-body-text-muted: #A1A1AA;
    --btcpay-border-color: #27272A;
}

/* --- Body --- */
body {
    background: var(--btcpay-body-bg) !important;
    color: var(--btcpay-body-text) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Hide ALL BTCPay branding --- */
.main-logo-btcpay,
nav .main-logo-btcpay,
.row.justify-content-center.mt-5,
h1[data-testid="header"] + p.lead,
.btcpay-footer .d-flex.flex-wrap.justify-content-center.justify-content-xl-start.gap-4 {
    display: none !important;
}

/* --- Logo --- */
.main-logo.main-logo-custom {
    height: 3.5rem;
    max-width: 22rem;
    object-fit: contain;
    margin-bottom: 0.5rem;
}
@media (prefers-color-scheme: dark) {
    .main-logo.main-logo-custom { filter: brightness(0) invert(1); }
}
[data-btcpay-theme="dark"] .main-logo.main-logo-custom {
    filter: brightness(0) invert(1);
}

/* --- Page header area --- */
.row.justify-content-center.mb-2 {
    margin-top: 4rem !important;
    margin-bottom: 1rem !important;
}
.row.justify-content-center.mb-2 .col.text-center .navbar-brand {
    margin-bottom: 1.5rem !important;
}

/* --- Heading replacement --- */
h1[data-testid="header"] {
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
}
h1[data-testid="header"]::after {
    content: 'Secure Payment Processing';
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.6;
    display: block;
    color: var(--btcpay-body-text-muted);
    letter-spacing: -0.01em;
    margin-top: 0.25rem;
}

/* --- Account form card --- */
.account-form {
    max-width: 26rem !important;
    margin: 1.5rem auto 3rem !important;
    padding: 2.5rem 2rem 2rem !important;
    background: var(--btcpay-bg-tile) !important;
    border: 1px solid var(--btcpay-border-color) !important;
    border-radius: 0.75rem !important;
    box-shadow: var(--ti-shadow-lg) !important;
}
.account-form h4 {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: var(--btcpay-body-text) !important;
    margin-bottom: 1.75rem !important;
    letter-spacing: -0.025em;
}

/* --- Form labels --- */
.form-label {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: var(--btcpay-body-text) !important;
    margin-bottom: 0.375rem !important;
    letter-spacing: -0.01em;
}

/* --- Form inputs --- */
.form-control {
    border: 1px solid var(--btcpay-border-color) !important;
    border-radius: 0.5rem !important;
    padding: 0.625rem 0.875rem !important;
    font-size: 0.9375rem !important;
    font-weight: 400 !important;
    color: var(--btcpay-body-text) !important;
    background: var(--btcpay-bg-tile) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    height: auto !important;
    line-height: 1.5 !important;
}
.form-control:focus {
    border-color: #0062FF !important;
    box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.12) !important;
    outline: none !important;
}
.form-control::placeholder {
    color: #9CA3AF !important;
    font-weight: 400 !important;
}

/* --- Form groups spacing --- */
.form-group {
    margin-bottom: 1.25rem !important;
}

/* --- Primary button --- */
.btn-primary {
    background: #0062FF !important;
    border: 1px solid #0062FF !important;
    border-radius: 0.5rem !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    transition: all 0.15s ease !important;
    box-shadow: var(--ti-shadow-sm) !important;
}
.btn-primary:hover,
.btn-primary:focus {
    background: #004FCC !important;
    border-color: #004FCC !important;
    box-shadow: 0 4px 12px rgba(0, 98, 255, 0.3) !important;
    transform: translateY(-1px);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--ti-shadow-sm) !important;
}

/* --- Login link --- */
.account-form + p a,
.account-form a,
a:not(.btn):not(.navbar-brand) {
    color: #0062FF !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}
a:not(.btn):not(.navbar-brand):hover {
    color: #004FCC !important;
}

/* --- Footer: nuke everything BTCPay, replace with Tensor --- */
.btcpay-footer {
    border-top: 1px solid var(--btcpay-border-color) !important;
    padding: 1.25rem 0 !important;
    margin-top: auto !important;
    font-size: 0 !important;
    color: transparent !important;
}
.btcpay-footer * {
    display: none !important;
}
.btcpay-footer::after {
    display: block !important;
    content: '' !important;
    width: 100%;
    height: 3.5rem;
    background: url('/LocalStorage/tensor-text-logo.png') center/contain no-repeat;
    margin: 0 auto;
    max-width: 14rem;
}
.btcpay-footer::before {
    display: block !important;
    content: 'Powered by' !important;
    font-size: 0.75rem !important;
    font-weight: 500;
    color: var(--btcpay-body-text-muted);
    letter-spacing: 0.05em;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
[data-btcpay-theme="dark"] .btcpay-footer::after {
    filter: brightness(0) invert(1);
}

/* --- Kill version string and any BTCPay copyright text --- */
footer small,
footer .text-muted,
footer [class*="version"],
.btcpay-footer small,
.footer-version,
footer span:not([class]) {
    display: none !important;
    font-size: 0 !important;
    visibility: hidden !important;
}

/* --- Sidebar header: logo + bell + store selector --- */
#mainMenuHead .navbar-brand {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}
#mainMenuHead .main-logo-btcpay {
    display: none !important;
}
#mainMenuHead .main-logo-custom {
    height: 1.75rem !important;
    max-width: 8rem !important;
    width: auto !important;
    object-fit: contain;
}

/* --- Notification dropdown --- */
#NotificationsDropdown {
    z-index: 2100 !important;
}

/* --- Main content must clear the sidebar --- */
#mainContent {
    margin-left: var(--sidebar-width) !important;
}

/* --- Sidebar nav items must stay within sidebar bounds --- */
#mainNav {
    overflow-x: hidden !important;
}

/* --- Checkout pages --- */
#Checkout footer::before {
    content: 'Powered by';
    display: block;
    font-size: 0.65rem;
    color: var(--btcpay-body-text-muted);
    text-align: center;
    margin-top: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
#Checkout footer::after {
    content: '';
    display: block;
    width: 100%;
    height: 2rem;
    max-width: 10rem;
    background: url('/LocalStorage/tensor-text-logo.png') center/contain no-repeat;
    margin: 0.25rem auto 0;
}
.payment-box .logo,
[class*="btcpay-logo"] {
    display: none !important;
}

/* --- Form focus ring for all interactive elements --- */
.form-select:focus,
.form-check-input:focus {
    border-color: #0062FF !important;
    box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.12) !important;
}

/* --- Alert styling --- */
.alert {
    border-radius: 0.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    border: none !important;
}
.alert-success {
    background: #ECFDF5 !important;
    color: #065F46 !important;
}
.alert-danger {
    background: #FEF2F2 !important;
    color: #991B1B !important;
}

/* --- Table styling for admin pages --- */
.table {
    font-size: 0.875rem !important;
}
.table th {
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    text-transform: none !important;
}

/* --- Card styling for admin pages --- */
.card {
    border: 1px solid var(--btcpay-border-color) !important;
    border-radius: 0.75rem !important;
    box-shadow: var(--ti-shadow) !important;
}
.card-header {
    font-weight: 600 !important;
}

/* --- Badge styling --- */
.badge {
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    border-radius: 9999px !important;
    padding: 0.25rem 0.75rem !important;
}

/* --- Nav/tab styling --- */
.nav-link {
    font-weight: 500 !important;
    font-size: 0.875rem !important;
}
.nav-link.active {
    font-weight: 600 !important;
}

/* --- Theme color meta override --- */
meta[name="theme-color"] {
    content: "#0062FF";
}
