.macoe-camera-button {
  width: 100%;
  max-width: 320px;
  border: 0;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 6px 0 8px;
  background: #0073aa;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.macoe-camera-button:active {
  transform: scale(0.99);
}

.macoe-entrega-file {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 6px 0 8px;
  padding: 12px;
  border: 1px solid #c9c9c9;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

.macoe-camera-status {
  display: block;
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.macoe-camera-status a {
  font-weight: 700;
  text-decoration: underline;
}

.macoe-status-ok {
  color: #147a2e;
  font-weight: 700;
}

.macoe-status-error {
  color: #b32d2e;
  font-weight: 700;
}

.macoe-camera-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
  padding: 12px;
}

.macoe-camera-modal-open {
  display: flex;
}

.macoe-camera-lock {
  overflow: hidden;
}

.macoe-camera-box {
  width: min(96vw, 520px);
  max-height: 96vh;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}

.macoe-camera-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e5e5;
}

.macoe-camera-close {
  border: 0;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.macoe-camera-stage {
  position: relative;
  width: 100%;
  background: #111;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

#macoe-camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.macoe-camera-guide {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;
  aspect-ratio: 210 / 297;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
}

.macoe-camera-guide span {
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 0 0 8px 8px;
  font-size: 13px;
}

.macoe-camera-preview-wrap {
  width: 100%;
  background: #111;
  text-align: center;
  max-height: 62vh;
  overflow: auto;
}

#macoe-camera-preview {
  display: block;
  width: 100%;
  height: auto;
}

.macoe-camera-feedback {
  min-height: 22px;
  padding: 10px 14px 0;
  font-size: 13px;
  color: #333;
}

.macoe-camera-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px 14px 14px;
}

.macoe-camera-actions button {
  border: 0;
  border-radius: 8px;
  padding: 13px 14px;
  font-weight: 700;
  cursor: pointer;
}

.macoe-camera-primary {
  background: #0073aa;
  color: #fff;
}

.macoe-camera-secondary {
  background: #e5e5e5;
  color: #111;
}

.macoe-camera-success {
  background: #147a2e;
  color: #fff;
}

.macoe-camera-success:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (min-width: 480px) {
  .macoe-camera-actions {
    grid-template-columns: 1fr 1fr;
  }

  .macoe-camera-success {
    grid-column: 1 / -1;
  }
}

.macoe-camera-quality {
  margin: 10px 14px 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.macoe-quality-ok {
  background: #e8f5ec;
  color: #145c2a;
  border: 1px solid #b8dfc3;
}

.macoe-quality-error {
  background: #fff0f0;
  color: #8a1f1f;
  border: 1px solid #f0b7b7;
}


.macoe-camera-box {
  overflow: auto;
}

.macoe-camera-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #ececec;
}

@media (max-width: 479px) {
  .macoe-camera-modal {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }

  .macoe-camera-box {
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }

  .macoe-camera-header {
    padding: 10px 12px;
  }

  .macoe-camera-stage {
    aspect-ratio: 3 / 3.7;
    max-height: 48vh;
  }

  .macoe-camera-guide {
    width: 68%;
  }

  .macoe-camera-guide span {
    font-size: 12px;
    padding: 5px 8px;
  }

  .macoe-camera-preview-wrap {
    max-height: 42vh;
  }

  .macoe-camera-feedback {
    padding: 8px 12px 0;
    font-size: 12px;
  }

  .macoe-camera-quality {
    margin: 8px 12px 0;
    padding: 9px 10px;
    font-size: 12px;
  }

  .macoe-camera-actions {
    gap: 6px;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  }

  .macoe-camera-actions button {
    padding: 12px 12px;
    font-size: 15px;
  }
}


/* Ajustes do formulário mobile Macoe/Contact Form 7 */
.wpcf7 form {
  max-width: 360px;
  margin: 0 auto;
}

.wpcf7 form p {
  margin: 0 0 8px !important;
}

.wpcf7 form br {
  display: none;
}

.wpcf7 form label {
  display: block;
  margin: 0 0 9px !important;
  color: #111;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}

.wpcf7 form .wpcf7-form-control-wrap {
  display: block;
  margin-top: 4px;
}

.wpcf7 form input[type="text"],
.wpcf7 form input[type="number"],
.wpcf7 form input[type="email"],
.wpcf7 form input[type="tel"],
.wpcf7 form input[type="url"],
.wpcf7 form input[type="date"],
.wpcf7 form select,
.wpcf7 form textarea,
.wpcf7 form input[type="file"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  margin: 0 !important;
  padding: 8px 10px !important;
  border: 1px solid #cfcfcf;
  border-radius: 0;
  background: #fff;
  color: #111;
  font-size: 16px !important;
  line-height: 1.3;
  -webkit-text-size-adjust: 100%;
}

.wpcf7 form textarea {
  min-height: 50px;
  resize: vertical;
}

.wpcf7 form select {
  height: 40px;
}

.wpcf7 form input:focus,
.wpcf7 form select:focus,
.wpcf7 form textarea:focus {
  outline: 2px solid rgba(0, 115, 170, 0.28);
  outline-offset: 1px;
  border-color: #0073aa;
}

.wpcf7 form .macoe-camera-button {
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  margin: 4px 0 12px !important;
  padding: 14px 16px;
  font-size: 16px !important;
  border-radius: 7px;
  touch-action: manipulation;
}

.wpcf7 form .macoe-entrega-file {
  width: 100%;
  max-width: 100%;
  min-height: 54px;
  margin: 4px 0 12px !important;
  padding: 10px 12px !important;
  border-radius: 7px;
  font-size: 16px !important;
}

.wpcf7 form .wpcf7-submit {
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  margin-top: 10px;
  padding: 12px 16px;
  border: 0;
  border-radius: 7px;
  background: #0073aa;
  color: #fff;
  font-size: 16px !important;
  font-weight: 700;
  touch-action: manipulation;
}

.wpcf7 form .wpcf7-response-output {
  margin: 12px 0 0 !important;
  padding: 8px 10px !important;
  font-size: 14px;
}

@media (max-width: 480px) {
  .wpcf7 form {
    max-width: 100%;
  }

  .wpcf7 form label {
    margin-bottom: 8px !important;
  }
}
