/* ================================
   WebKernelAI - Advanced Form Builder
   Default Frontend Styles
   ================================ */

   .wkaf-form {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Field wrapper */
  .wkaf-field {
    margin-bottom: 16px;
    box-sizing: border-box;
  }
  
  /* Labels */
  .wkaf-field > label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1d2327;
  }
  
  /* Required star */
  .wkaf-required {
    color: #d63638;
    margin-left: 3px;
  }
  
  /* Inputs */
  .wkaf-form input[type="text"],
  .wkaf-form input[type="email"],
  .wkaf-form input[type="number"],
  .wkaf-form input[type="date"],
  .wkaf-form input[type="file"],
  .wkaf-form textarea,
  .wkaf-form select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.4;
    color: #1d2327;
    background-color: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    box-sizing: border-box;
  }
  
  /* Textarea */
  .wkaf-form textarea {
    min-height: 100px;
    resize: vertical;
  }
  
  /* Focus state */
  .wkaf-form input:focus,
  .wkaf-form textarea:focus,
  .wkaf-form select:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
  }
  
  /* Choice fields (radio / checkbox / rating) */
  .wkaf-choice {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-weight: normal;
    cursor: pointer;
  }
  
  .wkaf-choice input {
    margin: 0;
  }
  
  /* Submit */
  .wkaf-submit {
    margin-top: 20px;
  }
  
  .wkaf-submit button {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  
  .wkaf-submit button:hover {
    background: #135e96;
  }
  
  /* Error state */
  .wkaf-field.has-error input,
  .wkaf-field.has-error textarea,
  .wkaf-field.has-error select {
    border-color: #d63638;
  }
  
  .wkaf-error {
    margin-top: 4px;
    font-size: 13px;
    color: #d63638;
  }
  
  /* Success message */
  .wkaf-success {
    padding: 12px;
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
    color: #1d2327;
    border-radius: 4px;
    font-size: 14px;
  }
  
  /* Mobile tweaks */
  @media (max-width: 600px) {
    .wkaf-form input,
    .wkaf-form textarea,
    .wkaf-form select {
      font-size: 16px; /* prevents mobile zoom */
    }
  }
  

  /* ================================
   Star Rating
   ================================ */

.wkaf-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
  }
  
  .wkaf-rating input {
    display: none;
  }
  
  .wkaf-rating label {
    font-size: 22px;
    color: #c3c4c7;
    cursor: pointer;
    line-height: 1;
  }
  
  /* Hover effect */
  .wkaf-rating label:hover,
  .wkaf-rating label:hover ~ label {
    color: #ffb900;
  }
  
  /* Checked state */
  .wkaf-rating input:checked ~ label {
    color: #ffb900;
  }
  

  /* ================================
   Submit Loading State
   ================================ */

.wkaf-submit button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
  }
  
  /* Spinner */
  .wkaf-submit button.wkaf-loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
    animation: wkaf-spin 0.8s linear infinite;
  }
  
  @keyframes wkaf-spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  .wkaf-hidden-field {
    display: none !important;
}