/* 
 * CONSOLIDATED SCRATCH CARD CSS
 * This file contains all styles for the scratch card functionality
 * Combining: scratch-card-new.css, mobile-footer-fix.css, and mobile-position-fix.css
 */

/* Custom Fonts */
@font-face {
  font-family: 'Sequel';
  src: url('../assets/Fonts/Fonts/Sequel_Demo.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'SequelWide';
  src: url('../assets/Fonts/Fonts/tmpsequel100wide-75 1.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Oswald';
  src: url('../assets/Fonts/Fonts/Oswald-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Oswald', Arial, sans-serif;
  background: url('../assets/images/desktop-bg.png') no-repeat center top;
  background-size: cover;
  background-attachment: scroll;
  min-height: 100vh;
  height: auto;
  display: flex;
  flex-direction: column;
  color: #000;
}

/* Layout */
.scratch-container_section {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  padding: 20px;
  min-height: 100%;
  overflow-y: auto;
}

.scratch-content {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 1200px;
  gap: 40px;
  position: relative;
  padding-bottom: 80px;
}

/* Left */
.scratch-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.scratch-artist img {
  max-width: 280px;
}

.scratch-artist-desk {
  display: block;
  max-width: 280px;
  margin-top: 20px;
}

.scratch-artist-mob {
  display: none;
}

.scratch-logo_section {
  margin: 8px 0 20px 0;
  text-align: center;
}

.scratch-logo-desk {
  display: block;
  max-width: 250px;
}

.scratch-logo-mob {
  display: none;
}

.scratch-present {
  text-align: center;
  margin-top: 10px;
}

.scratch-present h2 {
  font-size: 16px;
}

/* Right */
.scratch-right-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin-top: -20px;
}

.scratch-form-header {
  width: 100%;
  text-align: center;
  padding-top: 30px;
  padding-left: 0;
  padding-right: 0;
}

.scratch-form-header h2 {
  font-size: 60px;
  font-weight: 400;
  margin-bottom: 16px;
  line-height: 1.2;
  color: #211d1d;
  text-align: center;
}

.scratch-form-header h2.scratch-font-myriadpro {
  font-family: 'Oswald', Arial, sans-serif !important;
}

.scratch-form-header h2 br + span {
  display: block;
  text-align: center;
}

/* Custom Font Classes */
.scratch-font-myriadpro {
  font-family: 'Oswald', Arial, sans-serif;
}

.scratch-font-sequel {
  font-family: 'Oswald', Arial, sans-serif;
}

.scratch-font-sequel-wide {
  font-family: 'Oswald', Arial, sans-serif;
  font-weight: 600;
}

.scratch-form-header p {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 14px;
  text-align: center;
  background-color: #00ff00;
  width: 64%;
  padding: 5px;
  margin-left: 50px;
  margin-right: auto;
  margin-bottom: 13px;
}

/* Scratch Card Container */
.scratch-card-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 300px;
  margin: 0 auto;
  background: hsl(254, 100%, 49%);
  padding: 10px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.scratch-card-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
}

.scratch-card-result {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

#scratchCanvas {
  position: absolute;
  top: 10px;
  left: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  cursor: pointer;
  z-index: 5;
  border-radius: 6px;
}

.scratch-reveal-code {
  background-color: #ffeb00;
  color: #2412a3;
  font-weight: bold;
  padding: 15px 25px;
  border-radius: 8px;
  font-size: 18px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 2;
  max-width: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scratch-reveal-code #voucherCodeText {
  font-family: monospace;
  letter-spacing: 1px;
  margin-right: 5px;
  font-size: 20px;
  user-select: all;
  background-color: #ffffdd;
  padding: 5px 8px;
  border: 1px dashed #ccc;
  border-radius: 4px;
}

/* Copy button styles */
#copyVoucherBtn {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

#copyVoucherBtn:hover {
  background-color: #f0f0f0;
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

#copyVoucherBtn:active {
  background-color: #e0e0e0;
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Container for discount code with copy functionality */
.scratch-reveal-code div.visible {
  display: flex !important;
  opacity: 1 !important;
  transform: scale(1) !important;
  transition: transform 0.3s ease-out;
}

.scratch-tap-to-reveal {
  position: relative;
  display: block;
  margin: 15px auto 0;
  text-align: center;
  color: #000000;
  font-weight: bold;
  font-size: 30px;
  text-transform: uppercase;
  z-index: 6;
}

/* Confetti and Pop Animation Styles */
.scratch-confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.scratch-confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #ffeb00;
  opacity: 0;
  animation: confetti-fall 4s ease-out forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-10px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(300px) rotate(360deg);
    opacity: 0;
  }
}

.scratch-reveal-code.pop-animation {
  animation: pop-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  transform: scale(0);
}

@keyframes pop-in {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

/* Footer spanning section */
.scratch-footer-logo-1 {
  position: absolute;
  left: 24%;
  transform: translateX(-50%);
  bottom: 0;
  padding: 20px 0;
  z-index: 10;
}

.scratch-footer-logo-1 img {
  max-height: 50px;
  object-fit: contain;
}

.scratch-footer-logo-2 {
  position: absolute;
  left: 60%;
  transform: translateX(-50%);
  bottom: 0;
  padding: 20px 0;
  z-index: 10;
}

.scratch-footer-logo-2 img {
  max-height: 35px;
  object-fit: contain;
  margin-top: 20px;
}

.scratch-footer-logo-3 {
  position: absolute;
  left: 86%;
  transform: translateX(-50%);
  bottom: 0;
  padding: 20px 0;
  z-index: 10;
}

.scratch-footer-logo-3 img {
  max-height: 45px;
  object-fit: contain;
}

.scratch-footer-logo-4 {
  position: absolute;
  right: 0;
  bottom: -10px;
  z-index: 10;
  margin-right: -40px; /* Negative margin to push it further to the right */
}

.scratch-footer-logo-4 img {
  max-height: 40px;
  object-fit: contain;
}

/* Mobile footer */
.scratch-footer-mobile {
  display: none;
}

.scratch-footer-mobile-afrojack {
  display: none;
}

/* Responsive Design */

/* Tablet Only (768px to 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .scratch-container_section {
    padding: 25px;
  }
  
  .scratch-content {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding-bottom: 80px;
  }
  
  .scratch-left {
    order: 1;
  }
  
  .scratch-right-section {
    order: 2;
    margin-top: 0;
  }
  
  .scratch-form-header {
    text-align: left;
    padding-left: 30px;
    padding-right: 30px;
  }
  
  .scratch-form-header h2 {
    font-size: 28px;
    width: 100%;
  }
  
  .scratch-form-header p {
    width: 64%;
    margin-left: 40px;
    margin-right: auto;
  }
  
  .scratch-card-container {
    max-width: 400px;
    width: 90%;
    padding: 30px;
  }
  
  .scratch-left .scratch-artist img {
    max-width: 250px;
  }
  
  .scratch-artist-desk {
    max-width: 250px;
  }
  
  .scratch-logo-desk {
    max-width: 220px;
  }
  
  .scratch-footer-logo-1,
  .scratch-footer-logo-2,
  .scratch-footer-logo-3 {
    display: none;
  }
  
  /* Keep logo 4 visible even in mobile */
  .scratch-footer-logo-4 {
    position: absolute;
    right: 0;
    bottom: 0px;
    margin-right: -6px;
  }
  
  .scratch-footer-mobile-afrojack {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
  }
  
  .scratch-footer-mobile-afrojack img {
    max-height: 35px;
  }
  
  .scratch-footer-mobile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
  }
  
  .scratch-footer-mobile img {
    max-height: 35px;
  }
}

/* Mobile (480px to 767px) */
@media (min-width: 480px) and (max-width: 767px) {
  /* Core mobile styles */
  body {
    background: url('../assets/images/mobile-bg.png') no-repeat center top;
    background-size: 30em 80em;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  
  /* Adjust logo position for mobile screens */
  .scratch-footer-logo-4 {
    position: absolute;
    right: 0;
    bottom: -8px;
    margin-right: 0px;
    
  }
  
  .scratch-container_section {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  
  .scratch-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    padding-bottom: 20px;
  }
  
  .scratch-left {
    order: 1;
    margin-bottom: 10px;
  }
  
  .scratch-right-section {
    order: 2;
    margin-top: 0;
    margin-bottom: 20px;
  }
  
  /* Mobile images and logos */
  .scratch-left .scratch-artist img {
    max-width: 200px;
  }
  
  .scratch-artist-desk {
    display: none;
  }
  
  .scratch-artist-mob {
    display: block;
  }
  
  .scratch-logo-desk {
    display: none;
  }
  
  .scratch-logo-mob {
    display: block;
    max-width: 180px;
  }
  
  .scratch-present h2 {
    font-size: 14px;
  }
  
  /* Header styling */
  .scratch-form-header {
    text-align: center;
    padding-left: 0;
    padding-right: 0;
  }
  
  .scratch-form-header h2 {
    font-size: 24px;
    width: 100%;
    text-align: center;
  }
  
  .scratch-form-header p {
    font-size: 13px;
    width: 70%;
    padding: 4px;
  }
  
  /* Scratch card styling */
  .scratch-card-container {
    width: 95%;
    max-width: 350px;
    padding: 10px;
  }
  
  #scratchCanvas {
    top: 10px;
    left: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    border-radius: 6px;
  }
  
  /* Footer styling */
  .scratch-footer-logo-1,
  .scratch-footer-logo-2,
  .scratch-footer-logo-3 {
    display: none;
  }
  
  .scratch-footer-mobile-afrojack {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
  }
  
  .scratch-footer-mobile-afrojack img {
    max-height: 35px;
  }
  
  .scratch-footer-mobile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    order: 3;
    margin-top: auto;
    padding-top: 20px;
    padding-bottom: 20px;
    width: 100%;
  }
  
  .scratch-footer-mobile img {
    max-height: 35px;
  }
}

/* Small Mobile (320px to 479px) */
@media (max-width: 479px) {
  /* Adjust logo position for smallest screens */
  .scratch-footer-logo-4 {
    position: absolute;
    right: 0;
    bottom: -8px;
    margin-right: 0px;
  }
  /* Core small mobile styles */
  body {
    background: url('../assets/images/mobile-bg.png') no-repeat center top;
    background-size: 30em 80em;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  
  .scratch-container_section {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  
  .scratch-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
  }
  
  .scratch-left {
    order: 1;
    margin-bottom: 10px;
  }
  
  .scratch-right-section {
    order: 2;
    margin-top: 0;
    margin-bottom: 20px;
  }
  
  /* Small mobile images and logos */
  .scratch-left .scratch-artist img {
    max-width: 160px;
  }
  
  .scratch-artist-desk {
    display: none;
  }
  
  .scratch-artist-mob {
    display: block;
  }
  
  .scratch-logo-desk {
    display: none;
  }
  
  .scratch-logo-mob {
    display: block;
    max-width: 140px;
  }
  
  .scratch-present {
    margin-top: 8px;
  }
  
  .scratch-present h2 {
    font-size: 12px;
  }
  
  /* Header styling for small mobile */
  .scratch-form-header {
    padding-top: 20px;
    text-align: left;
    padding-left: 80px;
    padding-right: 80px;
  }
  
  .scratch-form-header h2 {
    font-size: 22px;
    line-height: 1.2;
    text-align: left;
    width: 100%;
  }
  
  .scratch-form-header p {
    font-size: 11px;
    width: 80%;
    padding: 3px;
    margin-bottom: 10px;
    margin-left: 25px;
    margin-right: auto;
  }
  
  /* Scratch card styling for small mobile */
  .scratch-card-container {
    width: 98%;
    max-width: 300px;
    padding: 8px;
  }
  
  #scratchCanvas {
    top: 8px;
    left: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    border-radius: 6px;
  }
  
  .scratch-reveal-code {
    font-size: 16px;
    padding: 10px 15px;
  }
  
  .scratch-tap-to-reveal {
    margin-top: 15px;
    font-size: 16px;
  }
  
  /* Footer styling for small mobile */
  .scratch-footer-logo-1,
  .scratch-footer-logo-2,
  .scratch-footer-logo-3 {
    display: none;
  }
  
  .scratch-footer-mobile-afrojack {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
  }
  
  .scratch-footer-mobile-afrojack img {
    max-height: 28px;
  }
  
  .scratch-footer-mobile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    order: 3;
    margin-top: auto;
    padding-top: 20px;
    padding-bottom: 20px;
    width: 100%;
  }
  
  .scratch-footer-mobile img {
    max-height: 28px;
  }
}
