/**
 * Kreebi Forms - Admin Styles
 */

/* ============================================================
   AGGRESSIVE THEME CSS OVERRIDE - HIGHEST SPECIFICITY
   ============================================================ */

#krefrm-forms-container {
  all: revert;
  margin: 0;
  padding: 0;
}

#krefrm-forms-container,
#krefrm-forms-container * {
  box-shadow: none;
  text-shadow: none;
  text-decoration: none;
  transform: none;
  filter: none;
  backdrop-filter: none;
}

#krefrm-forms-container input,
#krefrm-forms-container button,
#krefrm-forms-container label,
#krefrm-forms-container textarea,
#krefrm-forms-container select {
  all: revert;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#krefrm-forms-container input::placeholder {
  opacity: 1;
}

#krefrm-forms-container input::-webkit-outer-spin-button,
#krefrm-forms-container input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#krefrm-forms-container input[type="number"] {
  -moz-appearance: textfield;
}

/* Submissions Page Styles */
.krefrm-submission-item {
  margin-bottom: 30px;
  padding: 15px;
  border: 1px solid #ddd;
  background: #fff;
}

.krefrm-submission-item h2 {
  margin-top: 0;
}

.krefrm-submission-table {
  width: 100%;
  border-collapse: collapse;
}

.krefrm-submission-table th,
.krefrm-submission-table td {
  padding: 8px;
  border: 1px solid #ddd;
  text-align: left;
}

.krefrm-submission-table tr:first-child {
  background: #f9f9f9;
}

/* Form Creation Page Styles */
.krefrm-json-example-details {
  margin-top: 12px;
}

.krefrm-json-example-summary {
  cursor: pointer;
  color: #2271b1;
  font-weight: 600;
}

.krefrm-json-example-pre {
  background: #f0f0f1;
  padding: 12px;
  margin-top: 8px;
  overflow-x: auto;
}

/* ─── Frontend Multi-Step Form Styles ─── */

.krefrm-frontend-form .krefrm-field {
  margin-bottom: 14px;
}

.krefrm-frontend-form .krefrm-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.krefrm-frontend-form .krefrm-field input {
  width: 100%;
  padding: 8px 10px;
  box-sizing: border-box;
}

/* Step progress indicator */
.krefrm-step-progress {
  margin-bottom: 12px;
  font-size: 13px;
  color: #666;
}

.krefrm-step-title {
  margin: 0 0 16px;
}

/* Navigation buttons */
.krefrm-step-nav {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #ddd;
}

.krefrm-step-nav button {
  padding: 8px 20px;
  cursor: pointer;
}

.krefrm-prev-btn {
  background: #f0f0f1;
  border: 1px solid #c3c4c7;
  color: #1d2327;
}

.krefrm-next-btn,
.krefrm-step-nav button[type="submit"] {
  background: #2271b1;
  border: 1px solid #2271b1;
  color: #fff;
}

/* ============================================================
   Frontend 12-Column Grid
   ============================================================ */

.krefrm-fields-flex {
  display: flex;
  flex-wrap: wrap;
}

/* each field is full-width by default */
.krefrm-field {
  flex: 0 0 100%;
  max-width: 100%;
}

/* Responsive: stack all to full-width on small screens */
@media (max-width: 600px) {
  .krefrm-col-6,
  .krefrm-col-8,
  .krefrm-col-4 {
    grid-column: span 12;
  }
}

/* ============================================================
   Style Template: kreebi_style_1  (Polished / Rounded)
   ============================================================ */

.krefrm-frontend-form.krefrm-ui-style-1-form,
.krefrm-frontend-form.krefrm-ui-style-2-form {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.krefrm-frontend-form.krefrm-ui-style-1-form input,
.krefrm-frontend-form.krefrm-ui-style-2-form input,
.krefrm-frontend-form.krefrm-ui-style-1-form button,
.krefrm-frontend-form.krefrm-ui-style-2-form button,
.krefrm-frontend-form.krefrm-ui-style-1-form label,
.krefrm-frontend-form.krefrm-ui-style-2-form label {
  margin: 0;
  font: inherit;
  line-height: normal;
  box-shadow: none;
}

.krefrm-ui-style-1-form {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.krefrm-ui-style-1-field {
  margin-bottom: 4px;
}

.krefrm-ui-style-1-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1d2327;
  margin-bottom: 6px;
}

.krefrm-ui-style-1-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #c3c4c7;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  box-sizing: border-box;
  color: #1d2327;
  appearance: none;
  -webkit-appearance: none;
}

.krefrm-ui-style-1-input:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
  outline: none;
}

.krefrm-ui-style-1-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #2271b1;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  text-transform: none;
  line-height: 1.3;
  text-decoration: none;
}

.krefrm-ui-style-1-btn:hover {
  background: #135e96;
}

/* ============================================================
   Style Template: kreebi_style_2  (Flat / Bordered)
   ============================================================ */

.krefrm-ui-style-2-form {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.krefrm-ui-style-2-field {
  margin-bottom: 4px;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  background: #fafafa;
}

.krefrm-ui-style-2-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #444;
  margin-bottom: 6px;
}

.krefrm-ui-style-2-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #bbb;
  border-radius: 3px;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
  color: #1d2327;
  appearance: none;
  -webkit-appearance: none;
}

.krefrm-ui-style-2-input:focus {
  border-color: #333;
  outline: none;
}

.krefrm-ui-style-2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: #333;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1.3;
  text-decoration: none;
}

.krefrm-ui-style-2-btn:hover {
  background: #555;
}
