@media (min-width: 500px) {
    input {
            min-width: 250px;
    }
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

h1.title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 50px;
}

h1.title:has(+ div figure) {
    margin-bottom: 20px;
}

.tab-list {
    justify-content: space-between;
}

.hidden {
    visibility: hidden;
}

button {
    font-size: inherit;
    margin-bottom: 20px;
    padding: 10px 10px;
    cursor: pointer;
}

button.connect-wallet {
    background-color: #6c757d;
    color: white;
}

.modal {
	border:solid 1px #999;
	border-radius:8px;
	box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.3);
	background-color:white;
	padding:20px;
}

.modal button {
    color: white;
    background: #d9534f;
    border: solid #d9534f;
    outline: none;
    border-radius: 8px;
    padding: 10px 20px;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor:pointer;
}

.wallet-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wallet-modal-header h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.wallet-options {
    display: flex;
    flex-direction: column;
    position: relative;
}

.wallet-options button:not(.exit-button) {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 14px 20px;
    margin: 10px 0;
    transition: transform 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.wallet-options .exit-button {
    margin-left: 12px;
    width: 36px;
    height: 36px;
    font-size: 20px;
    border-radius: 6px;
    color: #333;
    border: none;
    background: #f5f5f5;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.wallet-options button:not(.exit-button):hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}


.wallet-options .exit-button:hover {
    background: #e0e0e0;
}

.wallet-options button img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.wallet-options button span {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

input[readonly] {
    background-color: #f0f0f0;
    color: #555;
    border: 1px dashed #aaa;
    cursor: not-allowed;
}

input::placeholder,
textarea::placeholder {
    color: gray !important;
    text-align: left !important;
    font-style: italic;
}

.progress-indicator {
    display: none;
}
.htmx-request .progress-indicator {
    display: block;
}
.htmx-request.progress-indicator {
    display: block;
}

img.centered {
    display: block;
    margin: 0 auto;;
}

.boxed-text {
    display: block;
    padding: calc(var(--rhythm) / 4);
    border-radius: calc(var(--rhythm) / 2);
}

.align-all {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: 0px 5px;
    gap: 10px;
}

.wide {
    width: 100%;
}

.bad::placeholder {
    color: brown !important;
}

.tooltip {
    font-size: small;
    background-color: dimgray;
    color: whitesmoke;
    padding: 2px 5px;
    border-radius: 2px;
    position: absolute;
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    display: none;
}

/* .has-info adds a ? icon next to an element to show a tooltip on hover */
.has-info {
    display: inline-block;
    position: relative;
}

.has-info::before {
    content: '?';
    display: inline-block;
    width: 15px;
    height: 15px;
    line-height: 13px;
    font-size: 10px;
    color: #555;
    background-color: #f9f9f9;
    border-radius: 50%;
    border: 1px solid #555;
    text-align: center;
    vertical-align: super;
    margin-left: 2px;
    cursor: pointer;
}

.has-info:hover .tooltip {
    display: block; /* Show tooltip on hover */
}

/* .checkbox is a custom checkbox element */
.checkbox {
    width: 20px;
    height: 20px;
    border: 1px solid #000;
    box-sizing: border-box;
    background-color: white;
    cursor: pointer;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.checkbox::after {
    content: '✓';
    /* ideally we would add `display: none;` to make the checkmark invisible
     * until the checkbox is checked, but mobile safari collapses the box width
     * if empty, so we just make the checkmark the same color as the background
     */
}

.checkbox.checked::after {
    display: block;
    color: green;
}

.demobar {
    position: sticky;
    z-index: 5;
	top: 0;
	left: 0;
	right: 0;
    min-height: 25px;
    background: darkred;
    color: #f0f0f0;
    font-weight: bold;
    font-size: 16px;
    width: 100%;
    text-align: center;
}

.demobar a {
    color: white;
}

.link-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10;
}

.link-bar a {
    text-decoration: none;
    font-weight: bold;
    color: #414040;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.link-bar a:hover {
    color: black;
    text-decoration: underline;
}

.link-bar a img {
    transition: transform 0.3s ease;
}

.link-bar a:hover img {
    transform: scale(1.3);
}

.underlined {
    text-decoration: underline;
}

.underlined:hover {
    font-weight: bold;
}

.red {
    color: #d9534f;
}

.footer {
  text-align: center;
  margin-top: 10px;
  color: #7f8c8d;
  font-size: 14px;
}

.stats-table {
    margin: 20px auto;
    border-collapse: collapse;
    text-align: left;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.stats-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #ddd;
}

.stats-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.stats-table tr:hover {
    background-color: #f1f1f1;
}

.stats-table tr td:nth-child(2){
    text-align: right;
}

.stats-table td:last-child {
    font-style: italic;
}

:root.dark-theme {
    --fg: var(--gray-0);
    --muted-fg: var(--gray-2);
    --faded-fg: var(--gray-7);

    --plain-bg: var(--gray-11);
    --info-bg: var(--blue-12);
    --ok-bg: var(--green-12);
    --bad-bg: var(--red-12);
    --warn-bg: var(--yellow-12);

    --plain-faded-fg: var(--blue-6);
    --info-faded-fg: var(--blue-6);
    --ok-faded-fg: var(--green-6);
    --bad-faded-fg: var(--red-6);
    --warn-faded-fg: var(--yellow-6);

    --bg: var(--gray-12);
    --box-bg: var(--gray-10);
    --interactive-bg: var(--gray-8);

    --plain-fg: (--blue-2);
    --info-fg: var(--blue-2);
    --ok-fg: var(--green-2);
    --bad-fg: var(--red-2);
    --warn-fg: var(--yellow-2);

    --accent: var(--blue-2);
    --muted-accent: var(--blue-5);
}

