/* BBB 40th Anniversary Theme */

/* Default background (for admin/login pages) */
html, body {
    background: #ffffff !important;
}

.mud-layout,
.mud-main-content {
    background: #ffffff !important;
}

/* Override backgrounds for public pages with bbb-background */
body:has(.bbb-background) {
    background: #0a0a0a !important;
}

body:has(.bbb-background) .mud-layout,
body:has(.bbb-background) .mud-main-content {
    background: transparent !important;
}

/* Font Faces */
@font-face {
    font-family: 'NTF Grand';
    src: url('../fonts/NTF-Grand-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bebas Neue Pro';
    src: url('../fonts/BebasNeuePro-SemiExpBold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bebas Neue Pro';
    src: url('../fonts/BebasNeuePro-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Background Container */
.bbb-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 100vh;
    width: 100%;
    background-image: url('../images/mobile_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .bbb-background {
        background-image: url('../images/desktop_bg.png');
    }
}

/* Main Container */
.bbb-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px 100px;
    box-sizing: border-box;
}

/* Logo */
.bbb-logo {
    width: 200px;
    height: auto;
    margin-bottom: -70px;
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    .bbb-logo {
        width: 260px;
        margin-bottom: -90px;
    }
}

/* Language Switcher */
.bbb-language-switcher {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.bbb-lang-btn {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
    border: none;
    background: none;
    padding: 0;
}

.bbb-lang-btn:hover,
.bbb-lang-btn.active {
    opacity: 1;
    transform: scale(1.1);
}

.bbb-lang-btn img {
    width: 32px;
    height: 22px;
    border-radius: 2px;
    display: block;
}

/* Card */
.bbb-card {
    background: rgba(10, 25, 47, 0.85);
    border-radius: 16px;
    padding: 50px 20px 32px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

@media (min-width: 768px) {
    .bbb-card {
        padding: 60px 40px 40px;
    }
}

/* Compact card for success page */
.bbb-card.bbb-card-compact {
    padding: 20px 16px 24px;
}

@media (min-width: 768px) {
    .bbb-card.bbb-card-compact {
        padding: 24px 32px 28px;
    }
}

/* Title */
.bbb-title {
    font-family: 'NTF Grand', sans-serif;
    font-weight: 900;
    font-size: 28px;
    color: white;
    text-align: center;
    margin: 0 0 24px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .bbb-title {
        font-size: 32px;
        margin-bottom: 28px;
    }
}

/* Form Row */
.bbb-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.bbb-label {
    font-family: 'Bebas Neue Pro', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: white;
    min-width: 130px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .bbb-label {
        font-size: 18px;
        min-width: 150px;
    }
}

/* Input Fields */
.bbb-input-wrapper {
    flex: 1;
}

.bbb-input,
.bbb-select {
    width: 100%;
    padding: 10px 14px;
    font-family: 'Bebas Neue Pro', sans-serif;
    font-weight: 400;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    background: white;
    color: #333;
    outline: none;
    box-sizing: border-box;
}

.bbb-input:focus,
.bbb-select:focus {
    box-shadow: 0 0 0 2px #1976d2;
}

.bbb-input::placeholder {
    color: #999;
}

.bbb-input.error,
.bbb-select.error {
    box-shadow: 0 0 0 2px #f44336;
}

.bbb-error-text {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 4px;
    font-family: 'Bebas Neue Pro', sans-serif;
    font-weight: 400;
}

/* Select styling */
.bbb-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

/* Captcha Container */
.bbb-captcha-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* Submit Button */
.bbb-submit-btn {
    display: block;
    width: 200px;
    margin: 24px auto 0;
    padding: 12px 24px;
    font-family: 'Bebas Neue Pro', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: white;
    background: #1976d2;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.2s, transform 0.1s;
}

.bbb-submit-btn:hover:not(:disabled) {
    background: #1565c0;
}

.bbb-submit-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.bbb-submit-btn:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

.bbb-submit-btn .loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Page Specific Styles */
.bbb-success-alert {
    background: rgba(46, 125, 50, 0.9);
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Bebas Neue Pro', sans-serif;
    font-weight: 400;
    font-size: 16px;
}

.bbb-success-alert.bbb-success-alert-header {
    margin: -20px -16px 20px -16px;
    border-radius: 16px 16px 0 0;
}

@media (min-width: 768px) {
    .bbb-success-alert.bbb-success-alert-header {
        margin: -24px -32px 20px -32px;
    }
}

.bbb-error-alert {
    background: rgba(211, 47, 47, 0.9);
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Bebas Neue Pro', sans-serif;
    font-weight: 400;
    font-size: 16px;
}

/* Data Table */
.bbb-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.bbb-data-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bbb-data-table tr:last-child {
    border-bottom: none;
}

.bbb-data-table td {
    padding: 10px 0;
    font-family: 'Bebas Neue Pro', sans-serif;
    font-size: 15px;
    color: white;
}

.bbb-data-table td:first-child {
    font-weight: 700;
    width: 45%;
    padding-right: 12px;
}

.bbb-data-table td:last-child {
    font-weight: 400;
}

/* Subtitle */
.bbb-subtitle {
    font-family: 'Bebas Neue Pro', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: white;
    text-align: center;
    margin: 24px 0 16px;
}

/* Payment Info */
.bbb-payment-text {
    font-family: 'Bebas Neue Pro', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: white;
    text-align: center;
    margin-bottom: 8px;
}

.bbb-payment-text strong {
    font-weight: 700;
}

.bbb-price-badge {
    font-family: 'Bebas Neue Pro', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #64b5f6;
    text-align: center;
    margin: 16px 0;
}

/* Barcode Container */
.bbb-barcode-container {
    display: flex;
    justify-content: center;
    padding: 16px;
    background: white;
    border-radius: 8px;
    margin: 16px 0;
}

.bbb-barcode-container img {
    max-width: 100%;
    height: auto;
}

/* Divider */
.bbb-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 20px 0;
}

/* Important Note */
.bbb-note {
    font-family: 'Bebas Neue Pro', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #ffeb3b;
    text-align: center;
    margin: 16px 0;
}

/* Secondary Button */
.bbb-secondary-btn {
    display: block;
    width: 200px;
    margin: 20px auto 0;
    padding: 10px 20px;
    font-family: 'Bebas Neue Pro', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: white;
    background: transparent;
    border: 2px solid #1976d2;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.2s;
    text-decoration: none;
    text-align: center;
}

.bbb-secondary-btn:hover {
    background: rgba(25, 118, 210, 0.2);
}

/* Loading Spinner (full page) */
.bbb-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.bbb-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Autocomplete dropdown override for dark theme */
.bbb-autocomplete-wrapper {
    position: relative;
    flex: 1;
}

.bbb-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
}

.bbb-autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    font-family: 'Bebas Neue Pro', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: #333;
}

.bbb-autocomplete-item:hover,
.bbb-autocomplete-item.highlighted {
    background: #e3f2fd;
}
