/* Visora Forms Public Styles */
.visora-forms-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

.visora-form {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* Field Groups */
.visora-field-group {
    margin-bottom: 4px;
}

.visora-width-full {
    width: 100%;
    flex: 0 0 100%;
}

.visora-width-half {
    width: calc(50% - 8px);
    flex: 0 0 calc(50% - 8px);
}

.visora-width-third {
    width: calc(33.333% - 11px);
    flex: 0 0 calc(33.333% - 11px);
}

.visora-width-two-thirds {
    width: calc(66.666% - 6px);
    flex: 0 0 calc(66.666% - 6px);
}

/* Labels */
.visora-field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
}

.visora-required {
    color: #dc2626;
    font-weight: 400;
}

/* Inputs */
.visora-field-input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    color: #1f2937;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.visora-field-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.visora-field-input::placeholder {
    color: #9ca3af;
}

.visora-field-textarea {
    resize: vertical;
    min-height: 100px;
}

.visora-field-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%236b7280'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* Radio & Checkbox */
.visora-field-radio-group,
.visora-field-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.visora-radio-label,
.visora-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    line-height: 1.4;
}

.visora-radio-label input,
.visora-checkbox-label input {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #4f46e5;
}

/* File Input */
.visora-field-file {
    padding: 8px;
    font-size: 13px;
}

/* Description */
.visora-field-description {
    margin: 4px 0 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* Error */
.visora-field-error {
    min-height: 0;
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
    line-height: 1.4;
}

.visora-field-error:empty {
    display: none;
}

.visora-field-input.visora-has-error {
    border-color: #dc2626;
}

.visora-field-input.visora-has-error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* Submit Button */
.visora-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.4;
}

.visora-btn-submit {
    background: #4f46e5;
    color: #fff;
}

.visora-btn-submit:hover {
    background: #4338ca;
}

.visora-btn-submit:active {
    transform: translateY(1px);
}

.visora-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Submit alignment */
.visora-field-submit {
    padding-top: 8px;
}

.visora-align-center {
    text-align: center;
}

.visora-align-right {
    text-align: right;
}

.visora-align-full .visora-btn {
    width: 100%;
}

/* Loading spinner */
.visora-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: visora-spin 0.6s linear infinite;
}

@keyframes visora-spin {
    to { transform: rotate(360deg); }
}

/* Success Message */
.visora-forms-success {
    padding: 20px 24px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #166534;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
}

.visora-forms-success .visora-success-icon {
    display: block;
    font-size: 32px;
    margin-bottom: 8px;
}

/* Error banner */
.visora-forms-error {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #991b1b;
    font-size: 13px;
}

/* Heading, HTML, Divider */
.visora-field-heading {
    width: 100%;
    flex: 0 0 100%;
    padding: 8px 0;
}

.visora-field-heading h2,
.visora-field-heading h3,
.visora-field-heading h4,
.visora-field-heading h5 {
    margin: 0 0 4px;
    color: #1f2937;
}

.visora-field-heading-desc {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.visora-field-html {
    width: 100%;
    flex: 0 0 100%;
}

.visora-field-divider {
    width: 100%;
    flex: 0 0 100%;
}

.visora-field-divider hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 8px 0;
}

/* Responsive */
@media (max-width: 600px) {
    .visora-width-half,
    .visora-width-third,
    .visora-width-two-thirds {
        width: 100%;
        flex: 0 0 100%;
    }
}
