/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styles */
body {
  background-color: #f0f6ff;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  padding: 20px;
}

/* Title */
h1 {
  text-align: center;
  margin: 24px auto 20px;
  width: fit-content;
  color: #0166FF; 
  font-size: 3rem;
}

h2 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  color: #333;
}

/* Display User Selector */
#display-user-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  margin: 24px 0 16px;
  gap: 8px;
}

#users-selector {
  margin-left: 5px;
}

select {
  font-size: 0.95rem;
  padding: 6px 16px;
  border: 1.5px solid #cce0f5;
  border-radius: 7px;
  background-color: #fff;
  cursor: pointer;
  outline: none;
}

/* Bookmark card*/
.bookmark-card-div {
  width: 50%;        
  margin: 14px auto;    /* Centers the card horizontally */
  padding: 16px 20px;
  background-color: #e8f4fd; 
  border-radius: 10px;
  border: 1px solid #b8d9f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
} 

/* Links */

#bookmark-display-div a{
  font-size: .95rem;
}

a {
  color: #005a8e;
  font-size: 20px;
  font-weight: bold;
}

a:hover {
  color: #e94560;
}

/* time stamp */
.bookmark-date {
  font-size: 0.8rem;
  color: #555;
  font-style: italic;
}

/* bookmark 1st line to display bookmark name and delete button */
.bookmark-first-line {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

/* delete button */
.delete-button {
  background: transparent;
  border: none;
  padding: 0px 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
  line-height: 1;
}

.delete-button:hover {
  opacity: 1;
}

/* bookmark 1st line to display bookmark name and copy button */
.bookmark-last-line {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

/* button group (like and copy) */
.button-div {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* copy button */
.copy-button {
  background: #f5f5f5;
  border-radius: 6px;
  border: 1px solid #cdd5e0;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  color: rgb(65, 65, 65);
}

.copy-button:hover {
  background: #d5e0bc;
  border-color: #bbb;
}

/* like button */
.like-button {
  background-color: transparent;
  border: none;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.like-button:hover {
  background: #dceeff;
  border-radius: 6px;
}

/* submission form */
#bookmark-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px auto;
  background-color: #ffffff;
  border: 1px solid #c9e4f8;
  border-radius: 12px;       
  padding: 24px 28px; 
  width: 50%;
  box-shadow: 0 2px 12px rgba(1, 102, 255, 0.07);
  gap: 6px;    
}

#bookmark-form input[type="text"],
#bookmark-form textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #cce0f5;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.9rem;
  background: #f7fbff;
  color: #1a1a1a;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin: 0;
}

#bookmark-form input[type="text"]{
  height: 36px;
}

#bookmark-form textarea {
  height: 80px;
  resize: vertical;
}

#bookmark-form label {
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #555;
  margin-top: 6px;
}

#bookmark-form input[type="text"]:focus,
#bookmark-form textarea:focus {
  border-color: #0166FF;
  box-shadow: 0 0 0 3px rgba(1, 102, 255, 0.1);
  background: #fff;
}

#add-bookmark-div {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px;
}

.user-submit {
  margin: 0;
  accent-color: #0166FF;
}

/* submit button */

.submit-button-parent-div {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  width: 100%;
}

#submit-button {
  background: #0166FF;
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 8px 28px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 120px;
  margin-top: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: bold;
}

#submit-button:hover {
  background: #0052cc;
}

.submit-button-parent-div {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  width: 100%;
}

/* "You are:" radio row */
#bookmark-form > div:first-of-type {
  align-self: flex-start;
  font-size: 0.9rem;
  color: #444;
  width: 100%;
}

.user-radio-selections {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

/* Responsive breakpoints */
 
/* Tablet screen */
@media (max-width: 768px) {
  body {
    padding: 12px;
  }
 
  #bookmark-form,
  .bookmark-card-div {
    width: 100%; /* full width on tablet and below */
    padding: 18px 16px;
  }
 
  #display-user-selector {
    font-size: 0.9rem;
    flex-direction: column;
    gap: 6px;
  }
 
  #users-selector {
    margin-left: 0;
    width: 100%;
    max-width: 320px;
  }
}
 
/* Mobile */
@media (max-width: 480px) {
  body {
    padding: 8px;
  }
 
  h1 {
    margin: 16px auto 12px;
  }
 
  h2 {
    font-size: 1rem;
  }
 
  #bookmark-form {
    padding: 16px 12px;
    border-radius: 10px;
    gap: 4px;
  }
 
  #bookmark-form label {
    font-size: 0.72rem;
  }
 
  #bookmark-form input[type="text"],
  #bookmark-form textarea {
    font-size: 1rem; /* prevents iOS auto-zoom (must be ≥16px on some devices) */
    padding: 10px 12px;
  }
 
  #bookmark-form textarea {
    height: 90px;
  }
 
  .bookmark-card-div {
    padding: 12px 14px;
    border-radius: 8px;
  }
 
  .bookmark-last-line {
    flex-direction: column;
    align-items: flex-start;
  }
 
  .button-div {
    align-self: flex-end;
  }
 
  a {
    font-size: 16px; /* comfortable tap size */
  }
 
  #submit-button {
    width: 100%;
    max-width: 200px;
  }
}
 