/* Defaults */

*, *::before, *::after {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

a {
  text-decoration: none; /* Remove underline */
  color: inherit; /* Inherit text color from parent */
}

a:hover {
  text-decoration: underline; /* Add underline on hover */
}

body {
  font-family: sans-serif;
}

html {
  overflow-y: scroll;
  scrollbar-width: auto;
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Main Styling */

.container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  padding-bottom: 5em;
}

.btn {
  display: inline-block;
  padding: .5em 2em;
  border: 1px solid #fff;
  border-radius: 100px;
  background: #c1c1c1;
  cursor: pointer;
}

.btn:hover {
  color: #636363;
  background: #c1c1c16c;
}

/* Navbar */

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1em 0;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 1em;
}

.nav a {
  text-decoration: none;
  font-family: sans-serif;
  padding: 0.5em;
}

.nav a:hover {
  color: #fff;
  background: #c1c1c1;
  border-radius: 5px;
}

/* Event Card */

.event-card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1em;
  padding: 2em 0;
}

.card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  box-shadow: darkgray 3px 3px 10px;
  background-color: #fff;
  border-radius: 1em;
  padding: 1.5em 1em;
  gap: 1em;
}

.event-show-container .card {
  min-width: 350px;
}

.card-body {
  text-align: center;
}

.card-footer {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 1em;
}

.visibility-tag {
  background-color: rgba(0, 186, 228, 0.5);
  padding: 0.1em 0.3em;
  border-radius: 5px;
}

.visibility-tag.private {
  background-color: rgba(206, 35, 67, 0.5);
}

.card .going {
  color: #00a719;
}

.card .not-going {
  color: #a62929;
}

.unattend-btn {
  background-color: transparent;
  border-color: #a62929fc;
  padding: .5em .5em;
  border-radius: 5px;
}

.unattend-btn:hover {
  color: #fff;
  background-color: #c40000b2;
  border-color: transparent;
}

/* Invite List */
.invite-list-container {
  width: 100%;
  max-height: 17em;
  overflow-y: scroll;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
}

.invite-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.invite-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1em;
  border-bottom: 1px solid #eee;
  gap: 1em;
}

.invite-list-item:last-child {
  border-bottom: none;
}

.invite-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  flex: 1;
}

.invite-username {
  font-weight: 600;
}

.invite-status {
  font-size: 0.9em;
  color: #666;
}

/* Event Page */
.main-section-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: fit-content;
  gap: 2em;
  margin: 0 auto;
}

.event-show-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2em;
  width: fit-content;
  margin: 2em auto;
}

.event-visibility-info {
  width: 100%;
  text-align: center;
  padding: 1em;
  background: #f5f5f5;
  border-radius: 4px;
}

.event-visibility-info p {
  margin: 0;
  font-weight: 600;
}

.event-card-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.event-actions {
  display: flex;
  gap: 1em;
  justify-content: center;
  width: 100%;
}

.event-actions button {
  min-width: 10em;
}

/* Devise Forms */
.devise-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
  padding: 2em;
}

.devise-form {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  width: 100%;
  max-width: 400px;
  padding: 2em;
  background-color: #fff;
  border-radius: 1em;
  box-shadow: darkgray 3px 3px 10px;
}

.devise-form h2 {
  text-align: center;
  margin-bottom: 0.5em;
  color: #333;
}

.devise-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.devise-form .checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 0.75em;
}

.devise-form label {
  font-weight: 600;
  color: #333;
}

.devise-form input[type="text"],
.devise-form input[type="email"],
.devise-form input[type="password"] {
  padding: 0.75em;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: sans-serif;
  font-size: 1em;
}

.devise-form input[type="text"]:focus,
.devise-form input[type="email"]:focus,
.devise-form input[type="password"]:focus {
  outline: none;
  border-color: #c1c1c1;
  box-shadow: 0 0 5px rgba(193, 193, 193, 0.5);
}

.devise-form .actions {
  margin-top: 1em;
}

.devise-form input[type="submit"] {
  width: 100%;
  padding: 0.75em;
  border: none;
  border-radius: 100px;
  background: #c1c1c1;
  cursor: pointer;
  font-weight: 600;
  font-size: 1em;
}

.devise-form input[type="submit"]:hover {
  background: #a9a9a9;
  color: #fff;
}

.devise-form em {
  font-size: 0.85em;
  color: #666;
}

.devise-form .devise-links {
  text-align: center;
  margin-top: 1em;
  padding-top: 1em;
  border-top: 1px solid #eee;
}

.devise-form .devise-links a {
  color: #0066cc;
}

.devise-form .devise-links a:hover {
  text-decoration: underline;
}

/* Event Forms */
.form-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
  padding: 2em;
}

.event-form {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  width: 100%;
  max-width: 500px;
  padding: 2em;
  background-color: #fff;
  border-radius: 1em;
  box-shadow: darkgray 3px 3px 10px;
}

.event-form h2 {
  text-align: center;
  margin-bottom: 0.5em;
  color: #333;
}

.event-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.event-form .checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 0.75em;
}

.event-form label {
  font-weight: 600;
  color: #333;
}

.event-form input[type="text"],
.event-form input[type="date"],
.event-form input[type="email"],
.event-form input[type="password"],
.event-form textarea {
  padding: 0.75em;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: sans-serif;
  font-size: 1em;
}

.event-form input[type="text"]:focus,
.event-form input[type="date"]:focus,
.event-form input[type="email"]:focus,
.event-form input[type="password"]:focus,
.event-form textarea:focus {
  outline: none;
  border-color: #c1c1c1;
  box-shadow: 0 0 5px rgba(193, 193, 193, 0.5);
}

.event-form .actions {
  margin-top: 1em;
}

.event-form input[type="submit"] {
  width: 100%;
  padding: 0.75em;
  border: none;
  border-radius: 100px;
  background: #c1c1c1;
  cursor: pointer;
  font-weight: 600;
  font-size: 1em;
}

.event-form input[type="submit"]:hover {
  background: #a9a9a9;
  color: #fff;
}

/* Flash Messages */
.notice,
.alert {
  padding: 1em 1.5em;
  margin: 1em 0;
  border-radius: 5px;
  font-weight: 500;
  border-left: 4px solid;
}

.notice {
  background-color: rgba(0, 186, 228, 0.15);
  color: #0066cc;
  border-color: #00bae4;
}

.alert {
  background-color: rgba(206, 35, 67, 0.15);
  color: #a62929;
  border-color: #ce2343;
}

/* Profile Page */

.default-event-text {
  font-style: italic;
  color: #636363;
  margin-left: 1em;
}

/* Invites Section */

h3#invites {
  margin-bottom: 1em;
}

.invites-container {
  display: flex;
  flex-direction: column;
  gap: 1em;
  max-width: 600px;
}

.invite-card {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0.75em;
  padding: 1em 1.5em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.invite-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5em;
}

.invite-info {
  flex: 1;
}

.invite-from {
  color: #666;
  font-size: 0.9em;
  margin: 0 0 0.5em 0;
}

.invite-event-title {
  font-size: 1.1em;
  font-weight: 600;
  color: #333;
  text-decoration: none;
}

.invite-event-title:hover {
  color: #0066cc;
  text-decoration: underline;
}

.invite-actions {
  display: flex;
  gap: 0.75em;
}

.invite-accept-btn,
.invite-reject-btn {
  padding: 0.5em 1em;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9em;
  white-space: nowrap;
}

.invite-accept-btn {
  background: #00a719;
  color: #fff;
}

.invite-accept-btn:hover {
  background: #008a14;
}

.invite-reject-btn {
  background: #a62929;
  color: #fff;
}

.invite-reject-btn:hover {
  background: #8a2020;
}