/* --- CSS Variables (Custom Properties) for Theming --- */
/* These should match the :root and body.theme-dark definitions in vcard.css */
:root {
    --primary-bg: #f4f4f4;
    --secondary-bg: #ffffff;
    --text-color: #333333;
    --label-color: #555555;
    --input-bg: #fcfcfc; /* Not directly used here, but for consistency if elements are added */
    --input-border: #d4d4d4; /* Not directly used here */
    --input-text: #333333; /* Not directly used here */
    --input-readonly-bg: #e9e9e9; /* Not directly used here */
    --input-readonly-text: #666666; /* Not directly used here */
    --input-focus-border: #007bff; /* Not directly used here */
    --input-focus-shadow: rgba(0, 123, 255, 0.25); /* Not directly used here */
    --button-bg: #007bff; /* Not directly used here */
    --button-hover-bg: #0056b3; /* Not directly used here */
    --button-active-bg: #004085; /* Not directly used here */
    --border-color: #eeeeee; /* General border for separators */
    --form-separator-border: #dddddd; /* Not directly used here */
    --shadow-color: rgba(0, 0, 0, 0.1);
    --highlight-color: #0066cc; /* For names, bold text */
    --link-color: #0073e6;
    --link-hover-color: #005bb5;
}

body.theme-dark {
    --primary-bg: #1a1a1a;
    --secondary-bg: #2c2c2c;
    --text-color: #f0f0f0;
    --label-color: #cccccc;
    --input-bg: #3a3a3a;
    --input-border: #555555;
    --input-text: #eeeeee;
    --input-readonly-bg: #4a4a4a;
    --input-readonly-text: #bbbbbb;
    --input-focus-border: #0099ff;
    --input-focus-shadow: rgba(0, 153, 255, 0.4);
    --button-bg: #007bff;
    --button-hover-bg: #0056b3;
    --button-active-bg: #004085;
    --border-color: #444444;
    --form-separator-border: #444444;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --highlight-color: #00ccff;
    --link-color: #00ccff;
    --link-hover-color: #00aaff;
}

/* --- General Body/Layout for the Standalone Badge Page --- */
body {
    font-family: 'Heebo', Arial, sans-serif;
    background-color: var(--primary-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Ensure it takes full viewport height */
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    color: var(--text-color);
    overflow-y: auto; /* Allow scrolling if content is too tall */
    overflow-x: hidden;
}

/* --- Badge Container Styling (Copied from vcard.css .badge, .badge-info-details, etc.) --- */

.badge-page-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* Space between badge and details */
    align-items: flex-start;
    justify-content: center;
    max-width: 900px; /* Max width for the combined container */
    width: 100%;
    background-color: transparent; /* Container itself is transparent */
}

/* Individual Badge Card */
.badge {
    text-align: center;
    width: 300px; /* Consistent fixed width for the badge card */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    background-color: var(--secondary-bg);
    box-shadow: 0 4px 8px var(--shadow-color);
    position: relative;
    flex-shrink: 0;
}

/* Plain Concepts logo in the corner of the badge */
/* (Matching .badge-logo-corner from vcard.css) */
.badge-logo { /* Renamed badge-logo-corner to badge-logo for vcard_badge.css */
    width: 80px;
    height: auto;
    position: absolute;
    top: 10px;
    right: 10px;
}

/* User Profile Picture */
.badge-profile-image { /* Matching .profile-image from vcard.css */
    width: 150px;
    height: auto;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* QR Code */
.badge-qr-code { /* Matching .qr-code from vcard.css */
    width: 200px;
    height: auto;
    display: block;
    margin: 0 auto 10px auto;
    border: none;
    padding: 0;
}

.badge-name { /* Matching .name from vcard.css */
    font-size: 22px;
    font-weight: bold;
    color: var(--highlight-color);
    margin: 10px 0 5px 0;
}

.badge-title { /* Matching .title from vcard.css */
    font-size: 16px;
    color: var(--label-color);
    margin-bottom: 20px;
}

/* Badge Details (Contact Information) */
.badge-details {
    flex: 1; /* Allows it to grow and fill space */
    min-width: 280px; /* Minimum width before wrapping */
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px var(--shadow-color);
    text-align: left;
    color: var(--text-color);
}

.badge-details h3 {
    margin-top: 0;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.badge-details p {
    margin: 8px 0;
    line-height: 1.5;
}

.badge-details b {
    color: var(--highlight-color);
}

.badge-details a {
    color: var(--link-color);
    text-decoration: none;
    word-break: break-all;
}

.badge-details a:hover {
    text-decoration: underline;
}

/* Responsive adjustments for standalone badge page */
@media (max-width: 768px) {
    .badge-page-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 10px; /* Less padding on smaller screens */
    }

    .badge {
        width: 90%; /* Wider on small screens */
        max-width: 320px; /* Maintain a reasonable max-width */
    }
    
    .badge-details {
        margin-left: 0;
        width: 90%;
        max-width: 400px; /* Adjust max width for details when stacked */
    }
}
