/* Global font styles */

@font-face {
    font-family: 'Copernicus';
    src: url('../fonts/CopernicusTrial-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Copernicus';
    src: url('../fonts/CopernicusTrial-Semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Copernicus';
    src: url('../fonts/CopernicusTrial-SemiboldItalic.woff2') format('woff2');
    font-weight: 600;
    font-style: italic;
}

@font-face {
    font-family: 'Copernicus';
    src: url('../fonts/CopernicusTrial-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

h1 {
    font-family: 'Copernicus', sans-serif;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    padding: 0.5rem;
    font-weight: 600;
}

h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    color: #444;
    margin-bottom: 1rem;
    padding: 0.5rem;
    font-weight: 400;
}

p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    color: #555;
    padding: 0.5rem;
    font-weight: 400;
}

/* ENDS Global font styles */

/* General reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* font-family: 'Poppins', sans-serif; TODO: this is tbc */
}

/* ENDS General reset */

/* Protected pages styles */

#app {
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#app.auth-ready {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ENDS Protected pages styles */

/* No JS styles */

.noscript-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fc3737;
    color: #FFF;
    padding: 16px;
    text-align: center;
    font-family: sans-serif;
}

/* ENDS No JS styles */

/* Global header styles */
.header {
    background-color: #FFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
    padding: 0 70px;
    margin-bottom: 20px;
    margin-top: 15px;
}

.header img {
    height: 88px;
    margin-right: 1rem;
}

#logged-in-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-link {
    color: #555;
    font-weight: 500;
    text-decoration: none;
    transition: 0.2s;
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
}

.header-link:hover {
    opacity: 0.7;
}

/* ENDS Global header styles */

/* Global footer styles */
footer {
    background-color: #224862;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: auto;
}

footer p {
    color: #ffffff;
    margin-top: 5rem;
    font-size: 0.9rem;
    margin-right: 2rem;
}

footer img {
    height: 12rem;
    margin: 1rem;
    padding: 0.5rem;
}

/* ENDS Global footer styles */

/* Global styles */

hr {
    border-bottom: #000000;
    width: 6rem;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Index page styles */

.index-hero {
    display: flex;
    position: relative;
}

.index-image-section {
    padding-left: 70px;
    margin-top: 20px;
}

.index-image-section img {
    width: 90vw;
    height: 80vh;
    object-fit: cover;
    border-radius: 0px 20px 20px 20px;
}

.sustainability-dashboard-box {
    background-color: #FFCF48;
    padding: 1rem;
    border-radius: 20px 20px 20px 0px;
    position: absolute;
    margin-left: 50px;
    text-align: center;
}

.sustainability-dashboard-box h1{
    margin-bottom: 0rem;
}

.dashboard-box-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.dashboard-box-buttons button {
    background-color: #224862;
    color: #FFF;
    border: none;
    padding: 0.5rem 1.75rem;
    margin: 0 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
}

.about-info {
    display: flex;
    padding: 2rem;
    justify-content: space-between;
}

.carbon-plan {
    padding-left: 40px;
    padding-bottom: 1rem;
    padding-top: 1rem;
    padding-right: 1rem;
}

.carbon-plan h1 {
    margin-bottom: 0rem;
    padding: 0rem;
}

.carbon-plan p {
    margin-top: 1rem;
    padding: 0;
}

.carbon-plan hr {
    margin-left: 0rem;
}

.sustainability-plan-parts {
    display: flex;
    margin-top: 2rem;
}

.sustainability-plan-part {
    border-radius: 20px;
    padding: 1rem;
    justify-content: space-between;
    
}

.sustainability-plan-part h1 {
    margin-top: 0.75rem;
    padding: 0rem;
    font-size: 1.25rem;
    color: #224862;
    margin-left: 0.5rem;
}

.sustainability-plan-part img {
    width: 250px;
    border-radius: 20px 20px 0px 20px;
}

.university-info {
    background-color: #F4F6FA;
    padding: 2rem;
    display: flex;
}

.university-info-text-section {
    padding-top: 1rem;
}

.university-info-image {
    padding: 1rem;
}

.university-info-image img {
    width: 60vw;
    height: auto;
    border-radius: 20px;
}

.university-info-title {
    background-color: #F4F6FA;
    border-radius: 0 0 0 20px;
    padding: 1rem;
    margin-left: -10rem;
}

.university-info-title h1 {
    color: #224862;
    font-size: 3rem; 
    margin-bottom: 0;
    font-weight: 400;
}

/* ENDS Index page styles */

/* Register page styles */

.register-info {
    background-color: #FFF;
    padding: 2rem;
    display: flex;
}

.register-text-section {
    padding-top: 1rem;
}

.register-image {
    padding: 1rem;
}

.register-image img {
    width: 60vw;
    height: auto;
    border-radius: 20px;
}

.register-title {
    background-color: #FFF;
    border-radius: 0 0 0 20px;
    padding: 1rem;
    padding-left: 2rem;
    margin-left: -10rem;
}

.register-title h1 {
    color: #224862;
    font-size: 3rem; 
    margin-bottom: 0;
    font-weight: 400;
}

.register-info-text {
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.register-info-text button {
   justify-content: center;
   margin-top: 1rem;
   width: 150px;
}

.register-form {
    padding: 2rem;
    background-color: #F4F6FA;  
    display: flex;
    justify-content: center;
    align-items: center;
}

.register-form-box {
    background-color: #FFF;
    padding: 2rem;
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
    border-bottom: 1.5px solid #b3b3b3;
}

.user-firstname-surname {
    display: flex;
    gap: 2rem;
}

.input-group label {
    display: block;
}

/* ENDS Register page styles */

/* Login page styles */

.login-info {
    background-color: #FFF;
    padding: 2rem;
    display: flex;
}

.login-text-section {
    padding-top: 1rem;
}

.login-image {
    padding: 1rem;
}

.login-image img {
    width: 60vw;
    height: auto;
    border-radius: 20px;
}

.login-title {
    background-color: #FFF;
    border-radius: 0 0 0 20px;
    padding: 1rem;
    padding-left: 2rem;
    margin-left: -10rem;
}

.login-title h1 {
    color: #224862;
    font-size: 3rem; 
    margin-bottom: 0;
    font-weight: 400;
}

.login-info-text {
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-info-text button {
   justify-content: center;
   margin-top: 1rem;
   width: 150px;
}

.login-form {
    padding: 2rem;
    background-color: #F4F6FA;  
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-form-box {
    background-color: #FFF;
    padding: 2rem;
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
    border-bottom: 1.5px solid #b3b3b3;
}

/* ENDS Login page styles */

/* Dashboard page styles */

.title-section {
    background-color: #FFCF48;
    min-height: 120px;
    display: flex;
    align-items: center;
}

.title-section h1 {
    margin-left: 70px;
    margin-bottom: 0;
    color: #224862;
}

.dashboards {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.individual-dashboard {
    background-color: #F4F6FA;
    padding: 1rem;
    border-radius: 10px 10px 0px 10px;
    width: 40vw; /* Adjust width as needed */
    height: 55vh; /* Adjust height as needed */    
}

.individual-dashboard img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ENDS Dashboard page styles */

/* View dashboard page styles */

.download-data{
    display: flex;
    justify-content: center;
    padding: 2rem;
    background-color: #F4F6FA;
}

.download-data-box {
    background-color: #FFF;
    padding: 1rem;
    /* width: 300px; */
    text-align: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
}

.date-from {
    text-align: left;
}

.date-to {
    text-align: left;
}

.date-inputs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.view-individual-dashboard {
    background-color: #F4F6FA;
    padding: 1rem;
    border-radius: 10px 10px 0px 10px;
    width: auto; /* Adjust width as needed */
    height: 75vh; /* Adjust height as needed */
}

.view-individual-dashboard img {
    height: 100%;
}

/* ENDS View dashboard page styles */

/* Account / users / solar panels page styles */

.main {
    display: flex;
}

.sidebar {
    background-color: #F4F6FA;
    padding: 1rem;
    width: 290px;
}

.sidebar button {
    background-color: transparent;
    border: none;
    padding: 0.5rem;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    margin-left: 70px;
    margin-right: 70px;
}

.sidebar button:hover {
    color: #224862;
    background-color: transparent;
}

.sidebar hr {
    margin-left: calc(70px + 0.5rem);
    width: 50px;
}

.admin-only {
    display: none;
}

.content {
    flex: 1;
    background-color: #FFF;
    display: flex;
}

.form-box {
    background-color: #FFF;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    margin: 0.5rem;
}

.table-container {
    margin: 40px 70px;
    width: 70vw;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 6px;
    overflow: hidden;
    table-layout: auto;
}

thead {
    background-color: #224862;
    color:#FFF;
}

th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 500;
    font-family: Poppins, sans-serif;
    font-size: 1rem;
    white-space: nowrap;
}

tbody tr {
    background-color: #FFF;
    border-top: 1px solid #e5e7eb;
}

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

td {
    padding: 14px 16px;
    font-family: Poppins, sans-serif;
    font-size: 1rem;
    color: #333;
    white-space: nowrap;
}

td:nth-child(1),
td:nth-child(2),
td:nth-child(4) {
    white-space: nowrap;
}

td:nth-child(3) {
    max-width: 300px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

td.delete {
    text-align: center;
    vertical-align: middle;
}

td.delete:hover {
    color: red;
}

/* ENDS Account / users / solar panels page styles */

/* Form styles */

form {
    display: block; /* Need to amend this so label sits above... */
}

label {
    margin: 0.5rem 0 0.2rem;
    font-weight: bold;
    font-family: Poppins, sans-serif;
}

input {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 0.5rem 0;
    font-size: 1rem;
    display: block;
}

button {
    background-color: #FFCF48;
    padding: 0.75rem;
    border: none;
    border-radius: 10px 10px 0px 10px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 0.5rem;
    font-family: Poppins, sans-serif;
}

button:hover {
    background-color: #16314a;
    color: #FFF;
}

.privacy {
    margin-top: 1rem;
}

.privacy p {
    font-size: 0.8rem;
    color: #555;
    padding: 0;
}

.sign-up-login {
    margin-top: 1rem;
}

.sign-up-login p {
    font-size: 0.9rem;
    color: #555;
    padding: 0;
}

input.error {
    border: 2px solid red;
    background-color: #ffe6e6;
}

.error-message {
    color: red;
    font-size: 0.75em;
    font-family: Poppins, sans-serif;
}

.label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

select {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 0.5rem 0;
    font-size: 1rem;
    display: block;
    width: max-content;
}

/* ENDS Form styles */