/* css reset... */
/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
*:not(dialog) {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  /* 4. Increase line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 8. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/*
  10. Create a root stacking context
*/
#root,
#__next {
  isolation: isolate;
}

/* project styles start here */
@font-face {
    font-family: 'Playfair display';
    src: url(../assets/font/playfair-display/PlayfairDisplay-Black.ttf);
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'Playfair display';
    src: url(../assets/font/playfair-display/PlayfairDisplay-Bold.ttf);
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Playfair display';
    src: url(../assets/font/playfair-display/PlayfairDisplay-Regular.ttf);
    font-weight: 400;
    font-style: normal;
}

:root {
    --text-color: #2A241E;
    --serif-font: 'Playfair display', serif;
    --sans-serif-font: 'Segoe UI', sans-serif;
    --inner-panel: #F6F5F0;
    --page-off-white: #EDEAE3;
}
body {
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--page-off-white);
}
/* header setup... */
svg {
  width: 3rem;
  height: auto;
  fill: var(--text-color);
}

h1,
h2,
h3 {
  font-family: var(--serif-font);
  font-weight: 700;
}

.log-in,
.cancel {
  border: 1px solid var(--text-color);
  padding: 0.8rem 1.5rem;
  color: var(--text-color);
  background-color: var(--inner-panel);
  font-family: var(--sans-serif-font);
  font-weight: 500;
  border-radius: 5rem;
  cursor: pointer;
}
.log-in:hover {
    color: var(--inner-panel);
    background-color: var(--text-color);
    border: 1px solid transparent;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 20%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.left {
    display: flex;
    gap: 2.5rem;
}

/* main-section styles starts... */
.main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}
.shelf {
    border: 1px solid var(--text-color);
    border-radius: 0.8rem;
    width: 60%;
    height: 60vh;
    background-color: var(--inner-panel);

    display: flex;
    flex-direction: column;
}
.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--text-color);
    padding: 1.8rem;
}
h2 {
    font-size: 1.8rem;
}
.add-book, .add-to-lib {
    border: 1px solid transparent;
    padding: 0.8rem 1.5rem;
    background-color: var(--text-color);
    color: var(--inner-panel);
    font-family: var(--sans-serif-font);
    font-weight: 500;
    border-radius: 5rem;
    cursor: pointer;
}
.add-book:hover {
    background-color: var(--inner-panel);
    color: var(--text-color);
    border: 1px solid var(--text-color);
}

.middle {
  padding: 1rem 1.8rem;
  margin-bottom: 2rem;
  overflow-y: auto;
}

.col-head,
.book {
  display: grid;
  grid-template-columns: 4fr 3fr 1fr 2fr;
  gap: 2rem;
  align-items: end;
}

.col-head h3 {
  margin-bottom: 0.5rem;
}

.book {
    padding: 1rem 0rem;
    align-items: center;
}
.book h3 {
    font-family: var(--serif-font);
    font-weight: 400;
}

input[type="checkbox"] {
    accent-color: var(--text-color);
    transform: scale(1.5);
}
.remove {
    padding: 0;
    border: 1px solid transparent;
    cursor: pointer;
}
.remove:hover {
    border: 1px solid var(--text-color);
    color: var(--inner-panel);
}
.book div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
hr {
    opacity: .4;
}

.footer svg, .remove svg {
    width: 1.5rem;
}
.footer {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 2rem;
}

.footer svg:hover {
    opacity: 0.6;
}

/* style the dialog modal */
dialog {
    border: none;
    border-radius: 0.8rem;
}
form {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 20vw;
}

#book-form>h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.input {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.read {
    flex-direction: row;
    justify-content: space-between;
    background-color: var(--page-off-white);
    padding: 1rem;
    border-radius: 0.5rem;
}

label {
    font-family: var(--sans-serif-font);
    color: #535250;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

input[type="text"], input[type="number"] {
    padding: 4px 1rem;
    border-radius: 1rem;
    border: 1px solid #53525060;
}
.read label {
    color: var(--text-color);
}
.buttons {
    display: flex;
    gap: 1rem;

}
.add-to-lib {
    flex-grow: 1;
}
.cancel {
    border: 1px solid #53525060;
}

.buttons button {
    border-radius: 0.7rem;
    padding: 0.6 1.5rem;
}
.add-to-lib:hover {
    opacity: 0.90;
}
.cancel:hover {
    background-color: var(--page-off-white);
}


