/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

 /* Modern Professional Form Styles */
 
.ssp-form-fields {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  color: #333333;
  max-width: 100%;
}

/* Field Wrapper */
.ssp-form-fields .field-wrapper {
  position: relative;
}

/* Label Styles */
.ssp-form-fields .ssp-label-wrapper {
  margin-bottom: 8px;
}

.ssp-form-fields .ssp-input-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
  line-height: 20px;
}

/* Base Input Styles */
.ssp-form-fields .input-field,
.ssp-form-fields .small-input-field,
.ssp-form-fields .title-field,
.ssp-form-fields .number-input,
.ssp-form-fields .small-number-input,
.ssp-form-fields .textarea-field,
.ssp-form-fields .select-field,
.ssp-form-fields .ssp-input,
.ssp-form-fields .ssp-color-picker {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  color: #333333;
  background-color: #ffffff;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
  height: 44px;
  line-height: 20px;
}

.ssp-form-fields .input-field:focus,
.ssp-form-fields .small-input-field:focus,
.ssp-form-fields .title-field:focus,
.ssp-form-fields .number-input:focus,
.ssp-form-fields .small-number-input:focus,
.ssp-form-fields .textarea-field:focus,
.ssp-form-fields .select-field:focus,
.ssp-form-fields .ssp-input:focus,
.ssp-form-fields .ssp-color-picker:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ssp-form-fields .input-field:hover,
.ssp-form-fields .small-input-field:hover,
.ssp-form-fields .title-field:hover,
.ssp-form-fields .number-input:hover,
.ssp-form-fields .small-number-input:hover,
.ssp-form-fields .textarea-field:hover,
.ssp-form-fields .select-field:hover,
.ssp-form-fields .ssp-input:hover,
.ssp-form-fields .ssp-color-picker:hover {
  border-color: #9ca3af;
}

/* Small Input Variations */
.ssp-form-fields .small-input-field,
.ssp-form-fields .small-number-input {
  padding: 8px 12px;
  font-size: 13px;
  height: 36px;
}

/* Textarea Specific */
.ssp-form-fields .textarea-field {
  resize: vertical;
  min-height: 100px;
  height: auto;
  padding-top: 12px;
  padding-bottom: 12px;
  line-height: 1.5;
}

/* Select Dropdown */
.ssp-form-fields .js-select2-wrapper {
  position: relative;
}

.ssp-form-fields .select-field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  padding-right: 40px;
}

/* Radio Buttons */
.ssp-form-fields .radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ssp-form-fields .radio-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  min-height: 20px;
}

.ssp-form-fields .radio-item input[type="radio"] {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
}

.ssp-form-fields .radio-custom {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  margin-right: 12px;
  position: relative;
  background-color: #ffffff;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ssp-form-fields .radio-item:hover .radio-custom {
  border-color: #9ca3af;
}

.ssp-form-fields .radio-item input[type="radio"]:checked + .radio-custom {
  border-color: #2563eb;
  background-color: #2563eb;
}

.ssp-form-fields .radio-item input[type="radio"]:checked + .radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background-color: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ssp-form-fields .radio-label {
  font-size: 14px;
  color: #333333;
  font-weight: 400;
  line-height: 20px;
}

/* Checkbox Styles */
.ssp-form-fields .ssp-checkbox-list-v2 {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ssp-form-fields .ssp-checkbox-container {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  position: relative;
  min-height: 20px;
}

.ssp-form-fields .ssp-checkbox-input {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
}

.ssp-form-fields .ssp-checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  margin-right: 12px;
  position: relative;
  background-color: #ffffff;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 1px;
}

.ssp-form-fields .ssp-checkbox-container:hover .ssp-checkbox-custom {
  border-color: #9ca3af;
}

.ssp-form-fields .ssp-checkbox-input:checked + .ssp-checkbox-custom {
  border-color: #2563eb;
  background-color: #2563eb;
}

.ssp-form-fields .ssp-checkbox-input:checked + .ssp-checkbox-custom::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 4px;
  width: 6px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ssp-form-fields .ssp-checkbox-label {
  font-size: 14px;
  color: #333333;
  font-weight: 400;
  line-height: 20px;
  flex: 1;
}

.ssp-form-fields .ssp-checkbox-label p {
  margin: 0;
  padding: 0;
}

/* Switch Styles */
.ssp-form-fields .ssp-switch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  min-height: 44px;
}

.ssp-form-fields .ssp-switch-label {
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  line-height: 20px;
}

.ssp-form-fields .ssp-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
}

.ssp-form-fields .ssp-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ssp-form-fields .ssp-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  border-radius: 24px;
  transition: all 0.2s ease;
}

.ssp-form-fields .ssp-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.ssp-form-fields .ssp-switch input:checked + .ssp-slider {
  background-color: #2563eb;
}

.ssp-form-fields .ssp-switch input:checked + .ssp-slider:before {
  transform: translateX(20px);
}

/* Color Picker */
.ssp-form-fields .ssp-color-picker {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zM21 5H9M21 9H9M21 13H9M21 17H9'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
}

/* Help Text */
.ssp-form-fields .ssp-input-help {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
  line-height: 16px;
  margin-bottom: 0;
}

/* Group Field */
.ssp-form-fields .ssp-group-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Column Layout Utilities */
.ssp-form-fields .scp-col-12 {
  width: 100%;
}

.ssp-form-fields .scp-col-6 {
  width: 100%;
}

.ssp-form-fields .scp-col-3 {
  width: 100%;
}

/* Responsive Design */
.ssp-form-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.ssp-form-fields .field-wrapper {
  flex: 1;
  min-width: 0;
}

.ssp-form-fields .scp-col-12 {
  flex-basis: 100%;
  max-width: 100%;
}

.ssp-form-fields .scp-col-6 {
  flex-basis: calc(50% - 12px);
  max-width: calc(50% - 12px);
}

.ssp-form-fields .scp-col-3 {
  flex-basis: calc(25% - 18px);
  max-width: calc(25% - 18px);
}

@media (max-width: 768px) {
  .ssp-form-fields .scp-col-6,
  .ssp-form-fields .scp-col-3 {
    flex-basis: 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .ssp-form-fields {
    flex-direction: column;
  }
  
  .ssp-form-fields .field-wrapper {
    margin-bottom: 24px;
  }
  
  .ssp-form-fields .field-wrapper:last-child {
    margin-bottom: 0;
  }
  
  .ssp-form-fields .radio-group {
    gap: 16px;
  }
  
  .ssp-form-fields .ssp-checkbox-list-v2 {
    gap: 16px;
  }
  
  .ssp-form-fields .ssp-switch-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 0;
  }
}

/* Error States */
.ssp-form-fields .field-wrapper.error .input-field,
.ssp-form-fields .field-wrapper.error .small-input-field,
.ssp-form-fields .field-wrapper.error .title-field,
.ssp-form-fields .field-wrapper.error .number-input,
.ssp-form-fields .field-wrapper.error .small-number-input,
.ssp-form-fields .field-wrapper.error .textarea-field,
.ssp-form-fields .field-wrapper.error .select-field,
.ssp-form-fields .field-wrapper.error .ssp-input {
  border-color: #dc2626;
}

.ssp-form-fields .field-wrapper.error .input-field:focus,
.ssp-form-fields .field-wrapper.error .small-input-field:focus,
.ssp-form-fields .field-wrapper.error .title-field:focus,
.ssp-form-fields .field-wrapper.error .number-input:focus,
.ssp-form-fields .field-wrapper.error .small-number-input:focus,
.ssp-form-fields .field-wrapper.error .textarea-field:focus,
.ssp-form-fields .field-wrapper.error .select-field:focus,
.ssp-form-fields .field-wrapper.error .ssp-input:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Disabled States */
.ssp-form-fields .input-field:disabled,
.ssp-form-fields .small-input-field:disabled,
.ssp-form-fields .title-field:disabled,
.ssp-form-fields .number-input:disabled,
.ssp-form-fields .small-number-input:disabled,
.ssp-form-fields .textarea-field:disabled,
.ssp-form-fields .select-field:disabled,
.ssp-form-fields .ssp-input:disabled {
  background-color: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Focus Within Enhancement */
.ssp-form-fields .field-wrapper:focus-within .ssp-input-label {
  color: #2563eb;
}

/* Placeholder Styles */
.ssp-form-fields .input-field::placeholder,
.ssp-form-fields .small-input-field::placeholder,
.ssp-form-fields .title-field::placeholder,
.ssp-form-fields .number-input::placeholder,
.ssp-form-fields .small-number-input::placeholder,
.ssp-form-fields .textarea-field::placeholder,
.ssp-form-fields .ssp-input::placeholder {
  color: #9ca3af;
  opacity: 1;
}