/* assets/css/captcha.css */

/* Modal styles */
.wplocap-container {
  position: relative;
  z-index: 100000;
  height: 100%;
}


.wplocap-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2147483647 !important;
  overflow-y: auto;
}

/* Specific WooCommerce checkout styles */
.woocommerce-checkout .wplocap-wrapper {
  margin-bottom: 20px;
}

.woocommerce-checkout .wplocap-modal-overlay {
  z-index: 999999;
}

/* Make sure the modal is on top of everything */
body > .wplocap-modal-overlay {
  position: fixed;
  z-index: 2147483647 !important;
}

.wplocap-modal {
  position: relative;
  z-index: 999999999 !important;
  background: #fff;
  width: 90%;
  max-width: 600px;
  margin: 20px auto;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wplocap-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: 50%;
  background: #f0f0f0;
  border: none;
}

.wplocap-modal-close:hover {
  background: #e0e0e0;
}

/* Grid styles */
.wplocap-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px auto;
}

.wplocap-challenge {
  font-size: 16px;
  font-weight: 600;
  color: #2c3338;
  text-align: center;
  margin: 0 0 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
}

.wplocap-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  justify-content: center;
}

.wplocap-cell {
  aspect-ratio: 1;
  border: 3px solid #dcdcde;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  background: #fff;
  overflow: hidden;
  position: relative;
}

.wplocap-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.wplocap-cell.selected {
  border-color: #00a32a;
  box-shadow: 0 0 0 2px #00a32a;
}

/* Buttons */
.wplocap-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #f0b429;
  border: 1px solid #000;
  color: #000;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
}

.wplocap-button:hover {
  background-color: #ffc107;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wplocap-verify {
  width: 100%;
  margin-top: 20px;
}

/* Loading spinner */
.wplocap-spinner {
  display: none;
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile optimizations */
@media (max-width: 480px) {
  .wplocap-modal {
    width: 95%;
    margin: 10px auto;
    padding: 15px;
  }

  .wplocap-row {
    gap: 10px;
  }

  .wplocap-challenge {
    font-size: 14px;
  }
}
