.uwf-form {
    max-width: 600px;
}

.uwf-field {
    margin-bottom: 15px;
}

.uwf-field > label {
    display: block;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.uwf-option-inline {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin-right: 20px;
    margin-bottom: 8px;
    white-space: nowrap;
    font-weight: 400 !important;
    font-size: 15px;
}

.uwf-field input,
.uwf-field textarea,
.uwf-field select {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.uwf-field select {
    height: auto;
    line-height: 1.5;
    padding: 10px 12px;
    vertical-align: middle;
}

.uwf-field select option {
    white-space: normal;
    word-wrap: break-word;
}

/* Radio and Checkbox specific styles - IMPORTANT */
.uwf-field input[type="radio"],
.uwf-field input[type="checkbox"] {
    width: auto !important;
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
}

.uwf-option-inline {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin-right: 20px;
    margin-bottom: 8px;
    white-space: nowrap;
}

.uwf-submit {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.uwf-submit:hover {
    background: #005b87;
}

.uwf-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.uwf-required {
    color: red;
}

.uwf-success-message {
    padding: 10px 15px;
    background: #dff0d8;
    border: 1px solid #c3e6cb;
    margin-bottom: 15px;
    border-radius: 4px;
}

.uwf-section-title {
    font-size: 1.2em;
    font-weight: 600;
    margin: 25px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
    color: #333;
}

.uwf-html-block {
    margin-bottom: 15px;
}

/* Force child elements to inherit styles from styled blocks */
.uwf-section-title[style],
.uwf-html-block[style] {
    border-bottom: none;
}

.uwf-html-block[style] h1,
.uwf-html-block[style] h2,
.uwf-html-block[style] h3,
.uwf-html-block[style] h4,
.uwf-html-block[style] h5,
.uwf-html-block[style] h6,
.uwf-html-block[style] p,
.uwf-html-block[style] span,
.uwf-html-block[style] a {
    color: inherit !important;
    font-weight: inherit !important;
    font-size: inherit !important;
    text-align: inherit !important;
    margin: 0;
}

.uwf-loader {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.7);
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uwf-spinner {
    width: 40px;
    height: 40px;
    border: 5px solid #ccc;
    border-top-color: #000;
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
    to { transform: rotate(360deg); }
}

/* Grid layout (12-column) */
.uwf-form-grid{
  display:grid;
  grid-template-columns:repeat(12, minmax(0,1fr));
  gap:20px;
}
.uwf-form-grid > [data-col="12"]{ grid-column:span 12; }
.uwf-form-grid > [data-col="6"]{ grid-column:span 6; }
.uwf-form-grid > [data-col="4"]{ grid-column:span 4; }
.uwf-form-grid > [data-col="3"]{ grid-column:span 3; }
/* Fallback for any other col values 1-11 */
.uwf-form-grid > [data-col="1"]{ grid-column:span 1; }
.uwf-form-grid > [data-col="2"]{ grid-column:span 2; }
.uwf-form-grid > [data-col="5"]{ grid-column:span 5; }
.uwf-form-grid > [data-col="7"]{ grid-column:span 7; }
.uwf-form-grid > [data-col="8"]{ grid-column:span 8; }
.uwf-form-grid > [data-col="9"]{ grid-column:span 9; }
.uwf-form-grid > [data-col="10"]{ grid-column:span 10; }
.uwf-form-grid > [data-col="11"]{ grid-column:span 11; }

@media (max-width:768px){
  .uwf-form-grid > *{ grid-column:span 12 !important; }
}


/* Steps / multi-page */
.uwf-step-title{
  margin: 0 0 10px 0;
}
.uwf-step-description{
  margin: 0 0 16px 0;
  color: #555;
}
.uwf-step-nav{
  display:flex;
  gap:12px;
  align-items: center;
  margin-top: 20px;
}
.uwf-step-nav .uwf-step-progress {
  flex: 1;
  text-align: center;
  font-weight: 600;
  color: #666;
}
.uwf-step-nav .button{
  padding:10px 20px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 15px;
}
.uwf-has-error input,
.uwf-has-error select,
.uwf-has-error textarea{
  border-color:#b32d2e;
  outline-color:#b32d2e;
}

.uwf-field-description {
    font-size: 13px;
    color: #666;
    margin: 6px 0 0 0;
    line-height: 1.4;
}