/* Webhook Form Frontend Styles */
.webhook-form {
    max-width: 800px;
    margin: 20px 0;
}

.webhook-form .form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.webhook-form .form-field {
    padding: 0 10px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.webhook-form .form-field > label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.webhook-form .required {
    color: #d63638;
}

.webhook-form .field-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.webhook-form .field-width-full { width: 100%; }
.webhook-form .field-width-half { width: 50%; }
.webhook-form .field-width-third { width: 33.333%; }

@media (max-width: 600px) {
    .webhook-form .field-width-half,
    .webhook-form .field-width-third {
        width: 100%;
    }
}

.webhook-form .field-input input[type="text"],
.webhook-form .field-input input[type="email"],
.webhook-form .field-input input[type="url"],
.webhook-form .field-input input[type="number"],
.webhook-form .field-input textarea,
.webhook-form .field-input select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.webhook-form .field-input textarea {
    min-height: 100px;
    resize: vertical;
}

.webhook-form .form-submit {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.webhook-form .webhook-submit-btn {
    padding: 10px 24px;
    font-size: 16px;
    cursor: pointer;
}

.webhook-form .webhook-spinner {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

/* Checkbox and Radio Groups */
.webhook-form .checkbox-group,
.webhook-form .radio-group {
    padding: 5px 0;
}

.webhook-form .checkbox-option,
.webhook-form .radio-option {
    display: block;
    margin-bottom: 8px;
    font-weight: normal;
    cursor: pointer;
}

.webhook-form .checkbox-option input,
.webhook-form .radio-option input {
    margin-right: 8px;
}

.webhook-form .checkbox-group.error {
    border: 1px solid #d63638;
    padding: 10px;
    border-radius: 4px;
    background: #fcf0f0;
}

/* File Upload */
.webhook-form .file-wrapper {
    padding: 5px 0;
}

.webhook-form .file-preview {
    margin-bottom: 10px;
}

.webhook-form .file-preview img {
    max-width: 200px;
    max-height: 150px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 3px;
    background: #fff;
}

.webhook-form .file-name {
    display: inline-block;
    padding: 5px 10px;
    background: #f0f0f0;
    border-radius: 3px;
    font-size: 13px;
}

/* Response Display */
.webhook-response-container {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

.webhook-response-content {
    line-height: 1.6;
}

.webhook-message {
    padding: 15px;
    background: #e7f5ff;
    border-left: 4px solid #1890ff;
    border-radius: 4px;
}

.webhook-error {
    padding: 15px;
    background: #fff2f0;
    border-left: 4px solid #ff4d4f;
    border-radius: 4px;
    color: #cf1322;
}

.webhook-response-json {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.webhook-form-error {
    padding: 20px;
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-left: 4px solid #ff4d4f;
    border-radius: 4px;
    color: #cf1322;
    margin: 20px 0;
}

.webhook-form-error strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

/* Field-level error/warning messages */
.webhook-field-error {
    padding: 12px 15px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-left: 4px solid #faad14;
    border-radius: 4px;
    color: #874d00;
    font-size: 13px;
    line-height: 1.5;
}

.webhook-field-error .dashicons {
    color: #faad14;
    margin-right: 8px;
    vertical-align: middle;
}

.webhook-field-error strong {
    color: #d46b08;
}

.file-permission-error {
    margin-top: 5px;
}

/* Redirect and Link styles */
.webhook-redirecting {
    padding: 15px 20px;
    background: #f0f7ff;
    border: 1px solid #91caff;
    border-left: 4px solid #1890ff;
    border-radius: 4px;
    color: #0958d9;
    margin: 10px 0;
    font-weight: 500;
}

.webhook-post-link {
    margin: 15px 0;
}

.webhook-post-link a {
    font-weight: 500;
}

/* Display Text Element */
.webhook-form .field-display-text {
    margin-bottom: 20px;
}

.webhook-form .display-text-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.webhook-form .display-text-content p {
    margin: 0 0 10px;
}

.webhook-form .display-text-content p:last-child {
    margin-bottom: 0;
}

.webhook-form .display-text-content a {
    color: #0073aa;
}

.webhook-form .display-text-content ul,
.webhook-form .display-text-content ol {
    margin: 10px 0;
    padding-left: 20px;
}

/* Section Divider Element */
.webhook-form .field-section {
    margin: 25px 0 20px;
    width: 100% !important;
}

.webhook-form .section-label {
    font-size: 18px;
    font-weight: 700;
    color: #1d2327;
    margin-bottom: 10px;
}

.webhook-form .section-divider {
    border: none;
    border-top: 2px solid #ddd;
    margin: 0;
}
