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

body {
  width: 100%;
  max-width: 100%;
}

a, button {
  cursor: pointer;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem;
  border-bottom: 1px solid #ccc;
}

nav a {
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
}

.logo-style {
  display: block;
  height: 40px;
  width: auto;
}

.profile-page-avatar {
  display: block;
  width: 100%;
  padding: .5em;
}

.profile-page-avatar img {
  margin: 0;
}

.profile-bio {
  margin: .5em;
}

header {
  max-width: 100%;
  display: flex;
}

header h1 { 
  width: 50%;
}

header .follow_button {
  width: 50%;
  text-align: right;
  margin: .5em;
}

.copy_raw_form_field {
  width: 100%;
  margin: .25em;
  outline: none;
}

.upload-status {
  display: none;
}

.media-strip {
  display: flex;
  flex-direction: row;
  gap: 12px;

  overflow-x: auto;
  overflow-y: hidden;

  padding:0;
  scroll-snap-type: x mandatory;

  -webkit-overflow-scrolling: touch;
}

.media-card {
  position: relative;
  flex: 0 0 85vw;
  max-width: 420px;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .media-card{
    flex: 0 0 260px; /* desktop becomes card layout again */
  }

  .logo-style {
    
    height: 60px;
    
  }
}

.media-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-right: -10px;
}

.media-remove {
  position: absolute;
  top: 8px;
  right: 8px;

  width: 32px;
  height: 32px;

  border: none;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.9);
  color: black;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  backdrop-filter: blur(4px);
}


.post-media-strip {
  display: flex;

  overflow-x: auto;
  overflow-y: hidden;

  scroll-snap-type: x mandatory;

  -webkit-overflow-scrolling: touch;

  scrollbar-width: none;
}

.post-media-strip::-webkit-scrollbar {
  display: none;
}

.post-slide {
  position: relative;

  flex: 0 0 100%;

  scroll-snap-align: start;

  background: #fff;
}

.post-image-wrap {
  position:relative;
  overflow:hidden;
  max-height: 85vh;
  min-height: 200px;
}

.post-image-wrap img {
  width:100%;
  height:auto;
  display:block;
  max-height: 85vh;
  object-fit: contain;
}
.post-overlay {
  position: relative;
  top: 1.25em;
  margin-left: .5em;
  width: 100%;
  padding: .5em 0;
  display: flex;
  align-items: center;
  z-index: 1;
}

.post-overlay img {
  margin: 0 .5em 0 .5em;
  padding: 0;
  border: 0;
  outline: .15em solid #fff;
}

.post-overlay a {
  color: #333;
  text-decoration: none;
}

.post-caption {
  padding: .5em 1em;
}

.post-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;

  background: rgba(0,0,0,0.2);
}

.like, .post-metadata {
  display: block;
  padding: 0 1em .25em;
  text-align: right;
  color: #999;
  font-size: .8em;
}

.like {
  font-style: italic;
}

 

nav.profile-header {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem;
  border-bottom: 1px solid #ccc;
}

nav.profile-header a,
nav.profile-header form {
  flex: 0 0 auto; /* only as wide as content */
}

nav.profile-header h1 {
  flex: 1;         /* take remaining space */
  text-align: center;
  margin: 0;
  padding: 0;
  line-height: 1;
  font-size: 1.5em;
}



/* create post button */
.create-post-button, .submit-post-button {
  width: 100%;
  margin-bottom: 1em;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 22px;

  border: none;
  border-radius: 12px;

  background: #333;
  color: white;

  font-size: 16px;
  font-weight: 600;

  cursor: pointer;

  
}

.create-post-button {
    transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    box-shadow 0.2s ease;

    animation: create-post-pulse 4s 3;
}

.create-post-button:hover {
  transform: scale(1.03);
}

.create-post-button:active {
  transform: scale(0.97);
}

.create-post-button:focus-visible {
  outline: 2px solid black;
  outline-offset: 3px;
}


@keyframes create-post-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0,0,0,0.22);
  }

  70% {
    box-shadow: 0 0 0 14px rgba(0,0,0,0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0,0,0,0);
  }
}

/* post submit button */
.post-submit-wrap {
  opacity: 0;

  pointer-events: none;

  transform: translateY(8px);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.post-submit-wrap.visible {
  opacity: 1;

  pointer-events: auto;

  transform: translateY(0);
}





/* USER SEARCH */

@keyframes slide-down {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.search-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  z-index: 1000;
  padding: 16px;
  border-bottom: 1px solid #ddd;
}

.animate-slide-down {
  animation: slide-down 0.2s ease-out;
}

.hidden {
  display: none;
}



/* PLACE SEARCH */
.place-search-box {
  position: relative;
}

.place-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;

  z-index: 1000;

  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;

  box-shadow: 0 12px 30px rgba(0,0,0,0.12);

  overflow: hidden;
}

.place-results.hidden {
  display: none;
}

.place-result-row {
  display: block;
  width: 100%;
  text-align: left;

  padding: 12px 14px;

  border: none;
  background: white;

  cursor: pointer;
}

.place-result-row:hover {
  background: #f3f4f6;
}

.place-result-name {
  font-weight: 600;
}

.place-result-context {
  font-size: 13px;
  color: #6b7280;
  margin-top: 2px;
}

.footer-nav {
  z-index: 1000;
}