/* ================================
   WebKernelAI - Advanced Form Builder
   Default Frontend Styles
   ================================ */

    .wkaf-form {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    gap: 20px 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  }
  
  /* Field wrapper with layout widths */
  .wkaf-field {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }

  .wkaf-width-100 { width: 100%; flex: 0 0 100%; }
  .wkaf-width-50  { width: calc(50% - 8px); flex: 0 0 calc(50% - 8px); }
  .wkaf-width-33  { width: calc(33.333% - 10.666px); flex: 0 0 calc(33.333% - 10.666px); }
  .wkaf-width-25  { width: calc(25% - 12px); flex: 0 0 calc(25% - 12px); }

  @media (max-width: 768px) {
    .wkaf-width-50, .wkaf-width-33, .wkaf-width-25 {
      width: 100%;
    }
  }
  
  /* Labels */
  .wkaf-field > label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2c3e50;
    transition: color 0.2s ease;
  }
  
  /* Required star */
  .wkaf-required {
    color: #e74c3c;
    margin-left: 3px;
  }
  
  /* Inputs */
  .wkaf-form input[type="text"],
  .wkaf-form input[type="email"],
  .wkaf-form input[type="tel"],
  .wkaf-form input[type="number"],
  .wkaf-form input[type="date"],
  .wkaf-form input[type="file"],
  .wkaf-form textarea,
  .wkaf-form select {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    line-height: 1.5;
    color: #2c3e50;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
  }
  
  /* Textarea */
  .wkaf-form textarea {
    min-height: 110px;
    resize: vertical;
  }
  
  /* Focus state */
  .wkaf-form input:focus,
  .wkaf-form textarea:focus,
  .wkaf-form select:focus {
    border-color: #6366f1;
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  }
  
  /* Description tag */
  .wkaf-field-description {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.4;
  }

  /* Choice fields (radio / checkbox) */
  .wkaf-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    user-select: none;
  }
  
  .wkaf-choice input {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
    cursor: pointer;
  }

  .wkaf-checkbox-group,
  .wkaf-radio-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
  }
  
  /* Submit */
  .wkaf-submit {
    margin-top: 10px;
    width: 100%;
  }
  
  .wkaf-submit button {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2), 0 2px 4px -2px rgba(99, 102, 241, 0.1);
    transition: all 0.2s ease;
  }
  
  .wkaf-submit button:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
  }

  .wkaf-submit button:active {
    transform: translateY(0);
  }
  
  /* Error state */
  .wkaf-field.has-error input,
  .wkaf-field.has-error textarea,
  .wkaf-field.has-error select {
    border-color: #ef4444;
    background-color: #fef2f2;
  }

  .wkaf-field.has-error input:focus,
  .wkaf-field.has-error textarea:focus,
  .wkaf-field.has-error select:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
  }
  
  .wkaf-error {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #ef4444;
  }
  
  /* Success message */
  .wkaf-success {
    width: 100%;
    padding: 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 6px -1px rgba(167, 243, 208, 0.2);
  }
  
  /* Mobile tweaks */
  @media (max-width: 600px) {
    .wkaf-form input,
    .wkaf-form textarea,
    .wkaf-form select {
      font-size: 16px;
    }
  }
  

  /* ================================
   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;
}