/*
Theme Name: Magnifica v1.0
Theme URI: http://www.ansonika.com/magnifica/
Author: Ansonika
Author URI: http://themeforest.net/user/Ansonika/

Table of contents:
1) Preloader
2) Wizard
3) Common / Validation
4) Form Controls (Checkbox/Radio)
5) Float Labels (Original)
6) Custom UI (Camera + Header)
7) Override: Label selalu di atas input
*/

/* =========================================================
   1) PRELOADER
   ========================================================= */
#preloader,
#loader_form {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
}

#preloader { background: #fff; }

#loader_form {
  background: rgba(255, 255, 255, 0.6);
  display: none;
}

[data-loader="circle-side"],
[data-loader="circle-side-2"] {
  position: absolute;
  width: 50px;
  height: 50px;
  top: 50%;
  left: 50%;
  margin-left: -25px;
  margin-top: -25px;
  border: 2px solid #333;
  border-top-color: rgba(0,0,0,.2);
  border-right-color: rgba(0,0,0,.2);
  border-bottom-color: rgba(0,0,0,.2);
  border-radius: 50%;
  animation: circle .95s linear infinite;
}

@keyframes circle {
  0%   { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}

/* =========================================================
   2) WIZARD
   ========================================================= */
#form_container {
  background: #fff;
  width: 100%;
  min-height: 460px;
  box-shadow: 0 0 30px rgba(0,0,0,.1);
}

#left_form {
  background: #2955a9;
  min-height: 460px;
  color: #fff;
  text-align: center;
  padding: 90px 30px 30px;
  box-sizing: border-box;
  position: relative;
  height: 100%;
}

#left_form h2 {
  font-weight: 500;
  color: #fff;
  font-size: 32px;
  margin: 10px 0 25px;
}

#left_form h2 span {
  display: block;
  font-size: 20px;
}

#left_form p {
  font-size: 16px;
  margin-bottom: 30px;
}

@media (max-width: 991px) {
  #left_form { padding: 30px; min-height: inherit; }
}

a.purchase { display: inline-block; }
@media (max-width: 767px) {
  a.purchase { display: none; }
}

a.mobile_btn { display: none; }
@media (max-width: 767px) {
  a.mobile_btn { margin: 5px 0 30px; display: inline-block; }
}

a#more_info {
  width: 26px;
  height: 26px;
  color: #fff;
  position: absolute;
  left: 15px;
  bottom: 15px;
  z-index: 2;
  font-size: 26px;
  line-height: 1;
}

input#website { display: none; }

#wizard_container {
  padding: 60px;
  box-shadow: 0 0 30px rgba(0,0,0,.1);
  position: relative;
  background: #fff;
}

@media (max-width: 767px) {
  #wizard_container { padding: 30px; }
}

#middle-wizard {
  width: 800px;
  min-height: 420px;
  display: flex;
  margin: auto;
}

#middle-wizard .step { width: 100%; }

@media (max-width: 767px) {
  #middle-wizard { width: 100%; min-height: inherit; }
}

/* Wizard buttons */
button.backward,
button.forward,
button.submit {
  border: none;
  cursor: pointer;
  outline: none;
  text-align: center;
  font-weight: 600;
  line-height: 1;
  padding: 12px 30px;
  border-radius: 3px;
  color: #fff;
  background: #00A4DE;
  transition: background .5s ease;
}

button.backward {
  color: #777;
  background: #e8e8e8;
}

button[disabled] { display: none; }

button.backward:hover,
button.forward:hover {
  background: #0f293b;
  color: #fff;
}

/* Progress */
#top-wizard {
  margin: -60px -60px 0;
  width: 100%;
}

@media (max-width: 767px) {
  #top-wizard { margin: -30px -30px 0; }
}

#bottom-wizard { text-align: center; }

@media (max-width: 767px) {
  #bottom-wizard { margin-top: 25px; }
}

.ui-widget-content { background: transparent; }
.ui-widget-header  { background: #6C3; }

.ui-progressbar { height: 8px; width: 100%; }
#progressbar { overflow: hidden; }

.ui-progressbar .ui-progressbar-value {
  height: 100%;
  transition: all .2s ease;
}

#location {
  font-size: 14px;
  padding: 15px;
  display: inline-block;
}

/* =========================================================
   3) COMMON / VALIDATION
   ========================================================= */
.modal-content {
  border: none;
  border-radius: 0;
  box-shadow: 0 0 20px rgba(0,0,0,.3);
}

/* Error tooltip */
span.error {
  font-size: 12px;
  position: absolute;
  top: -20px;
  right: -15px;
  z-index: 2;
  height: 25px;
  padding: 6px 8px;
  line-height: 1;
  border-radius: 3px;
  background: #e34f4f;
  color: #fff;
  transition: all .3s ease-in-out;
}

span.error:after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 20%;
  border-style: solid;
  border-width: 0 6px 6px 0;
  border-color: transparent #e34f4f;
}

/* Error position variants */
.container_radio.version_2 .error,
.container_check.version_2 .error,
.radio_input .error {
  left: -15px;
  top: -30px;
  right: auto;
}

.styled-select span.error { top: -20px; }
.terms span.error { top: -30px; left: -15px; right: auto; }

/* =========================================================
   4) CHECKBOX / RADIO
   ========================================================= */
.container_check,
.container_radio {
  display: block;
  position: relative;
  padding-left: 30px;
  line-height: 1.3;
  margin-bottom: 10px;
  cursor: pointer;
  user-select: none;
  font-weight: 400;
}

.container_check input,
.container_radio input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Checkbox */
.container_check .checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 3px;
  transition: all .3s ease-in-out;
}

.container_check input:checked ~ .checkmark {
  background: #2955a9;
  border-color: transparent;
}

.container_check .checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.container_check input:checked ~ .checkmark:after { display: block; }

/* Checkbox version_2 */
.container_check.version_2 {
  padding: 13px 15px 13px 45px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #fff;
  min-height: 30px;
}

.container_check.version_2 .checkmark {
  height: 24px;
  width: 24px;
  top: 10px;
  left: 10px;
}

/* Radio */
.container_radio .checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 50%;
}

.container_radio .checkmark:after {
  content: "";
  position: absolute;
  opacity: 0;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2955a9;
  transition: all .3s ease-in-out;
}

.container_radio input:checked ~ .checkmark:after { opacity: 1; }

/* Radio version_2 */
.container_radio.version_2 {
  padding: 13px 15px 13px 45px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #fff;
  min-height: 30px;
}

.container_radio.version_2 .checkmark {
  top: 10px;
  left: 10px;
  height: 24px;
  width: 24px;
  border: 1px solid #ddd;
}

.container_radio.version_2.active,
.container_radio.version_2:hover,
.container_check.version_2.active,
.container_check.version_2:hover {
  border-color: #2955a9;
}

.radio_input .container_radio {
  display: inline-block;
  margin: 15px 0 0;
}

/* =========================================================
   5) FLOAT LABELS (ORIGINAL THEME)
   (biarkan original; override ada di bagian 7)
   ========================================================= */
.fl-form .fl-wrap {
  position: relative;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.fl-form input.fl-input,
.fl-form select.fl-select,
.fl-form textarea.fl-textarea {
  width: 100%;
  outline: 0;
  font-size: 14px;
  line-height: 1.4;
  border-radius: 3px;
  border: 1px solid none;
  background: #fff;
  box-sizing: border-box;
  transition: all .3s ease-in-out;
  margin-bottom: 0;
}



/* =========================================================
   6) CUSTOM UI
   ========================================================= */
/* Gambar contoh */
.center {
  display: block;
  margin: 0 auto;
  width: 80%;
}

/* Kamera */
#cameraContainer {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  aspect-ratio: 3/4;
}

#cameraContainer video {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  background: #000;
}

/* Frame panduan */
#frameBox {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 65%;
  border: 3px dashed red;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255,0,0,.3);
  pointer-events: none;
}

#canvas,
#snapshot {
  display: block;
  margin: 15px auto 0;
  width: 100%;
  max-width: 480px;
  height: auto;
}

.btn-inline > button { margin: 6px 8px 0 0; }

pre#diag {
  white-space: pre-wrap;
  font-size: 12px;
  color: #444;
  background: #f7f7f7;
  padding: 8px;
  border-radius: 6px;
}

/* Mobile camera tweaks */
@media (max-width: 767px) {
  #cameraContainer { max-width: 100%; }
  #frameBox { border-width: 2px; }
  #canvas, #snapshot { max-width: 100%; }
}

@media (max-width: 360px) {
  #frameBox {
    top: 8%;
    left: 8%;
    width: 84%;
    height: 64%;
  }
}

/* Header */
.cdds-header {
  margin: 8px auto 22px;
  padding: 8px 10px;
  text-align: center;
  font-size: clamp(18px, 2.1vw, 28px);
  font-weight: 900;
  letter-spacing: .5px;
  text-transform: uppercase;
  background: transparent;
  position: relative;
  line-height: 1.25;
}

.cdds-header--underline::after {
  content: "";
  display: block;
  width: min(820px, 85%);
  height: 4px;
  margin: 10px auto 0;
  background: #3b82f6;
  border-radius: 3px;
}

.cdds-header--textline {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
  padding: 10px;
}




