/*
1. Global and Typography Settings
*/
body {
    font-family: Arial, sans-serif;    /* typeface for text */
    background-color: #f4f7f6;       /* background color */
    color: #333;                     /* default text color */
    margin: 0;                         /* removes default outer */
    padding: 0;                        /* removes default inner */
    line-height: 1.6;                  /* space between lines */
}

header {
    background-color: #448c44; 
    color: white;
    width: 100%;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    margin: 0;
    font-size: 2em;
}

/*  main content floats */
main {
    width: 90%;
    max-width: 800px;
    padding: 20px;
    background-color: white; 
    margin: 20px auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); 
    border-radius: 8px;
}

h2 {
    color: #448c44;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
    margin-top: 25px;
}


/*
2. Forms and Input Groups
*/
.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input[type="text"], input[type="email"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box; 
}

/* button styles */
.button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.0em;
    font-weight: bold;
    margin-top: 10px;
    background-color: #448c44; 
    color: white; 
}

.instruction {
    background-color: #fff8e1;
    border-left: 5px solid #ff9800;
    padding: 10px;
    color: #333;
    font-style: italic;
}


/*
3. Flash Messages
*/
.flashes {
    list-style: none;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.flashes li {
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-weight: bold;
}

.flashes .error {
    background-color: #f8d7da; 
    color: #721c24; 
    border: 1px solid #f5c6cb;
}

.flashes .success {
    background-color: #e6ffe6; 
    color: #2b7d2b;
    border: 1px solid #c2e0c6;
}

/*
4. Table Styles for Results
*/
table {
    width: 100%;
    border-collapse: collapse;  /* bounding boxes of adjacent cells are merged into a single bounding box */
    margin-top: 20px;
}

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

thead th {
    background-color: #e0f2e0; 
    color: #333;
    font-weight: bold;
}

tbody tr:hover {
    background-color: #f1f1f1; 
}

/* 
5. Fluctuation Styles
*/
.fluctuation.increase {
    color: #2b7d2b;
}

.fluctuation.decrease {
    color: #c62828;
}

.fluctuation .arrow {
    margin-right: 4px;
}
