@import url('https://fonts.googleapis.com/css2?family=Quicksand&display=swap');

/* --- Reset CSS --- */
/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}
body {
    line-height: 1;
}
ol,
ul {
    list-style: none;
}
blockquote,
q {
    quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
/* --- Reset end --- */

* {
    box-sizing: border-box;
}

:root {
    --body-color: #fafafa;
    --header-color: #f8fafc;
    --button-add-color: #0369a1;
    --button-add-color-hover: #0284c7;
    --form-color: white;
    --button-submit-color: #64748b;
    --button-submit-color-hover: #94a3b8;
    --checkbox-color: #65a30d;
}

body {
    font-family: 'Quicksand', sans-serif, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
        'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', system-ui;
    min-height: 100vh;
    min-width: 100vw;
    font-size: 16px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background-color: var(--body-color);
}

header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 7rem 1rem 7rem;
    background-color: var(--header-color);
    font-weight: 900;
    box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px;
}

header h1 {
    font-size: 2.8em;
}

.user-info {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 3rem;
}

.logo img {
    height: 90%;
    width: auto;
}

.logo h1 {
    margin-left: 1rem;
    letter-spacing: 0.1rem;
}

#user-name {
    font-size: 1.2rem;
}

#user-pic {
    top: -3px;
    position: relative;
    display: inline-block;
    background-image: url('/profile_placeholder.png');
    background-repeat: no-repeat;
    width: 40px;
    height: 40px;
    background-size: 40px;
    border-radius: 20px;
}

main {
    display: flex;
    flex-direction: column;
}

.inactive {
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.2); /* Black w/ opacity */
}

.btn-sign-in,
.btn-sign-out {
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: white;
    background-color: var(--button-add-color);
    border-radius: 8px;
    width: 6rem;
    height: 2.5rem;
}

.btn-sign-in:hover,
.btn-sign-out:hover {
    cursor: pointer;
    background-color: var(--button-add-color-hover);
}

.btn-sign-out:active,
.btn-sign-out:active {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.btn-add-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.btn-add {
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    color: white;
    background-color: var(--button-add-color);
    border-radius: 8px;
    width: 10rem;
    height: 2.5rem;
}

.btn-add:hover {
    cursor: pointer;
    background-color: var(--button-add-color-hover);
}

.btn-add:active {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.btn-add .material-symbols-outlined,
#btn-close .material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 700, 'GRAD' 0, 'opsz' 18;
}

.btn-add .material-symbols-outlined {
    font-size: 1.8rem;
}

#content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
    padding: 0 8rem 1.5rem 8rem;
}

.card {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1rem 2rem 1rem;
}

.card-unread {
    background-color: #fca5a5;
}

.card-read {
    background-color: #bbf7d0;
}

.card h1,
.card p {
    text-align: center;
}

.card h1 {
    font-weight: 900;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.card p {
    font-size: 1.5rem;
}

.btn-read {
    margin-top: 2rem;
}

.btn-read,
.btn-remove {
    height: 3rem;
    width: 12rem;
}

.footer {
    /* position: absolute;
    bottom: 0;*/
    width: 100%;
    height: 2.5rem;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.reflink {
    width: 25px;
    text-align: center;
}

.github-img {
    width: 20px;
    height: 20px;
}

.github-img:hover {
    width: 25px;
    height: 25px;
}

/* ------- Pop Up content ------- */

.inactive {
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.2); /* Black w/ opacity */
}

#modal {
    display: none; /* Hide the pop-up by default */
    position: fixed; /* Position the pop-up fixed on the screen */
    top: 50%; /* Position the pop-up vertically centered */
    left: 50%; /* Position the pop-up horizontally centered */
    transform: translate(-50%, -50%); /* Offset the pop-up to the center of the screen */
    z-index: 1; /* Make sure the pop-up is on top of other elements */
    background-color: var(--form-color); /* Set the background color of the pop-up */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* Add a shadow to the pop-up */
    padding: 20px; /* Add some padding to the pop-up */
    border-radius: 8px;
}

#modal-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
}

#btn-close {
    width: 1rem;
    height: 1rem;
    border: none;
    background-color: var(--form-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 15px;
    top: 15px;
}

#btn-close .material-symbols-outlined:hover {
    cursor: pointer;
    color: #e11d48;
}

.form-title {
    font-size: 1.6rem;
    font-weight: 600;
    padding-bottom: 1rem;
}

#form-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.data-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.data {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.data label {
    font-weight: 600;
}

input[type='checkbox'] {
    height: 25px;
    width: 25px;
}

input[type='checkbox']:hover {
    cursor: pointer;
}

input[type='checkbox']:checked {
    accent-color: var(--checkbox-color);
}

input {
    border: 1px solid #374151;
    background-color: white;
    padding: 8px;
    border-radius: 4px;
    font-size: 1.3rem;
}

.warning-content {
    height: 0.8rem;
}

#warning {
    color: red;
    font-size: 0.8;
    font-weight: 700;
}

.btn-submit-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

#btn-submit,
.btn-read,
.btn-remove {
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    background-color: var(--button-submit-color);
    border-radius: 8px;
}

#btn-submit {
    width: 10rem;
    height: 2.5rem;
}

#btn-submit:hover,
.btn-read:hover,
.btn-remove:hover {
    cursor: pointer;
    background-color: var(--button-submit-color-hover);
}

#btn-submit:active,
.btn-read:active,
.btn-remove:active {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* MEDIA QUERIES */
@media (max-width: 640px) {
    header {
        height: 5rem;
        font-size: 2.4rem;
        margin: 0;
        padding: 0;
        justify-content: center;
    }

    #content {
        gap: 1.5rem;
        padding: 0 2rem 1rem 2rem;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .card {
        padding: 1rem 0.5rem 1rem 0.5rem;
        gap: 0.5rem;
    }

    .card h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .card p {
        font-size: 1.5rem;
    }

    .btn-read,
    .btn-remove {
        font-size: 1rem;
        height: 2.5rem;
        width: 9rem;
    }
}
