/* Birthday custom overrides — loaded last */
html,
body {
  min-height: 100%;
}

body {
  background-color: #1b1717 !important;
  background-image: url('../images/golf80s-bg.jpg') !important;
  background-position: center center !important;
  background-size: cover !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
}

.container {
  position: relative;
  background: transparent !important;
}

.birthday-container header h1 span {
  color: #f6d38b;
}

.birthday-note {
  max-width: 560px;
  margin: 22px auto 0;
  padding: 14px 18px;
  color: #f7ead2;
  text-align: center;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(246,211,139,.35);
  border-radius: 12px;
  box-shadow: 0 14px 50px rgba(0,0,0,.25);
}

.birthday-note p {
  margin: 6px 0;
}

.birthday-note .small {
  color: #d9c9a7;
  font-size: 0.9em;
}

.attribution {
  color: rgba(255,255,255,.72);
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}

.attribution a {
  color: #f6d38b;
}

.birthday-container header h1,
.birthday-container header h1 span {
  color: #f6d38b !important;
}

/* Descendre les textes avant la cassette de 0cm */
.birthday-container header {
  margin-top: 0px !important;
}

/* Remonter le h2 */
.birthday-container header h2 {
  margin-top: -26px !important;
}

.birthday-container header h2 .invitation-title {
  display: inline-block;
  margin-top: 7px !important;
  margin-bottom: 0.2em !important;
  color: #fff !important;
  font-weight: 800;
  font-size: 1.48em !important;
  letter-spacing: 0.19em;
  text-shadow: 0 2px 7px rgba(0,0,0,.7), 0 0 2px rgba(0,0,0,.85) !important;
}

.birthday-container header h2 strong {
  display: inline-block;
  margin-top: -34px !important;
  color: #fff !important;
  text-shadow: 0 2px 7px rgba(0,0,0,.7), 0 0 2px rgba(0,0,0,.85) !important;
}

.birthday-container header h2 .event-location {
  display: none !important;
  margin-top: 10px;
  color: #fff !important;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 2px 5px rgba(0,0,0,.55);
}

/* Layout adjustment after removing visible attribution footer */
.vc-container {
  height: 470px;
  margin-bottom: 95px;
}

/* Remonter la cassette */
.vc-container {
  margin-top: -20px !important;
}

.vc-tape {
  margin-top: 10px;
}

/* Move bottom instruction frame upward */
.birthday-note {
  transform: translateY(-72px);
}

.birthday-note .confirm-presence {
  color: #fff !important;
  font-weight: 800;
  font-size: 1.16em;
  margin-top: 10px;
  text-shadow: 0 2px 5px rgba(0,0,0,.55);
}

/* Responsive layout */
html,
body {
  overflow-x: hidden;
}

.vc-tape {
  transform-origin: top center;
}

ul.vc-controls {
  left: 50% !important;
  margin-left: 0 !important;
  transform: translateX(-50%);
  max-width: calc(100vw - 28px);
}

@media (max-width: 700px) {
  .container {
    width: 100% !important;
    padding: 0 12px 120px !important;
    box-sizing: border-box;
  }

  .container > header {
    padding: 34px 0 6px !important;
  }

  .birthday-container header h1,
  .birthday-container header h1 span {
    font-size: clamp(25px, 7vw, 38px) !important;
    line-height: 1.05 !important;
    white-space: normal !important;
  }

  .container > header h2 {
    font-size: clamp(16px, 4.4vw, 22px) !important;
    line-height: 1.2 !important;
    padding: 0 10px;
  }

  .birthday-container header h2 .event-location {
    font-size: clamp(14px, 3.7vw, 18px) !important;
    line-height: 1.25;
  }

  .vc-container {
    width: 100%;
    height: 420px;
    margin-bottom: 60px;
  }

  .vc-tape-wrapper {
    width: 586px;
    margin-left: 50%;
    transform-origin: top center;
    transform: translateX(-50%) scale(.86);
  }

  .vc-tape {
    margin-top: 0;
  }

  ul.vc-controls {
    bottom: 38px;
    width: min(440px, calc(100vw - 28px));
    height: auto;
    display: flex !important;
    padding: 6px;
    box-sizing: border-box;
  }

  ul.vc-controls li,
  ul.vc-controls li.vc-control-play {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 44px;
    line-height: 48px;
    padding: 6px 4px;
    text-align: center;
    font-size: 9px;
  }

  ul.vc-controls li span:before {
    float: none;
    margin-right: 3px;
    line-height: 44px;
  }

  .vc-volume-wrap {
    display: none !important;
  }

  .birthday-note {
    width: calc(100vw - 34px);
    box-sizing: border-box;
    transform: translateY(-54px);
    font-size: 0.95em;
  }
}

@media (max-width: 560px) {
  .vc-container { height: 355px; }
  .vc-tape-wrapper { transform: translateX(-50%) scale(.72); }
  ul.vc-controls { bottom: 28px; }
}

@media (max-width: 430px) {
  .container > header { padding-top: 26px !important; }
  .vc-container { height: 315px; }
  .vc-tape-wrapper { transform: translateX(-50%) scale(.62); }
  ul.vc-controls { bottom: 24px; }
  ul.vc-controls li,
  ul.vc-controls li.vc-control-play {
    font-size: 8px;
    letter-spacing: 0;
  }
  .birthday-note {
    transform: translateY(-44px);
  }
}

@media (max-width: 380px) {
  .vc-container { height: 292px; }
  .vc-tape-wrapper { transform: translateX(-50%) scale(.56); }
}

/* Center header block and hide volume control */
.birthday-container header,
.birthday-container header h1,
.birthday-container header h2 {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.birthday-container header h2 .event-location {
  text-align: center !important;
}

.vc-volume-wrap {
  display: none !important;
}

/* Portrait/mobile header correction */
@media (max-width: 700px) and (orientation: portrait) {
  .container > header {
    margin: 0 auto !important;
    padding-top: clamp(70px, 12vh, 112px) !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    width: 100% !important;
    box-sizing: border-box;
    text-align: center !important;
  }

  .birthday-container header h1,
  .birthday-container header h1 span,
  .birthday-container header h2 {
    display: block;
    width: min(100%, 560px) !important;
    max-width: calc(100vw - 28px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  .birthday-container header h1,
  .birthday-container header h1 span {
    font-size: clamp(24px, 6.2vw, 34px) !important;
    line-height: 1.08 !important;
  }

  .container > header h2 {
    padding-top: 10px !important;
    font-size: clamp(15px, 4vw, 20px) !important;
    line-height: 1.22 !important;
  }

  .birthday-container header h2 .event-location {
    width: min(100%, 520px) !important;
    max-width: calc(100vw - 36px) !important;
    white-space: normal !important;
    overflow-wrap: normal;
    text-align: center !important;
    font-size: clamp(13px, 3.45vw, 17px) !important;
  }

  .vc-container {
    margin-top: 10px;
  }
}

/* Portrait composition tuning: title higher, more air, more wallpaper */
@media (max-width: 700px) and (orientation: portrait) {
  body {
    background-size: contain !important;
    background-position: center top !important;
    background-color: #efe0bf !important;
  }

  .container > header {
    padding-top: clamp(22px, 4vh, 42px) !important;
  }

  .birthday-container header h1 {
    display: none !important;
  }

  .container > header h2 {
    padding-top: 0 !important;
  }

  .vc-container {
    margin-top: 18px;
  }
}

/* Portrait readability: slight wallpaper zoom and clearer title zone */
@media (max-width: 700px) and (orientation: portrait) {
  body {
    background-size: auto 106vh !important;
    background-position: center top !important;
  }

  .birthday-container header h1,
  .birthday-container header h1 span {
    color: #f9d978 !important;
    text-shadow: 0 3px 8px rgba(0,0,0,.58), 0 0 2px rgba(0,0,0,.85) !important;
  }

  .birthday-container header h2 {
    text-shadow: 0 2px 7px rgba(0,0,0,.55), 0 0 2px rgba(0,0,0,.7) !important;
  }
}

/* Stronger portrait wallpaper framing for mobile Safari */
@media (max-width: 700px) and (orientation: portrait) {
  body {
    background-size: auto 50vh !important;
    background-position: center top !important;
    background-attachment: scroll !important;
  }
}

/* Dedicated portrait wallpaper */
@media (max-width: 700px) and (orientation: portrait) {
  body {
    background-image: url('../images/golf80s-bg-portrait-4.png') !important;
    background-size: cover !important;
    background-position: center top !important;
    background-attachment: scroll !important;
  }
}

/* Mobile portrait spacing requested from live review */
@media (max-width: 700px) and (orientation: portrait) {
  .container > header {
    padding-top: clamp(8px, 2vh, 24px) !important;
  }

  .birthday-container header h1 {
    margin-bottom: 1.15em !important;
  }

  .birthday-container header h2 .event-location {
    margin-bottom: 2.1em !important;
  }
}

.birthday-note .small {
  color: #fff !important;
  text-shadow: 0 2px 5px rgba(0,0,0,.55);
}

/* Mobile portrait invitation/date simplification */
@media (max-width: 700px) and (orientation: portrait) {
  .birthday-container header h2 .invitation-title,
  .birthday-container header h2 strong {
    color: #fff !important;
    text-shadow: 0 2px 7px rgba(0,0,0,.7), 0 0 2px rgba(0,0,0,.85) !important;
  }

  .birthday-container header h2 .invitation-title {
    display: inline-block;
    margin-bottom: 1em !important;
  }

  .birthday-container header h2 .event-location {
    display: none !important;
  }
}

.mobile-header-extra {
  display: block !important;
  color: #fff !important;
  font-weight: 800;
  font-size: 0.98em;
  line-height: 1.45;
  text-shadow: 0 2px 7px rgba(0,0,0,.7), 0 0 2px rgba(0,0,0,.85) !important;
}

.mobile-rsvp {
  display: inline-block;
  padding: 10px 16px;
  margin: 1.05em auto;
  color: #fff !important;
  background: rgba(0,0,0,.24);
  border: 1px solid rgba(246,211,139,.45);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(0,0,0,.24);
  font-weight: 900;
  font-size: 1.18em;
  line-height: 1.15;
  text-decoration: none;
}

@media (max-width: 700px) and (orientation: portrait) {
  .mobile-header-extra {
    display: block !important;
    color: #fff !important;
    font-weight: 800;
    font-size: 0.98em;
    line-height: 1.45;
    text-shadow: 0 2px 7px rgba(0,0,0,.7), 0 0 2px rgba(0,0,0,.85) !important;
  }
}

@media (max-width: 700px) and (orientation: portrait) {
  .mobile-rsvp {
    display: block;
    margin: 1.05em 0;
    color: #fff !important;
    font-weight: 900;
    font-size: 1.18em;
    line-height: 1.15;
    text-decoration: none;
  }

  .mobile-dress-code {
    display: block;
    color: #fff !important;
    font-weight: 700;
    font-size: 0.82em;
    line-height: 1.25;
  }
}

@media (max-width: 700px) and (orientation: portrait) {
  .mobile-rsvp {
    display: inline-block;
    padding: 10px 16px;
    margin: 1.05em auto;
    color: #fff !important;
    background: rgba(0,0,0,.24);
    border: 1px solid rgba(246,211,139,.45);
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(0,0,0,.24);
  }
}

/* Bottom area now carries only the dress code, without frame */
.dress-code-note {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 18px !important;
}

.dress-code-note .small {
  color: #fff !important;
  font-weight: 700;
  text-shadow: 0 2px 5px rgba(0,0,0,.65);
}

@media (max-width: 700px) and (orientation: portrait) {
  .mobile-rsvp {
    margin-top: 1.45em !important;
    margin-bottom: 1.45em !important;
  }
}

@media (max-width: 700px) and (orientation: portrait) {
  .mobile-rsvp {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }
}

.dress-code-note .small {
  font-size: 1.08em !important;
}

@media (max-width: 700px) and (orientation: portrait) {
  .dress-code-note .small {
    font-size: 1.02em !important;
  }
}

/* Keep bottom dress code above visually, but never over button hit targets */
ul.vc-controls {
  z-index: 30 !important;
}

.dress-code-note {
  transform: translateY(-96px) !important;
  pointer-events: none !important;
  position: relative;
  z-index: 1;
}

/* Dress code must remain visible above the controls without blocking taps */
.dress-code-note {
  z-index: 60 !important;
  pointer-events: none !important;
}

@media (max-width: 700px) and (orientation: portrait) {
  .dress-code-note {
    transform: translateY(-128px) !important;
  }
}

/* Move dress code clearly above controls; keep controls tap-safe */
@media (max-width: 700px) and (orientation: portrait) {
  .dress-code-note {
    transform: translateY(-176px) !important;
    z-index: 10 !important;
    pointer-events: none !important;
  }

  ul.vc-controls,
  ul.vc-controls li {
    position: relative;
    z-index: 80 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

/* Restore safe controls layout: controls first, dress code below */
@media (max-width: 700px) and (orientation: portrait) {
  ul.vc-controls {
    position: absolute !important;
    z-index: 30 !important;
    pointer-events: auto !important;
  }

  ul.vc-controls li {
    position: static !important;
    z-index: auto !important;
    pointer-events: auto !important;
  }

  .dress-code-note {
    transform: none !important;
    margin-top: 10px !important;
    pointer-events: none !important;
    z-index: 1 !important;
  }
}

.dress-code-note .bottom-location {
  color: #fff !important;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 8px;
  text-shadow: 0 2px 5px rgba(0,0,0,.65);
}

@media (max-width: 700px) and (orientation: portrait) {
  .dress-code-note .bottom-location {
    font-size: 0.96em !important;
  }
}

/* Nudge bottom location/dress-code text upward, safely below controls */
@media (max-width: 700px) and (orientation: portrait) {
  .dress-code-note {
    transform: translateY(-56px) !important;
    margin-bottom: -56px !important;
    pointer-events: none !important;
  }
}

/* Bottom text contrast adjustment */
.dress-code-note .bottom-location,
.dress-code-note .small {
  color: #111 !important;
  text-shadow: none !important;
}

.dress-code-note .small {
  margin-top: 1.15em !important;
}

/* Restore readable bottom text */
.dress-code-note .bottom-location,
.dress-code-note .small {
  color: #fff !important;
  text-shadow: 0 2px 6px rgba(0,0,0,.85), 0 0 2px rgba(0,0,0,.9) !important;
}

.dress-code-note .bottom-location {
  font-size: 1.12em !important;
}

.dress-code-note .small {
  font-size: 1.18em !important;
}

@media (max-width: 700px) and (orientation: portrait) {
  .dress-code-note .bottom-location {
    font-size: 1.08em !important;
  }

  .dress-code-note .small {
    font-size: 1.13em !important;
  }
}

/* Larger INVITATION label in mobile portrait */
@media (max-width: 700px) and (orientation: portrait) {
  .birthday-container header h2 .invitation-title {
    font-size: 1.28em !important;
    letter-spacing: 0.18em !important;
  }
}

/* Bigger INVITATION label in mobile portrait */
@media (max-width: 700px) and (orientation: portrait) {
  .birthday-container header h2 .invitation-title {
    font-size: 1.48em !important;
    letter-spacing: 0.19em !important;
  }
}

/* Fix INVITATION position in mobile portrait */
@media (max-width: 700px) and (orientation: portrait) {
  .birthday-container header h2 .invitation-title {
    position: relative;
    top: 9px;
  }
}

/* Remonter cassette et contenu en portrait */
@media (max-width: 700px) and (orientation: portrait) {
  .vc-container {
    transform: translateY(-30px);
    margin-bottom: 52px !important;
  }
}

/* Lift date slightly in mobile portrait */
@media (max-width: 700px) and (orientation: portrait) {
  .birthday-container header h2 strong {
    position: relative;
    top: -5px;
  }
}

/* Lift bottom location/dress code slightly in mobile portrait */
@media (max-width: 700px) and (orientation: portrait) {
  .dress-code-note {
    transform: translateY(-68px) !important;
    margin-bottom: -68px !important;
  }
}

/* Slightly larger bottom texts in mobile portrait */
@media (max-width: 700px) and (orientation: portrait) {
  .dress-code-note .bottom-location {
    font-size: 1.16em !important;
  }

  .dress-code-note .small {
    font-size: 1.21em !important;
  }
}

/* Lift only the dress-code line a touch */
@media (max-width: 700px) and (orientation: portrait) {
  .dress-code-note .small {
    position: relative;
    top: -6px;
  }
}

/* Lift dress-code line a little more */
@media (max-width: 700px) and (orientation: portrait) {
  .dress-code-note .small {
    top: -12px !important;
  }
}

/* Textes avant la cassette en portrait */
@media (max-width: 700px) and (orientation: portrait) {
  .container > header {
    padding-top: 94px !important;
  }
}

/* Hide h1 title in portrait - must be last to override all previous rules */
@media (max-width: 700px) and (orientation: portrait) {
  .birthday-container header h1,
  .birthday-container header h1 span {
    display: none !important;
  }
}
