/* import a nice font for numbers */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
body { 
    font-family: 'Roboto', sans-serif; 
    background-color: #1a1a1a; 
    color: #fff;
    padding-top: 80px;
}
a {
    text-decoration: none;
    color: #fff;
}
a:hover {
    text-decoration: underline;
}

.search-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    gap: 10px;
}

#ticker-entry {
    background-color: #2c2c2e;
    color: #f0f0f0;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 10px;
    font-size: 1em;
    width: 300px;
}

#ticker-entry::placeholder {
    color: #888;
}

#ticker-entry:focus {
    outline: none;
    border-color: #bb86fc;
}

#search {
    background-color: #1a1a1a;
    color: #bb86fc;
    border: 1px solid #bb86fc;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

#search:hover {
    background-color: #bb86fc;
    color: #1a1a1a;
}

#results-container {
    padding: 20px;
}

#results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    grid-gap: 15px;
}

.ticker-container {
    position: relative;
    border: 1px solid #ccc;
    padding: 5px;
    width: 300px;
    height: 150px;
    display: flex;
    flex-direction: column;
}
.ticker-container.dragging {
    opacity: 0.5;
}
.ticker-header {
    width: 80%;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    justify-content: start;
    align-items: start;
    height: 70px;
}


.title-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-image {
    width: 35px;
    height: 35px;
    border-radius: 3px;
    object-fit: cover;
}

.ticker-header > span {
    font-size: 0.7em;
    color: #aaa;
}

.ticker-header .fa-clipboard {
    cursor: pointer;
    margin-left: 3px;
}
.ticker-header .fa-clipboard:hover {
    color: #fff;
}

.ticker-controls { /* absolute top right inside the ticker-container */
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    font-weight: 100;
    gap: 5px;
    z-index: 1000;
}

.ticker-controls i {
    color: #aaa;
    cursor: pointer;
}
.ticker-controls i:hover {
    color: #fff;
}

.alert-icon.has-active-alert {
    color: #ff9900;
}

.volume-container {
    position: absolute;
    bottom: 4px;
    right: 4px;
    text-align: center;
    font-size: 0.6em;
    color: #aaa;
}

.trading-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 5px;
    padding-bottom: 5px;
}

.spread {
    font-size: 0.8em;
    color: #aaa;
}

.price-squares {
    display: flex;
    justify-content: space-around;
    flex-grow: 1;
    align-items: center;
}

.ask-containers {
    display: flex;
    justify-content: space-between;
    gap: 5px;
}

.trading-closed {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    color: #888;
}

.price-square {
    width: 80px;
    height: 50px;
    border: 1px solid #000;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.price-square.yes { background-color: #408fff; }    
.price-square.yes .price-value { color: #000; }
.price-square.no { background-color: #d24dff; }
.price-square.no .price-value { color: #000; }
.price-label { font-size: 0.7em; font-weight: bold; color: #222; }
.price-value { font-size: 1.2em; font-weight: bold; }

.price-updated {
    animation: price-change 0.7s ease-out;
}

@keyframes price-change {
    from {
        transform: scale(1.05);
    }
    to {
        transform: scale(1);
    }
}

.price-change-up {
    animation: price-change-up 0.7s ease-out;
}

@keyframes price-change-up {
    /* Change color from a green to normal color */
    from {
        transform: scale(1.05);
        color: #126812;
    }
    to {
        transform: scale(1);
        color: #000;
    }
}

.price-change-down {
    animation: price-change-down 0.7s ease-out;
}

@keyframes price-change-down {
    from {
        transform: scale(1.05);
        color: #681212;
    }
    to {
        transform: scale(1);
        color: #000;
    }
}


.undo-popup {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000000;
    color: #aaa;
    padding: 10px;
    border-radius: 5px;
    z-index: 2000;
}

.undo-popup .undo-click {
    color: #ccc;
    cursor: pointer;
    text-decoration: underline;
}
.undo-popup .undo-click:hover {
    color: #fff;
}

.color-picker-palette {
    display: flex;
    gap: 5px;
    padding: 5px;
    background: #2c2c2c;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1010;
}
.color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
}

.alerts-menu {
    position: absolute;
    width: 280px;
    background-color: #2c2c2e;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 1010;
    color: #f0f0f0;
    padding: 10px;
}

.alerts-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.alerts-menu-header h3 {
    margin: 0;
    font-size: 1.1em;
}

.close-alerts-menu {
    background: none;
    border: none;
    color: #f0f0f0;
    font-size: 1.5em;
    cursor: pointer;
}

.add-alert-form h4 {
    margin-top: 15px;
    margin-bottom: 10px;
}

.add-alert-form select,
.add-alert-form input[type="number"],
.add-alert-form button {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #555;
    background-color: #333;
    color: #f0f0f0;
}

.add-alert-form fieldset {
    border: 1px solid #555;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.add-alert-form legend {
    padding: 0 5px;
    font-size: 0.9em;
}

.add-alert-form label {
    display: block;
    margin-bottom: 5px;
}

.alert-value-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.alert-value-container input {
    flex-grow: 1;
    width: auto;
    margin-right: 5px;
}

.no-alerts {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 10px;
}

.confirmation-popup {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 2010;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.alert-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px;
    background-color: #333;
    border-radius: 4px;
    margin-bottom: 5px;
}

.alert-text-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-item > span {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-expiration {
    font-size: 0.8em;
    color: #aaa;
    margin-top: 4px;
}

.delete-alert {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 1.2em;
}

.flashing {
    animation: alert-flash 0.5s 20 alternate;
}

@keyframes alert-flash {
    from {
        box-shadow: 0 0 10px 5px #ffdd00;
    }
    to {
        box-shadow: 0 0 10px 5px #ffdd0044;
    }
}

.change-flashing {
    animation: change-flash 0.5s ease-out;
}

@keyframes change-flash {
    from {
        scale: 1.1;
        text-shadow: 0 0 5px #ffffffaa;
    }
    to {
        scale: 1;
        text-shadow: none;
    }
}

.push-permission-status {
    margin-left: 5px;
}
.push-permission-status.permission-denied {
    color: #ff6b6b;
}
.push-permission-status.permission-default {
    font-size: 0.9em;
    text-decoration: underline;
    cursor: pointer;
    color: #48dbfb;
}
.push-permission-info {
    margin-left: 5px;
    color: #aaa;
}

.push-permission-message {
    font-size: 0.8em;
    color: #aaa;
    margin-top: 5px;
    margin-left: 20px;
}
.push-permission-message.permission-default {
    text-decoration: underline;
    cursor: pointer;
    color: #48dbfb;
}

.alert-expiration-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.alert-expiration-container label {
    font-size: 0.9em;
    color: #ccc;
}

#custom-expiration {
    margin-top: 5px;
}

.alert-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #d9534f;
    border-radius: 50%;
    width: 8px;
    height: 8px;
    border: 1px solid #1a1a1a;
}