@import "https://fonts.googleapis.com/icon?family=Material+Icons";
/* todo: css variables */
:root {
    --font: 'Lato', sans-serif;
    --border: 1px solid #ddd;
    --font-size: 2vw;
    --button-color: #579e8470;
    --button-color-focus: #0a705770;
    --background-gradient: radial-gradient(circle, rgba(174,238,233,0.8610294459580707) 10%, rgba(0,1,2,1) 90%);
    --translate-center: translate(-50%, -50%);
    /*
    background: radial-gradient(circle, rgba(174,238,233,0.8610294459580707) 0%, rgba(0,1,2,1) 87%);
    background: radial-gradient(circle, rgba(39,200,177,1) 36%, rgba(24,105,8,0.7797969529608718) 60%, rgba(24,105,8,1) 80%, rgba(0,0,0,1) 100%);
    https://cssgradient.io/
    background: linear-gradient(#1777, #0077), #333;
     */
}

@keyframes breathe {
    0% { box-shadow: 0 0 5px rgba(5, 150, 105, 0.2); border-color: rgba(5, 150, 105, 0.1); }
    50% { box-shadow: 0 0 20px rgba(5, 150, 105, 0.4); border-color: rgba(5, 150, 105, 0.4); }
    100% { box-shadow: 0 0 5px rgba(5, 150, 105, 0.2); border-color: rgba(5, 150, 105, 0.1); }
}

.glow-anchor {
    animation: breathe 3s infinite ease-in-out;
}

/* Initial state when the element is added to the DOM */
.fade-me-in {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease-out;
}

/* State after HTMX "settles" */
.htmx-settling .fade-me-in {
    opacity: 0;
}

/* Final visible state */
.fade-me-in {
    opacity: 1;
    transform: translateY(0);
}

/* State when the element is being swapped out (Closing) */
.htmx-swapping {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease-in;
}

html, body {
    height: 100%;
    width:100%;
    margin: auto;
    font-size: 4vw;
}

html {
    display: table;
    text-align:center;
}

html, div.floatingform {
    background: var(--background-gradient);
}

body {  
    display: table-cell;
    vertical-align: middle;
}

div{
    align-content:center;
}

table {
    margin-left: auto;
    margin-right: auto;
}

/*
todo: moving image down the z makes image links stop working
img {
 */
.prize {
    position: relative;
    z-index: -1;
}

.content {
    max-width: 500px;
    margin: auto;
}

.toggle-dropdown { cursor:pointer; }

/* https://www.freecodecamp.org/news/how-to-center-an-image-in-a-div-css/ */
#toggle{
    position:absolute;
    left:50%;
    top:50%;
}

img.TC, img.TS {
    border: 10px solid #000;
    background-color: rgba(0, 0, 0, 0.85);
    position:fixed;
    transform: var(--translate-center);
}

/* todo: hack, need to splt qr between types, maybe add type(?) */
img.RF {
    border: 10px solid #000;
    background-color: rgba(0, 0, 0, 0.85);
}

button, input[type="file"]::file-selector-button {
    background-color: var(--button-color);
    border: 0.5px solid black;
    color: black;
    padding: 5px 20px;
    text-align: center;
    text-decoration: none;
    margin: 2px 2px;
    font-size: 2.5vw;
}

button[disabled] {
    border: 1px solid #999999;
    background-color: #cccccc;
    color: #666666;
}

.error-message {
    color:red;
}
.error input {
    border-bottom: 1px solid #cc0000;
}
.valid input {
    box-shadow: 0 0 3px #36cc00;
}

.fade.htmx-added {
    opacity: 0;
}

#fade {
    opacity: 1;
    transition: opacity 1s ease-out;
}

.raffle-ticket, .prize-table{
    border-collapse: collapse;
    width: 80%;
    /*border: var(--border);*/
}

.raffle-ticket, .prize-table td {
    /*border-bottom: var(--border);*/
    /*border-left: var(--border);*/
    /*border-right: var(--border);*/
    /*border-top: var(--border);*/

    text-align: center;
    vertical-align: center;
    padding-top: 0;
}
.tdtop {
    vertical-align: top;
    text-align:right;
}

#rafflesTable {
    border-collapse: collapse;
    width: 80%;
    border: var(--border);
}

/* keep upload ratio, fill into img provided height width */
img {
    object-fit:contain;
}

pre {
    margin: 5px;
    font-family: var(--font);
    font-size: 3.2vw;
}


/* intl-tel style */
// todo: clean this up, clases
.container {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 10px;
}

.iti {
    padding-left: 50px;
    font-size: 2vw;
    display: block !important;
}

.info {
    font-size: 3vw;
}

.alert {
    padding: 15px;
    margin-top: 10px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-info {
    border-color: #bce8f1;
    color: #31708f;
    background-color: #d9edf7;
}

.alert-error {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

.input-field.suffix i {
  position: relative;
  width: 3rem;
  font-size: 2rem;
  transition: color .2s;
  top: 0px;
  right: 0px;
}

.input-field.suffix i.active {
  color: #26a69a;
}

.input-field.suffix input,
.input-field.suffix textarea {
  margin-right: 3rem;
  width: 92%;
  width: calc(100% - 3rem);
}

.input-field.suffix textarea {
  padding-top: .8rem;
}

.input-field.suffix label {
  margin-right: 3rem;
}

@media only screen and (max-width: 992px) {
  .input-field.suffix input {
    width: 86%;
    width: calc(100% - 3rem);
  }
}

@media only screen and (max-width: 600px) {
  .input-field.suffix input {
    width: 80%;
    width: calc(100% - 3rem);
  }
}

.material-icons {
  display: none;
  color: red;
}

.invalid ~ .material-icons {
  display: block;
}

.warning {
    background-image: url('/static/warning.png');
    background-position: 100% 50%;
    background-repeat: no-repeat;
    background-size: 30px;
}

.radio-button {
    width: auto;
    white-space:nowrap;
    font-size:2vw;
}

.radio-button input {
    display: inline;
}
