/*My code*/

/*reset section*/

* {
  font-family: Helvetica, Verdana, sans-serif;
/*  margin:0px; */
/*  padding:0px; */
}

/*sample to adjust/center content in browser window*/
.container {
  width:90%;
  margin:auto;
}

/* Navigation Bar (id=navbar) customization */
#navbar {
  background-color: #2f3542;
  color: #cfd3da;
  line-height: 20px;
  padding: 4px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
#navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#navbar ul{
  padding: 0px;
  list-style:none;
}
#navbar li{
  display:inline;
}
#navbar a{
  color:#ffffff;
  text-decoration: none;
  font-size: 18px;
  padding-right: 15px;
  transition: color 0.15s ease-in-out;
}
#navbar a:hover {
  color: #70a1ff;
}
/* ----------------------------------------- */

/* Title (class=title) customization */
.title {
  background-color: rgb(255,255,255);
  line-height: 20px;
}
.title h1{
  color:#000000;
  text-decoration: none;
  font-size: 25px;
  text-align: center;
  /* padding-right: 10px; */
}
/* ----------------------------------------- */

/* Button customizations */
/* (class=button1) */
.button1{
  background-color: #e7e7e7;
  color:#333333;
  font-size: 18px;
  border: 1px solid gray;
  text-align: center;
  padding: 2px;
  /* padding-right: 10px; */
}
/* ----------------------------------------- */

/* Error Message (class=errormsg) customization -- applied either as a div
   wrapping a <p> (most pages) or directly on a <p> (signup.php), so the
   color/alignment lives on .errormsg itself (works either way) rather
   than relying on a nested "p" always being there */
.errormsg {
  max-width: 900px;
  margin: 12px auto;
  padding: 10px 16px;
  background-color: #fdecea;
  border: 1px solid #f3b4b0;
  border-radius: 8px;
  color: #b3261e;
  font-size: 15px;
  text-align: center;
  box-sizing: border-box;
}
.errormsg p {
  margin: 0;
  color: inherit;
  text-decoration: none;
}
/* ----------------------------------------- */

/* Success Message (class=successmsg) -- used the same way as errormsg but
   was never actually styled anywhere, so it rendered as plain unstyled
   text wherever it appeared */
.successmsg {
  display: block;
  max-width: 900px;
  margin: 12px auto;
  padding: 10px 16px;
  background-color: #e8f5e9;
  border: 1px solid #a8d8ab;
  border-radius: 8px;
  color: #1e7e34;
  font-size: 15px;
  text-align: center;
  box-sizing: border-box;
}
/* ----------------------------------------- */
.box-p {
  background-color: #999999;
}

.box-l {
  width: 23%;
  height: 500px;
  border-collapse: collapse;
  border: 1px solid white;
  float: left;
  background-color: #dddddd;
  color: black;
  padding:5px;
}

.box-l a {
  color: blue;
  text-decoration: none;
}

.box-l th {
  color: black;
  text-align: left;
}

.box-l td {
  color: green;
  text-align: left;
}

.box-l ul {
  /* to get rid of the bullets in front of lists */
  padding:0px;
  list-style:none;
}

.box-m {
  width: 73%;
  height: 500px;
  border-collapse: collapse;
  border: 1px solid white;
  float: left;
  background-color: #dddddd;
  color:#333333;
  padding:5px;
}

.box-m a {
  color: blue;
  text-decoration: none;
}

.box-m th {
  color: black;
  text-align: left;
}

.box-m td {
  color: gray;
  text-align: left;
}

.box-m ul {
  /* to get rid of the bullets in front of lists */
  padding:0px;
  list-style:none;
}

.box-r {
  background-color: #333333;
  color:#ffffff;
  border: 5px, red, solid;
  padding:20px;
  word-spacing: 1em;
}

.box-r ul {
  /* to get rid of the bullets in front of lists */
  padding:0px;
  list-style:none;
}

.deleteButton td {
  text-align: center;
}

.deleteButton a {
  color: red;
}

/* the delete "X" is now a CSRF-protected form button, styled to look
   like the plain link it used to be */
.inlineForm {
  display: inline;
  margin: 0;
}

.linkButton {
  background: none;
  border: none;
  padding: 0;
  color: red;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.copyBtn {
  background-color: #e7e7e7;
  color: #333333;
  font-size: 13px;
  border: 1px solid gray;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
}

#Selected {
  background-color: rgb(192,192,192);
}

/* Profile page (class=profile-page) -- a two-card layout, separate from
   .box-l since that's still used by login/signup/logout */
.profile-page {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 900px;
  margin: 20px auto;
  padding: 0 5%;
}

.profile-page .card {
  flex: 1 1 320px;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 24px 28px;
  box-sizing: border-box;
}

.profile-page .card h2 {
  margin: 0 0 20px 0;
  font-size: 20px;
  color: #2f3542;
  border-bottom: 2px solid #f0f1f3;
  padding-bottom: 10px;
}

.profile-page label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  color: #555555;
  margin: 16px 0 6px 0;
}

.profile-page label:first-of-type {
  margin-top: 0;
}

.profile-page input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d5d8dc;
  border-radius: 6px;
  font-size: 15px;
  transition: border-color 0.15s ease-in-out;
}

.profile-page input:focus {
  outline: none;
  border-color: #70a1ff;
}

.profile-page button[type="submit"] {
  margin-top: 22px;
  width: 100%;
  padding: 11px;
  background-color: #2f3542;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

.profile-page button[type="submit"]:hover {
  background-color: #1e2530;
}
/* ----------------------------------------- */

/* Bookmarks browser (class=bookmark-page) -- directory-style folder tree
   + bookmark rows. Everything scoped under .bookmark-page, same reasoning
   as .profile-page: generic names like .row/.tree/.actions can't collide
   with anything else in this site-wide stylesheet. */
.bookmark-page {
  display: grid;
  grid-template-columns: 260px 1fr;
  max-width: 980px;
  margin: 20px auto;
  border: 1px solid #dde2ea;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(20,25,40,.04), 0 12px 32px -16px rgba(20,25,40,.18);
}

.bookmark-page .sidebar {
  background: #eef1f6;
  border-right: 1px solid #dde2ea;
  padding: 16px 8px;
}
.bookmark-page .section-head { display: flex; align-items: center; justify-content: space-between; }
.bookmark-page .sidebar-label { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: #6b7385; padding: 0 12px 8px; }

.bookmark-page .tree { list-style: none; margin: 0; padding: 0; }
.bookmark-page .tree li.tree-row { display: flex; align-items: center; gap: 2px; }
.bookmark-page .tree-row .tree-delete { flex: none; margin-right: 6px; }
.bookmark-page .tree a {
  display: flex; align-items: center; padding: 7px 12px; border-radius: 6px;
  color: #1b2130; text-decoration: none; font-size: 14px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.bookmark-page .tree a:hover { background: #dde2ea; }
.bookmark-page .tree a.active { background: #e9f0ff; color: #2f6fed; font-weight: 600; }
.bookmark-page .tree a.top { font-weight: 600; }

.bookmark-page .add-btn {
  flex: none; border: 1px solid #dde2ea; background: #ffffff; color: #6b7385;
  border-radius: 6px; width: 24px; height: 24px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.bookmark-page .add-btn:hover { color: #2f6fed; border-color: #2f6fed; }
.bookmark-page .main .add-btn { width: 30px; height: 30px; }

.bookmark-page .main { padding: 20px 26px 30px; }
.bookmark-page .main .section-head { margin-bottom: 16px; }
.bookmark-page .main h2 { font-family: Georgia, "Times New Roman", serif; font-size: 20px; margin: 0; }

.bookmark-page .row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 8px; }
.bookmark-page .row:hover { background: #eef1f6; }
.bookmark-page .row + .row { border-top: 1px solid #dde2ea; }
.bookmark-page .swatch {
  flex: none; width: 30px; height: 30px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font: 600 12px/1 Helvetica, Verdana, sans-serif; color: #ffffff;
}
.bookmark-page .meta { min-width: 0; flex: 1; }
.bookmark-page .row .name { font-size: 14.5px; font-weight: 600; color: #1b2130; text-decoration: none; display: block; }
.bookmark-page .row .name:hover { color: #2f6fed; }

.bookmark-page .actions { display: flex; gap: 4px; flex: none; }
/* a form wrapping a single delete button shouldn't affect the flex layout
   of its parent row -- display:contents makes the <form> "transparent" */
.bookmark-page .inline-form { display: contents; }
.bookmark-page .actions button, .bookmark-page .tree-delete {
  border: 1px solid #dde2ea; background: #ffffff; color: #6b7385;
  border-radius: 6px; width: 30px; height: 30px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.bookmark-page .actions .copy:hover, .bookmark-page .actions .favorite:hover { color: #2f6fed; border-color: #2f6fed; }
.bookmark-page .actions .danger:hover, .bookmark-page .tree-delete:hover { color: #d1495b; border-color: #d1495b; }
.bookmark-page .no-links { color: #6b7385; font-size: 13.5px; padding: 6px 8px; }

/* add-folder / add-bookmark / add-to-favorites dialog -- deliberately NOT
   scoped under .bookmark-page: this overlay sits as a sibling after that
   container closes (so its position:fixed isn't affected by anything),
   and "modal-backdrop"/"modal"/"modal-buttons" are already distinctive
   enough names not to need the extra scoping. */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20,25,40,.45);
  display: none; align-items: center; justify-content: center; z-index: 10;
}
.modal-backdrop.open { display: flex; }
.modal { background: #ffffff; border-radius: 12px; padding: 22px 24px; width: 320px; box-shadow: 0 20px 60px -20px rgba(0,0,0,.4); }
.modal h3 { font-family: Georgia, "Times New Roman", serif; margin: 0 0 16px; font-size: 17px; }
.modal label { display: block; font-size: 12.5px; font-weight: 600; color: #6b7385; margin: 12px 0 5px; }
.modal label:first-of-type { margin-top: 0; }
.modal input {
  width: 100%; padding: 8px 10px; border: 1px solid #dde2ea; border-radius: 6px;
  font-size: 14px; box-sizing: border-box;
}
.modal input:focus { outline: none; border-color: #2f6fed; }
.modal-buttons { display: flex; gap: 8px; margin-top: 18px; }
.modal-buttons button { flex: 1; padding: 9px; border-radius: 6px; font-size: 13.5px; cursor: pointer; border: 1px solid #dde2ea; }
.modal-buttons .primary { background: #2f6fed; border-color: #2f6fed; color: #ffffff; }
.modal-buttons .cancel { background: #ffffff; color: #6b7385; }

@media (max-width: 640px) {
  .bookmark-page { grid-template-columns: 1fr; }
  .bookmark-page .sidebar { border-right: none; border-bottom: 1px solid #dde2ea; }
}
/* ----------------------------------------- */
