/* Photo/name editor screen: card preview with editable fields. */

/* Desktop title + subtitle. They sit above the card, which is shifted down
   (top:80 -> 146) along with the hint and .br-action-stack (index.php) to
   keep the whole screen inside the 850px stage. */
.br-title-nhap-thong-tin {
  top: 16px;
  width: 680px;
  height: 65px;
  background: url("../../images/title-nhap-thong-tin.png") center / contain no-repeat;
}
.br-photo-subtitle {
  position: absolute;
  left: 50%;
  top: 92px;
  transform: translateX(-50%);
  width: 566px;
  margin: 0;
  font-family: "Maison Neue Extended", "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: 24px;
  line-height: 120%;
  text-align: center;
  letter-spacing: 0.01em;
  color: #0070ff;
  /* The Figma "border: 1px solid #fff" on the text = a 1px white outline for
     contrast against the busy background, same idiom as .br-field-name. */
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
  pointer-events: none;
}

.br-card-editor {
  position: absolute;
  left: 50%;
  top: 146px;
  transform: translateX(-50%);
  width: 390px;
  height: 520px;
  border-radius: 26px;
  /* The card artwork is a plain rectangle now (no baked-in rounded corners),
     so clip it to this same border-radius. */
  overflow: hidden;
  /* outline (not border) - the photo slot/name/slogan fields below are
     positioned in pixels tuned against this box's unpadded edges, so a real
     border would shrink the box and shift every field out of alignment.
     outline-offset pulls the ring inward without touching the box model. */
  outline: 1px solid transparent;
  outline-offset: -1px;
  filter: drop-shadow(0px 0px 6.27219px rgba(0, 49, 197, 0.3));
}
#screen-photo[data-color="pink"]   .br-card-editor { outline-color: #FF81C7; }
#screen-photo[data-color="orange"] .br-card-editor { outline-color: #F19646; }
#screen-photo[data-color="green"]  .br-card-editor { outline-color: #00B231; }
#screen-photo[data-color="purple"] .br-card-editor { outline-color: #7B50FF; }
#screen-photo[data-color="blue"]   .br-card-editor { outline-color: #1A92F8; }
.br-card-editor .br-field-name,
.br-card-editor .br-field-slogan {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: text;
  background: transparent;
  border: 0;
  text-align: center;
  outline: none;
  font-family: inherit;
  width: 60%;
}
.br-card-editor .br-field-name {
  top: 28px;
  font-size: 26px;
  color: #007521;
  font-family: "Dearpix", "Press Start 2P", monospace;
  text-transform: uppercase;
  text-shadow: -1px -1px 0 #fff, 0 -1px 0 #fff, 1px -1px 0 #fff, -1px 0 0 #fff, 1px 0 0 #fff, -1px 1px 0 #fff, 0 1px 0 #fff, 1px 1px 0 #fff, 0 2px 4px rgba(0,0,0,0.35);
}
.br-card-editor .br-field-name::placeholder {
  color: inherit;
  text-shadow: inherit;
  opacity: 1;
}
.br-card-editor .br-field-name:focus::placeholder {
  opacity: 0;
}
.br-card-editor .br-field-slogan {
  bottom: 77px;
  left: 90px;
  right: 90px;
  transform: none;
  width: auto;
  font-size: 14px;
  color: #006622;
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff, 0 2px 4px rgba(0,0,0,0.35);
  cursor: pointer;
  padding: 0;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.35;
  height: 4.05em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  -webkit-box-pack: center;
}
.br-card-editor .br-field-slogan:empty::before {
  content: "Nhấn để điền slogan";
  text-transform: uppercase;
  font-size: 14px;
}

.br-card-editor .br-photo-slot {
  position: absolute;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
}
.br-card-editor .br-photo-slot .br-icon {
  width: 44px;
  height: 44px;
  background: url("../../images/icon-image-placeholder.svg") center / contain no-repeat;
  opacity: 0.5;
}
.br-card-editor .br-photo-slot img.br-photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.br-photo-hint {
  position: absolute;
  left: 50%;
  top: 672px;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  width: auto;
  max-width: 90%;
  padding: 6px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 3px 10px rgba(0, 49, 197, 0.18);
  font-size: 11px;
  font-weight: 700;
  color: #a15c00;
  white-space: nowrap;
  transition: color .15s ease, background-color .15s ease;
}
.br-photo-hint-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.br-photo-hint-row::before {
  content: "";
  flex: 0 0 auto;
  width: 11px;
  height: 14px;
  background-color: currentColor;
}
.br-photo-hint-row--image::before,
.br-photo-hint-row--warning::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2015'%3E%3Crect%20x='0.8'%20y='0.8'%20width='10.4'%20height='13.4'%20rx='2.4'%20fill='none'%20stroke='black'%20stroke-width='1.4'/%3E%3Ccircle%20cx='4'%20cy='4.6'%20r='1.1'%20fill='black'/%3E%3Cpath%20d='M1.6%2011.2l2.6-3%201.8%201.8%202.2-2.6%202.2%203'%20fill='none'%20stroke='black'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2015'%3E%3Crect%20x='0.8'%20y='0.8'%20width='10.4'%20height='13.4'%20rx='2.4'%20fill='none'%20stroke='black'%20stroke-width='1.4'/%3E%3Ccircle%20cx='4'%20cy='4.6'%20r='1.1'%20fill='black'/%3E%3Cpath%20d='M1.6%2011.2l2.6-3%201.8%201.8%202.2-2.6%202.2%203'%20fill='none'%20stroke='black'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.br-photo-hint-row--text::before {
  width: 14px;
  height: 11px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2014%2011'%3E%3Cpath%20d='M1%201h12M1%205.5h8M1%2010h10'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2014%2011'%3E%3Cpath%20d='M1%201h12M1%205.5h8M1%2010h10'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.br-photo-hint.br-is-warning {
  color: #c0392b;
  background: rgba(255, 255, 255, 0.95);
}

@media (max-width: 720px) {
  .br-title-nhap-thong-tin-mobile {
    width: 300px;
    max-width: 84%;
    aspect-ratio: 401 / 122;
    margin: 20px auto 0;
    background-image: url("../../images/title-nhap-thong-tin-mobile.png");
  }
  .br-photo-subtitle {
    position: static;
    left: auto;
    transform: none;
    width: auto;
    max-width: 90%;
    margin: 8px auto 0;
    font-size: 14px;
    line-height: 1.3;
  }
  .br-card-editor {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 280px;
    height: 372px;
    margin: 24px auto 0;
    border-radius: 19px;
  }
  .br-card-editor .br-field-name   { top: 20px; font-size: 19px; }
  .br-card-editor .br-field-slogan { bottom: 52px; left: 65px; right: 65px; font-size: 11px; }
  .br-card-editor .br-field-slogan:empty::before { font-size: 8px; }
  .br-photo-hint {
    position: static;
    top: auto;
    transform: none;
    display: flex;
    align-items: center;
    width: auto;
    max-width: 280px;
    margin: 14px auto 0;
    white-space: normal;
    text-align: center;
  }
}
