/* =============================================
   webcam.css — ABSENKI Camera Styles
   ============================================= */

#webcam-app {
  width: 600px;
  height: auto;
  text-align: center;
  display: inline-block;
}

.webcam-container { position: relative; }

#background-container { height: 100vh; width: 100vw; }

#webcam {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  z-index: 999;
  pointer-events: none;
  margin: auto;
  border-radius: 16px;
}

#canvas {
  background-color: transparent;
  position: absolute;
  width: 100%;
  height: auto;
  z-index: 9999;
  margin: auto;
  top: 0; left: 0; right: 0;
  margin-left: auto;
  margin-right: auto;
  border-radius: 16px;
}

/* ---- Toggle Switch ---- */
.form-switch {
  display: inline-block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.form-switch i {
  position: relative;
  display: inline-block;
  margin-right: .5rem;
  width: 60px;
  height: 30px;
  background-color: #e6e6e6;
  border-radius: 25px;
  vertical-align: text-bottom;
  transition: all 0.3s linear;
}
.form-switch i::before {
  content: "";
  position: absolute;
  left: 0;
  width: 56px;
  height: 25px;
  background-color: #fff;
  border-radius: 15px;
  transform: translate3d(2px, 2px, 0) scale3d(1, 1, 1);
  transition: all 0.25s linear;
}
.form-switch i::after {
  content: "";
  position: absolute;
  left: 0;
  width: 26px;
  height: 26px;
  background-color: #fff;
  border: 1px solid grey;
  border-radius: 15px;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.25);
  transform: translate3d(2px, 2px, 0);
  transition: all 0.2s ease-in-out;
}
.form-switch:active i::after { width: 60px; transform: translate3d(2px, 2px, 0); }
.form-switch:active input:checked + i::after { transform: translate3d(16px, 2px, 0); }
.form-switch input { display: none; }
.form-switch input:checked + i { background-color: #4BD763; }
.form-switch input:checked + i::before { transform: translate3d(18px, 2px, 0) scale3d(0, 0, 0); }
.form-switch input:checked + i::after { transform: translate3d(30px, 2px, 0); }
.form-switch input:disabled + i { background-color: #eeeeee; cursor: not-allowed; }
.form-switch input:disabled + i::after { box-shadow: 0 2px 2px rgba(0, 0, 0, 0.10); }

/* ---- App Panel ---- */
.app-panel { text-align: center; }

/* ---- Modal Overlay ---- */
.md-overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  visibility: hidden;
  top: 0;
  left: 0;
  z-index: 1000;
  opacity: 0;
  background: rgba(228, 240, 227, 0.8);
  transition: all 0.3s;
}
.md-show ~ .md-overlay {
  opacity: 1;
  visibility: visible;
}
.md-effect-12 .md-content {
  opacity: 0;
  transition: all 0.3s;
}
.md-show.md-effect-12 ~ .md-overlay { background-color: #e4f0e3; }
.md-effect-12 .md-content h3, .md-effect-12 .md-content { background: transparent; }
.md-show.md-effect-12 .md-content {
  transform: scale(1);
  opacity: 1;
}

/* ---- Camera Controls ---- */
.cameraControls {
  position: absolute;
  left: 0;
  bottom: 30px;
  right: 0;
  margin-left: 0;
  margin-right: 0;
  z-index: 99999;
  background: transparent;
  opacity: 0.7;
  padding: 10px;
}
.cameraControls a {
  display: inline-block;
  margin: 5px;
  background: #333;
  border: solid 1px #555;
  color: #fff;
  height: 55px;
  width: 55px;
  font-size: 35px;
  line-height: 57px;
  border-radius: 50%;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.cameraControls a:hover {
  background: #5e72e4;
  border-color: #5e72e4;
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(94, 114, 228, 0.4);
}
.cameraFlip {
  display: block;
  position: absolute;
  margin: 5px;
  background: #333;
  color: #fff;
  height: 40px;
  width: 40px;
  margin-top: 15px;
  font-size: 30px;
  line-height: 50px;
  bottom: 50px;
  right: 20px;
  z-index: 999999;
  border-radius: 50%;
  transition: background 0.2s ease, transform 0.2s ease;
}
.cameraFlip:hover {
  background: #5e72e4;
  transform: scale(1.08);
}

/* ---- Flash Effect ---- */
.flash {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  z-index: 999999;
  animation: flash-anim 0.4s ease-out forwards;
}
@keyframes flash-anim {
  0%   { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

/* ---- Responsive ---- */
@media screen and (max-width: 420px) {
  .wallet-card-custom {
    padding: 0;
    position: absolute;
    right: 0;
    width: 100%;
  }
  .balance-custom {
    background: rgba(17, 17, 17, 0.28);
    display: flex;
    align-items: center;
    height: auto;
    z-index: 999999;
    float: right;
    position: fixed;
    right: -5px;
    padding: 5px 15px 5px 5px;
    color: #fff !important;
    border-radius: 5px;
  }
  .balance-custom h4, .balance-custom .title { color: #fff !important; font-size: 11px; }
  .form-control.webcam-start { width: 300px; }
  .app-panel { height: 100vh; width: 100vw; text-align: center; background-color: #000; }
  #webcam-app {
    margin: auto;
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
  }
  #webcam {
    display: block;
    position: relative;
    width: auto;
    height: 100vh;
    z-index: 999;
    pointer-events: none;
    margin: auto;
  }
  .cameraControls { bottom: 50px; }
  .cameraFlip { bottom: 70px; }
}

@media screen and (max-width: 767px) { /* intentional empty */ }
@media screen and (min-width: 420px) and (max-width: 767px) { /* intentional empty */ }
@media screen and (min-width: 1024px) { /* intentional empty */ }