body {
  font-family: sans-serif;
  background: #f4f4f4;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: auto;
}

h1, h2 {
  text-align: center;
}

.form-preview { 
  display: flex;
  flex-direction:row;
  gap: 10px;
  justify-content: left;
  align-content:center;
  flex-wrap: wrap;
  margin-bottom: 40px;
  margin-left:10%;
}

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 300px;
}

input[type="text"], input[type="file"] {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button {
  padding: 10px;
  background: black;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.license {
  background: white;
  border: 2px solid black;
  border-radius: 10px;
  padding: 20px;
  width: 300px;
  text-align: center;
}

.license img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ccc;
}

.search {
  text-align: center;
  margin-top: 40px;
}

.hidden {
  display: none;
}


.info
{
    margin-top:20px;
}

/*CARD*/
/* Ensure the wrapper sets the overall size */
.card-wrapper {
  width: 403.84px;
  height: 254.63px;
  perspective: 1000px; 
}

.license-card {
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  position: relative;
}


.card-front,
.card-back {
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #8bbbde;
  background-color: #efe74a;
  border: 2px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  overflow: hidden;
}

.card-front {
  z-index: 2;
  background-image: url('');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding: 0.8em;
}
.license-title p{ 
  display:flex;
  flex-direction:column; 
  font-size: 70%;
  font-weight:bold;
  margin:0;
}

.profile-photo-container {
  width: 100px;
  height: 100px;
  border: 2px solid #ccc;
  overflow: hidden;
  border-radius: 8px; /* optional: rounded corners */
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-img-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.preview-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 🔥 KEY: scales and crops to fill */
}


#preview-img
{
  width: 100px;
  height: 90px;
  border-radius: 50%; 
  border: 2px solid #ccc;
}
 

.card-front p strong {
    color: #555;
}

.license-content
{
    display:flex;
    flex-direction:column;  
}

.mid-group {
    margin-top: 5%;
    display: flex;
    flex-direction: row;
}

.profile-photo-container {
    margin-right: 20px;
}

.profile-photo-container p {
    font-size: 0.6em;
    color: #333;
    margin: 0;
}

.license-content p {
    font-size: 0.6em;
    color: #333;
    margin: 0;
}

.field 
{  
    display: flex;
    flex-direction: column;
    align-items: flex-start; 

    width: 100px; 
    overflow: hidden;
    white-space: nowrap;
} 
 

.field p {
  text-overflow: ellipsis; /* ✅ Adds "..." if content is too long */
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
} 
.subcontent 
{
    display: flex;
    flex-direction: row; 
    gap: 55px; /* controls space between grouped fields */
    margin-bottom: 8px;
}

.card-back {
  transform: rotateY(180deg);
  background-image: url('');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-template-rows: 15%
                       repeat(4, 1fr)
                       auto;
  padding: 0.8em;
}

.card-back p {
  font-size: 0.75em;
  color: #333;
  line-height: 1.3;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-back h3 {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: center;
    margin-top: 0;
    font-size: 1.1em;
    color: #333;
    align-self: center;
}

.license-drink-tier {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: center;
  padding-left: 15px;
}

.license-experience {
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: center;
  padding-left: 15px;
}

.license-emergency-contact {
  grid-column: 1 / -1;
  grid-row: 4;
  align-self: center;
  padding-left: 15px;
}

.license-issued-by {
  grid-column: 1 / -1;
  grid-row: 5;
  align-self: center;
  padding-left: 15px;
}

#qr-code {
  grid-column: 1 / -1;
  grid-row: 6;
  justify-self: center;
  align-self: center;
  width: 120px;
  height: auto;
  margin-top: 1em;
}

.license-card.flipped {
  transform: rotateY(180deg);
}

@media (max-width: 600px) {
    .card-wrapper {
        width: 100%;
        height: auto;
        max-width: 350px;
    }

    .card-front p, .card-back p {
        font-size: 0.7em;
        padding-left: 5px;
    }

    .license-title, .card-back h3 {
        font-size: 1em;
    }

    #preview-img {
        width: 80px;
        height: 80px;
    }

    #qr-code {
        width: 100px;
    }
}


nav
{
    width:100%; 
}

/*WalletConnect*/
.wallet-connect-button 
{ 
  margin-left: auto; 
  display: block; 
}

/*GlobalChat*/
#globalChatSection
{
    position:fixed;
    border-radius:25px;

    margin-right: auto; 
    display: block; 

    width:18%;
    height: 85%;
    min-width: 200px;
    background-color:black;  
}

#globalChatBox
{
    background: #111;
    color: #0f0;
    padding: 1em;
    border: 2px solid #555;
    height: 60%;
    overflow-y: auto;
    font-family: monospace;
    
}

#globalChatInput
{
    margin-left:10px;
    width: 70%; margin-top: 0.5em;
}
/*News*/
#news-panel
{
    position:fixed;
    right:1.5%;
    background-color:#b5ad15; 
    
    border-radius:25px;
    height: 85%;
    width: 18%;

    display: flex;
    flex-direction: column;
    align-items: center; /* This centers horizontally */
    text-align: center;  /* This ensures multi-line text is centered */
}
 
.news-container img {
    max-width: 50%;
    display: block;
    margin: 0 auto;
}
.news-container div {
    display: flex;
    flex-direction: column;
    align-items: center; /* This centers horizontally */
    text-align: center;  /* This ensures multi-line text is centered */
}


/* Under Construction */
/* Under Construction Overlay Styles */
#underConstructionOverlay {
    position: fixed; /* Stays in place even when scrolling */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Semi-transparent dark background */
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it's on top of everything */
    text-align: center;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    transition: opacity 0.3s ease-in-out; /* Smooth transition for showing/hiding */
}

#underConstructionOverlay.hidden {
    opacity: 0;
    pointer-events: none; /* Allows clicks to pass through when hidden */
    visibility: hidden; /* Hides it completely */
}

.overlay-content {
    background-color: #222;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
}

.overlay-content h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ffcc00; /* Yellow for caution/attention */
}

.overlay-content p {
    font-size: 1.2em;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Toggle Button Styling (for the button in the nav) */
.toggle-button {
    background-color: #6200ea; /* Purple */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}

.toggle-button:hover {
    background-color: #3700b3;
}

/* Utility class for hiding elements (ensure this is present) */
.hidden {
    display: none !important;
}

#underConstructionOverlay a 
{
  font-size: 1rem;
  font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  text-decoration: none;
}