:root {
    --colorMain: #246ddb;
    --colorSecond: #bed3f3;
    --colorBack: white;
}

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500&display=swap');

* {
    -webkit-tap-highlight-color: transparent;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300; 
    color: var(--colorMain);
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
}

.container {
    max-width: 600px; /* Set a sensible maximum width for desktop */
    margin: 0 auto; 
    padding: 10px;
}

.container > section > .feature {
    width: 100%;
    display: flex;
    flex-direction: column; /* Ensure vertical stacking */
    align-items: center; /* Center-align everything inside */
    padding: 0 20px;
    gap: 20px;
    box-sizing: border-box; /* Ensure padding doesn't affect layout */
}

.container > section > .feature.open {
    height: auto; /* Allow content to grow naturally */
    opacity: 1; /* Fade in content */
}

.container > section > .feature.hidden {
    display: none;
}


.container > section > h2 {
    position: relative; 
    height: 40px;
    background-color: var(--colorSecond);
    width: 100%;
    margin: 20px 0;
    text-align: center;
    color: var(--colorBack);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); /* Slightly darker shadow */
    font-size: 30px;
    zztext-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    user-select: none; 
}

.container > section > h2::after {
    content: '–'; 
    zzcontent: '➖'; 
    position: absolute;
    left: 20px; 
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--colorBack);
    transition: transform 0.3s ease;
}

.container > section > h2.open::after {
    content: '+';
    zzcontent: '➕';
    color: var(--colorBack);
    transform: translateY(-50%);
}

.row {
    display: flex;
    align-items: center;
}

p {
    margin: 0px;
    padding: 0px;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
    color: var(--colorMain);
}

textarea {
    width: 100%;
}

#bodyBytesHex {
    width: min(90vw, 400px);
    display: none;
}

button:has(img) {
    position: relative;
    background-color: transparent;
    cursor: pointer;
    border: none;    
}

.row-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 400px;
}

#btnScanTx {
    padding: 5px;
}

#btnScanTx img {
    height: 25mm;
    width: auto;
}

#btnScanSeedNFC,
#btnScanSeedQR, 
#btnEnterSeedManual {
    padding: 5px;
}

#btnGenerateSeed img, 
#btnScanSeedNFC img, 
#btnScanSeedQR img, 
#btnEnterSeedManual img
{
    width: 20mm; /* Adjust the size of the icons as needed. */
    height: auto; /* Maintain aspect ratio */
}

#btnSignTx {
    padding: 0; /* Adjust padding if necessary */
}

#btnWriteSeedNFC img,
#btnSignTx img {
    height: 22mm; /* 3/4 inch tall, unchanged */
    width: auto; /* Maintain aspect ratio */
}

#btnSignTx, #btnSignTx img {
    user-select: none;
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE/Edge */
}

button {
    border: none; 
}

button:hover {
    outline: none; /* Ensures no outline on hover */
}

button:hover img {
    transform: scale(1.05);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0px;
    top: 0px;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.3);
}

.modal video {
    width: 100vw;
    height: auto;
}

#preview-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 9999;
}

#preview-close:hover,
#preview-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--colorMain);
    color: var(--colorBack);
    padding: 6px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1000;
}

/* for new keys */
#seedQrCode {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.hidden {
    display: none
}

#publicKey {
    user-select: text; /* Allow text selection */
    -webkit-user-select: text; /* Safari */
    -moz-user-select: text; /* Firefox */
    -ms-user-select: text; /* IE/Edge */
}


.basic-button {
    position: relative; 
    display: inline-block;
    padding: 10px 20px;
    margin: 10px;
    background-color: var(--colorSecond);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s;
}

.basic-button:hover {
    background-color: #0056b3;
}


.tabs {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #ccc;
}

.tab {
    padding: 10px 20px;
    text-decoration: none;
    color: var(--colorMain);
    position: relative;
    font-weight: bold;
    transition: color 0.3s;
}

.tab.selected::after {
    content: '';
    display: block;
    height: 3px;
    background-color: var(--colorMain);
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
}

/* Center everything inside <details> blocks */
details { 
  width: 100%;
  text-align: center;          /* centers inline content like text/images */
}

/* center block children (img, div, etc.) */
details > * { 
  margin-left: auto; 
  margin-right: auto; 
}

/* your QR code row is a flex row but not centered horizontally */
details .row {
  justify-content: center;     /* was missing */
  width: 100%;
}

/* already asked for wrapping + centered */
#publicKey,
#QRtext {
  white-space: normal
  word-break: break-all
  overflow-wrap: anywhere
  font-family: monospace
  text-align: center
  padding: 5px
}
