/* ===============================
   Global Styles
   =============================== */
   body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #f4f4f4;
}

h2, h3 {
    text-align: center;
    color: #333;
    margin: 20px 0;
}

#refresh-prices-link {
    display: inline-block;
    width: 120px; /* Set a fixed width */
    text-align: center;
}

.navbar-item-loading {
    display: inline-block;
    width: 100%;
    text-align: center; /* Ensure the loading text is centered */
}

a.nav-link:hover, .dropdown-item:hover {
    text-decoration: underline;
    color: #b0b0b0a2 !important;
}

/* 
nav {
    background-color: #0056b3;
    padding: 10px;
}

.navbar {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex; 
    justify-content: space-around; 
}

.navbar li {
    display: inline; 
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
}

.navbar a:hover {
    background-color: #003d7a;
}

.navbar-item-loading {
    display: inline-block;
    min-width: 100px; 
    white-space: nowrap;
    overflow: hidden;
}
 */

/* 
.dropdown .dropbtn {
    cursor: pointer;
    padding: 10px 15px;
    color: white;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #0056b3;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.dropdown-content a {
    color: white;
    padding: 10px 15px;
    display: block;
    background-color: #0056b3; 
}

.dropdown-content a:hover {
    background-color: #003d7a;
}


.dropdown:hover .dropdown-content {
    display: block;
}
 */


/* ===============================
   Table Styles
   =============================== */

.hidden-column {
    display: none;
}

.separate-column {
    padding-right: 20px;  /* Adds space between columns */
    border-right: none;  /* Removes the black border between columns */
    background-color: #f8f9fa;  /* Optional: gives a slightly different background for the separation */
}

/*
table {
    width: auto;
    min-width: 50%;
    margin: 20px auto;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    color: #555;
}

th {
    background-color: #0056b3;
    color: white;
    text-align: center;
    position: relative;
    cursor: pointer;
}

th:hover { background-color: #003d7a; }
tr:hover { background-color: #f1f1f1; }
*/

/* Sorting arrows */
.sort-arrow {
    margin-left: 5px;
    font-size: 0.8em;
    display: inline-block;
}


/* ===============================
   Links
   =============================== */
.centered-link, .centered-link-main {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    text-align: center;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

.centered-link { background-color: #828282; }
.centered-link-main { background-color: #0056b3; }
.centered-link:hover { background-color: #0056b3; }
.centered-link-main:hover { background-color: #828282; }

.centered-link-container {
    display: flex;
    justify-content: center;
    margin: 15px;
}

/* ===============================
   Buttons
   =============================== */
button, input[type="submit"] {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #828282;
    color: white;
    border: none;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}
button:hover, input[type="submit"]:hover { background-color: #0056b3; }

.button-container {
    display: flex;
    justify-content: center;
    margin: 15px;
}

/* ===============================
   Form Styles
   =============================== */
.form-container, .adding_trades {
    flex: 1;
    justify-content: center;
    max-width: 500px;
    margin: auto;
    background: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    align-items: center;
    flex-direction: column;
    display: flex;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    align-items: center;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 3px;
}

.form-container input,
.form-container select {
    width: 100%;
    min-width: 200px;
    max-width: 400px;
    text-align: center;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    margin: 5px auto;
}

.form-container button {
    display: block;
    margin: 10px auto;
    width: fit-content; /* Adjusts width to content */
}

/* Form alignment */
.form-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 50%;
    margin: 0 auto;
    padding: 10px;
}

.bold-label {
    font-weight: bold;
}

/* Date input styling */
input[type="date"] {
    text-align: center;
    border: 1px solid #ddd;
}

/* ===============================
   Chart Styles
   =============================== */
#priceChart {
    width: 60%;
    height: 300px;
}

.chart-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
}

/* ===============================
   Dropdowns
   =============================== */
select {
    padding: 8px 12px;
    font-size: 16px;
    border: 2px solid #62626269;
    border-radius: 6px;
    background-color: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:hover { border-color: #0056b3; }

select option {
    font-size: 16px;
    background: white;
    color: #333;
}


/* ===============================
   Flash messages
   =============================== */
/* Flash messages container */
.flash-messages {
    margin: 10px auto;
    max-width: 400px;
    text-align: center;
}

/* Base alert styling */
.alert {
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
}

/* Success message */
.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Error (danger) message */
.alert.danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Warning message */
.alert.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Info message */
.alert.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}


/* =============================================================================================
                                    POP up styling
   ============================================================================================= */
/* Style for the popup */
#popup {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure the popup is on top */
    display: flex; /* Ensure it's using flexbox to center content */
    text-align: center; /* Center the text inside */
}

/* Style for the content inside the popup */
.popup-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    text-align: center;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

/* Style for the Close button */
.popup-content button {
    padding: 10px 20px;
    background-color: #007bff; /* Blue color */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 16px;
}

/* Change color on hover for the Close button */
.popup-content button:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

/* Style for the Refresh button in the popup (if shown) */
.popup-content .refresh-button {
    padding: 10px 20px;
    background-color: #28a745; /* Green color */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 16px;
}

/* Change color on hover for the Refresh button */
.popup-content .refresh-button:hover {
    background-color: #218838; /* Darker green on hover */
}


/* =============================================================================================
                                    Spinner style
   ============================================================================================= */
/* Styles for the spinner */
.spinner {
    border: 2px solid transparent;
    border-top: 2px solid #000; /* Spinner color */
    border-radius: 50%;
    width: 16px;
    height: 16px;
    padding: 20%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

/* Spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}